Skip to content

A Simple CircleMobilityModel (3D) for ns-3

I wish to add a Simple CircleMobilityModel (3D) in ns-3. I wrote this model by cloning the skeleton structure of ns-3's "ConstantPositionMobilityModel" by Mathieu Lacage. Only a few standard declaration lines are directly handled from ConstantPositionMobilityModel code, and mostly, 90% of lines of this models were only rewritten by me. This model uses circle functions inspired from Circle Function Logic of Circle Mobility Model of Omnet++ by Andras Varga. The original Omnet++ version used radians and degree conversions in its implementation; but I handled angles only in degree.

This merge will add "circle-mobility-model.h" and "circle-mobility-model.cc" file under "src/mobility/models" and do the necessary modifications in wscript and CMakeLists.txt and other files to incorporate CircleMobilityModel in ns-3-dev. This will also add two simulation example scripts under src/mobility/examples and add the necessary test script under src/mobility/test. It will do the necessary changes in src/mobility/test/examples-to-run.py and src/mobility/examples/wscript to incorporate them with in ns-3-dev.

The following are the NetAnim outputs (captured as gif animation) for our example scripts : simple-3d-circle-mobility-example1.cc and simple-3d-circle-mobility-example2.cc

The first one is an Example with one node with CircleMobilityModel (simple-3d-circle-mobility-example1.cc).

CircleMobilityOutput1

The second one is an Example with one node with CircleMobilityModel along with 50 nodes having GaussMarkovMobilityModel (simple-3d-circle-mobility-example2.cc).

CircleMobilityOutput2

In fact, the above are 2D projections of 3D Network simulations on NetAnim, so that the output in 3D can be visualized using ns-3 extensions such as NetSimulyzer (this merge is not providng with NetSimulyzer version of simulation script since ns-3-dev doesn't have those required modules/model).

The following is one such possibility of visualizing this ns-3 CircleMobilityModel Simulation with NetSimulyzer 3D visualization Tool. In the following examples, the boat moving (in reverse direction?😇 ) on the water surface is using the proposed CircleMobilityModel.

FeaturedImageCircleMobilityModel CircleMobilityModel

Edited by Charles Pandian

Merge request reports