NetSim Supports different mobility models such as Random Walk, Random Way Point, Group Mobility, File Based Mobility and SUMO based model.
Random Walk model is that of a random walk on a regular lattice, where at each step the walk jumps to another site according to some probability distribution.
Random Way Point model is a commonly used synthetic model for mobility in Ad-Hoc networks. It is an elementary model which describes the movement pattern of independent nodes by simple terms.
Group mobility model is a commonly used synthetic model for mobility in Ad Hoc networks. It is an elementary model which describes the behavior of mobile nodes as they move together.
In File Based Mobility, users can write their own custom mobility models and define the movement of the mobile users.
In SUMO based model users can link SUMO tool with NetSim to introduce vehicular movement in the nodes, with the help of a SUMO configuration file.
Following is an example of list of mobility models available in a sensor node:
Note: Not all mobility models are available in all devices. There will be limitations based network in which the device is used.
Printing node position over time:
Open Mobility Project, and in Mobility.c and go to fn_NetSim_Mobility_Run() function. Inside the default case add following codes
fprintf(stderr,"\n The position of %s at time %.2lfms is X=%.2lf and Y = %.2lf \n",DEVICE_NAME(pstruEventDetails->nDeviceId),
Build Mobility project and replace libMobility.dll inside the binary folder of NetSim installation directory. Upon running any network simulation involving devices which support mobility, users will be able to find the node positions getting printed in the console during run time. The same can be obtained as a log by writing to a file pointer instead of stderr.