Bug 1919 - Strip trailing semi-colons from mobility trace files
Strip trailing semi-colons from mobility trace files
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: mobility models
ns-3-dev
All All
: P5 enhancement
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-30 16:53 EDT by Scott Carpenter
Modified: 2014-06-06 17:34 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Carpenter 2014-05-30 16:53:02 EDT
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 EDT
changeset 10802	779b67cc3a46