Bug 1919

Summary: Strip trailing semi-colons from mobility trace files
Product: ns-3 Reporter: Scott Carpenter <scarpen>
Component: mobility modelsAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: enhancement CC: tommaso.pecorella
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Scott Carpenter 2014-05-30 16:53:02 UTC
I propose the following simple patch for src/mobility/helper/ns2-mobilty-helper.cc




510c510,511
<   while (ret.size () > 0 && isblank (ret[ret.size () - 1]))
 ---
>   // trim trailing blanks or semi-colon (;)
>   while (ret.size () > 0 && (isblank (ret[ret.size () - 1]) || (ret[ret.size () - 1] == ';')))





Issue:  

In VANET simulation using realistic vehicular traces (http://www.lst.inf.ethz.ch/research/ad-hoc/car-traces/), it is noted that some of the prepared trace files contain a semi-colon (;) at the end of the line, which the ns2-mobility-helper was not trimming.  We simply extend the existing logic to trim trailing spaces OR trailing semi-colon.
Comment 1 Tommaso Pecorella 2014-06-06 17:34:20 UTC
changeset 10802	779b67cc3a46