NS3 does not support constant speed mobility but it has a very good class
RandomWalk2dMobilityModel which supports random speed and direction based on defined time or distance. If you need to simulation constant speed mobility, use the following steps:
- Open file '..../ns-3-dev/src/mobility/random-direction-2d-mobility-model.cc'
- In function DoStartPrivate()
- comment the line 'double speed = m_speed.GetValue ();'
- add a line 'double speed = your_constant_speed_value'
- Recompile ns-3 and you are done.
This comment has been removed by a blog administrator.
ReplyDeleteThis can also be done without modifying the source code
ReplyDeletemobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel", "Speed", RandomVariableValue (ConstantVariable (Speed))