Hi,First of all, the ending of the file (.tcl or .txt) does not play any role. The format that describes the movement of the nodes plays.
What is the granularity of those files in terms of time? e.g. is it every second? less? more?
You could create your own 'mobiliy-helper'/parser from those files by extending waypoint mobility.In NS-3, each WayPoint is defined as a Time and a Position, which IMHO resembles the format in CRAWDAD.You would then have to read the file (simple C++ operation), get each line, create a WayPoint, add that WayPoint to the Mobility of the node.Is that clear enough?
You you also use SUMO, as it can be used for pedestrians (e.g. http://sumo.dlr.de/wiki/Simulation/Pedestrians)Regards,K.
Le mercredi 18 novembre 2015 17:24:58 UTC+1, Konstantinos a écrit :Hi,First of all, the ending of the file (.tcl or .txt) does not play any role. The format that describes the movement of the nodes plays.I mentioned .txt and .tcl just to make the difference between the (X Y writing format) and the (ns-3 format )What is the granularity of those files in terms of time? e.g. is it every second? less? more?The granularity is about each 10 seconds
You could create your own 'mobiliy-helper'/parser from those files by extending waypoint mobility.In NS-3, each WayPoint is defined as a Time and a Position, which IMHO resembles the format in CRAWDAD.You would then have to read the file (simple C++ operation), get each line, create a WayPoint, add that WayPoint to the Mobility of the node.Is that clear enough?Yes, your suggestion is clear enough. Thank youHowever, since i saw a simple way to have ns compatible trace files from SUMO, Bonnmotion, i was wondering if there is a similar way to convert a (t,x,y) file to ns format. I am thinking of doing it manually, by printing the global format ($node..) with python.
$node set X_ x1 $node set Y_ y1 $node set Z_ z1 $ns at $time $node setdest x2 y2 speed $ns at $time $node set X_ x1 $ns at $time $node set Y_ Y1 $ns at $time $node set Z_ Z1
$node_(0) set X_ 13629.6576521
$node_(0) set Y_ 7090.41723703
$ns_ at 0.0 "$node_(0) setdest x y speed"
As a hint, you must make the two first lines for every new node
Then you compute the speed (simple maths) and you add it with the next coordinates in the third line and so on.
Hope it helps