# Visualizing Node Mobility¶

## Goals¶

In INET simulations, the movement of mobile nodes is often as important as the communication among them. However, as mobile nodes roam, it is often difficult to visually follow their movement. INET provides a visualizer that not only makes visually tracking mobile nodes easier, but also indicates other properties like speed and direction.

This showcase consists of one simulation model that demonstrates important features of the mobility visualizer.

INET version: 4.0
Source files location: inet/showcases/visualizer/mobility

In INET, mobility of nodes can be visualized by MobilityVisualizer module (included in the network as part of IntegratedVisualizer). By default, mobility visualization is enabled, it can be disabled by setting displayMovements parameter to false.

By default, all mobilities are considered for the visualization. This selection can be narrowed with the visualizer’s moduleFilter parameter.

The visualizer has several important features:

• Movement Trail: It displays a line along the recent path of movements. The trail gradually fades out as time passes. Color, trail length and other graphical properties can be changed with parameters of the visualizer.
• Velocity Vector: Velocity is represented visually by an arrow. Its starting point is the node, and its direction coincides with the movement’s direction. The arrow’s length is proportional to the node’s speed.
• Orientation Arc: Node orientation is represented by an arc whose size is specified by the orientationArcSize parameter. This value is the relative size of the arc compared to a full circle. The arc’s default value is 0.25, i.e. a quarter of a circle.

These features are disabled by default; they can be enabled by setting the visualizer’s displayMovementTrails, displayVelocities and displayOrientations parameters to true.

## Visualizing Mobility Features¶

The following example shows how to enable mobility visualization features. The simulation can be run by choosing the VisualizingFeatures configuration from the ini file.

Three nodes of the type AdhocHost, host1, host2 and host3, are placed in the scene. They are roaming within predefined borders.

The following video has been captured from the simulation. The default settings of mobility visualization are used.

It is difficult to track the nodes, because they are moving randomly and quite fast. In our next experiment, we enable movement trails, velocity vectors and orientation arcs. We expect that nodes can be tracked easier.

# Movement trail settings
*.visualizer.*.mobilityVisualizer.displayMovementTrails = true
*.visualizer.*.mobilityVisualizer.trailLength = 300

# Velocity vector settings
*.visualizer.*.mobilityVisualizer.displayVelocities = true

# Orientation settings
*.visualizer.*.mobilityVisualizer.displayOrientations = true


The following video shows what happens when we run the simulation.

Compare this video to the previous one! The first thing you may notice is that the hosts’ movement is the same as in the previous video. However, it is now possible to see that the movement of host3 is not actually random, but rather, it moves along a circle. The host1 and host2 nodes can also be easily tracked because of the visualization.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.49788516759872437, "perplexity": 2151.198894196322}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-09/segments/1550247482186.20/warc/CC-MAIN-20190217152248-20190217174248-00234.warc.gz"}