MobilityVisualizer

Package: inet.visualizer.common

compound module MobilityVisualizer

Integrates canvas and osg mobility visualizers into a single module.

See also: MobilityCanvasVisualizer, MobilityOsgVisualizer, MobilityVisualizerBase, IMobilityVisualizer

Usage diagram

Inheritance diagram

Parameters

Name

Type

Default value

Description

visualizationTargetModule

string

“^”

visualizationSubjectModule

string

“^”

Properties

Name

Value

Description

display

i=block/app

Unassigned submodule parameters

Name

Type

Default value

Description

canvasVisualizer.displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

canvasVisualizer.visualizationTargetModule

string

“^”

Module path relative to the visualizer which determines where the visualization should appear in the user interface, parent module by default

canvasVisualizer.visualizationSubjectModule

string

“^”

Module path relative to the visualizer which determines what part of the simulation model the visualizer displays in the user interface, parent module by default

canvasVisualizer.tags

string

“”

Tag added to each visualization for disambiguation in the runtime environment

canvasVisualizer.networkNodeVisualizerModule

string

“^.networkNodeVisualizer”

The network node visualizer module, refers to a sibling submodule by default

canvasVisualizer.displayMobility

bool

true

Display mobility, enabled by default

canvasVisualizer.animationSpeed

double

0

Animation speed while objects are moving around, value must be in the range (0, +inf)

canvasVisualizer.moduleFilter

string

“**.mobility”

Which mobilities are considered, matches all mobilities by default

canvasVisualizer.displayPositions

bool

false

Display a circle indicating the current position, disabled by default

canvasVisualizer.positionCircleRadius

double

4

Radius of the circle

canvasVisualizer.positionCircleLineWidth

double

1

Line width of the circle

canvasVisualizer.positionCircleLineColor

string

“dark”

Position circle line color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default

canvasVisualizer.positionCircleFillColor

string

“dark”

Position circle fill color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default

canvasVisualizer.displayOrientations

bool

false

Display a 3D cone indicating the current orientation, disabled by default

canvasVisualizer.orientationPieRadius

double

32

On-screen radius of the orientation cone, in pixels

canvasVisualizer.orientationPieSize

double

0.2

Angular half-width of the orientation cone as a fraction of a full circle; must be in the open interval (0, 0.5)

canvasVisualizer.orientationPieOpacity

double

0.25

Opacity of the orientation cone

canvasVisualizer.orientationLineColor

string

“black”

Orientation line color, black by default

canvasVisualizer.orientationLineStyle

string

“solid”

Orientation line style (solid, dashed, dotted)

canvasVisualizer.orientationLineWidth

double

1

Orientation line width

canvasVisualizer.orientationFillColorUp

string

“blue”

Fill color of the orientation base disc when the cone points up (toward the viewer); empty means the disc is not filled

canvasVisualizer.orientationFillColorDown

string

“red”

Fill color of the orientation base disc when the cone points down (away from the viewer); empty means the disc is not filled

canvasVisualizer.displayVelocities

bool

false

Display an arrow indicating the current velocity, disabled by default

canvasVisualizer.velocityArrowScale

double

1

Velocity scaling factor to pixels

canvasVisualizer.velocityLineColor

string

“black”

Velocity line color, black by default

canvasVisualizer.velocityLineStyle

string

“solid”

Velocity line style (solid, dashed, dotted)

canvasVisualizer.velocityLineWidth

double

1

Velocity line width

canvasVisualizer.velocityProjection

string

“projected”

How the velocity arrow is projected on an equirectangular map: “projected” applies the full equirectangular distortion; “trueLength” uses the map heading (sheared direction) at true length; “isometric” preserves true heading and length. No effect without a geographic/equirectangular projection.

canvasVisualizer.orientationProjection

string

“projected”

How the orientation cone is projected on an equirectangular map: “projected” shears the base disc per the equirectangular distortion; “isometric” preserves true heading and length (the base disc stays circular); “trueLength” uses the map heading at true length. No effect without a geographic/equirectangular projection.

canvasVisualizer.displayMovementTrails

bool

false

Display a line along the recent path of mobilities, disabled by default

canvasVisualizer.movementTrailLineColor

string

“dark”

Movement trail line color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default

canvasVisualizer.movementTrailLineStyle

string

“solid”

Movement trail line style (solid, dashed, dotted)

canvasVisualizer.movementTrailLineWidth

double

1

Movement trail line width

canvasVisualizer.trailLength

int

100

Number of sections in the trail

canvasVisualizer.movementTrailSegmentHideThreshold

double

inf

Trail segments longer than this many pixels (e.g. a node wrapping across the map on an equirectangular projection) are treated as discontinuities and hidden, so the trail shows as disjoint pieces; the default (positive infinity) hides nothing

canvasVisualizer.zIndex

double

0

Determines the drawing order of figures relative to other visualizers

osgVisualizer.displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

osgVisualizer.visualizationTargetModule

string

“^”

Module path relative to the visualizer which determines where the visualization should appear in the user interface, parent module by default

osgVisualizer.visualizationSubjectModule

string

“^”

Module path relative to the visualizer which determines what part of the simulation model the visualizer displays in the user interface, parent module by default

osgVisualizer.tags

string

“”

Tag added to each visualization for disambiguation in the runtime environment

osgVisualizer.networkNodeVisualizerModule

string

“^.networkNodeVisualizer”

The network node visualizer module, refers to a sibling submodule by default

osgVisualizer.displayMobility

bool

true

Display mobility, enabled by default

osgVisualizer.animationSpeed

double

0

Animation speed while objects are moving around, value must be in the range (0, +inf)

osgVisualizer.moduleFilter

string

“**.mobility”

Which mobilities are considered, matches all mobilities by default

osgVisualizer.displayPositions

bool

false

Display a circle indicating the current position, disabled by default

osgVisualizer.positionCircleRadius

double

4

Radius of the circle

osgVisualizer.positionCircleLineWidth

double

1

Line width of the circle

osgVisualizer.positionCircleLineColor

string

“dark”

Position circle line color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default

osgVisualizer.positionCircleFillColor

string

“dark”

Position circle fill color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default

osgVisualizer.displayOrientations

bool

false

Display a 3D cone indicating the current orientation, disabled by default

osgVisualizer.orientationPieRadius

double

32

On-screen radius of the orientation cone, in pixels

osgVisualizer.orientationPieSize

double

0.2

Angular half-width of the orientation cone as a fraction of a full circle; must be in the open interval (0, 0.5)

osgVisualizer.orientationPieOpacity

double

0.25

Opacity of the orientation cone

osgVisualizer.orientationLineColor

string

“black”

Orientation line color, black by default

osgVisualizer.orientationLineStyle

string

“solid”

Orientation line style (solid, dashed, dotted)

osgVisualizer.orientationLineWidth

double

1

Orientation line width

osgVisualizer.orientationFillColorUp

string

“blue”

Fill color of the orientation base disc when the cone points up (toward the viewer); empty means the disc is not filled

osgVisualizer.orientationFillColorDown

string

“red”

Fill color of the orientation base disc when the cone points down (away from the viewer); empty means the disc is not filled

osgVisualizer.displayVelocities

bool

false

Display an arrow indicating the current velocity, disabled by default

osgVisualizer.velocityArrowScale

double

1

Velocity scaling factor to pixels

osgVisualizer.velocityLineColor

string

“black”

Velocity line color, black by default

osgVisualizer.velocityLineStyle

string

“solid”

Velocity line style (solid, dashed, dotted)

osgVisualizer.velocityLineWidth

double

1

Velocity line width

osgVisualizer.velocityProjection

string

“projected”

How the velocity arrow is projected on an equirectangular map: “projected” applies the full equirectangular distortion; “trueLength” uses the map heading (sheared direction) at true length; “isometric” preserves true heading and length. No effect without a geographic/equirectangular projection.

osgVisualizer.orientationProjection

string

“projected”

How the orientation cone is projected on an equirectangular map: “projected” shears the base disc per the equirectangular distortion; “isometric” preserves true heading and length (the base disc stays circular); “trueLength” uses the map heading at true length. No effect without a geographic/equirectangular projection.

osgVisualizer.displayMovementTrails

bool

false

Display a line along the recent path of mobilities, disabled by default

osgVisualizer.movementTrailLineColor

string

“dark”

Movement trail line color is a list of colors or a color group name (e.g. dark, light), a set of dark colors by default

osgVisualizer.movementTrailLineStyle

string

“solid”

Movement trail line style (solid, dashed, dotted)

osgVisualizer.movementTrailLineWidth

double

1

Movement trail line width

osgVisualizer.trailLength

int

100

Number of sections in the trail

osgVisualizer.movementTrailSegmentHideThreshold

double

inf

Trail segments longer than this many pixels (e.g. a node wrapping across the map on an equirectangular projection) are treated as discontinuities and hidden, so the trail shows as disjoint pieces; the default (positive infinity) hides nothing

Source code

//
// Integrates canvas and osg mobility visualizers into a single module.
//
// @see ~MobilityCanvasVisualizer, ~MobilityOsgVisualizer, ~MobilityVisualizerBase, ~IMobilityVisualizer
//
module MobilityVisualizer like IMobilityVisualizer
{
    parameters:
        @display("i=block/app");
        string visualizationTargetModule = default("^");
        string visualizationSubjectModule = default("^");
        *.visualizationTargetModule = default(absPath(this.visualizationTargetModule));
        *.visualizationSubjectModule = default(absPath(this.visualizationSubjectModule));
    submodules:
        canvasVisualizer: <default(firstAvailableOrEmpty("MobilityCanvasVisualizer"))> like IMobilityVisualizer if typename != "" {
            parameters:
                @display("p=100,100");
        }
        osgVisualizer: <default(firstAvailableOrEmpty("MobilityOsgVisualizer"))> like IMobilityVisualizer if typename != "" {
            parameters:
                @display("p=100,200");
        }
}

File: src/inet/visualizer/common/MobilityVisualizer.ned