MobilityBase

Package: inet.mobility.base

MobilityBase

simple module

Abstract base module for mobility models.

Format directives:

  • %p position
  • %v velocity
  • %s speed
  • %a acceleration
  • %P angular position
  • %V angular velocity
  • %S angular speed
  • %A angular acceleration

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
AttachedMobility simple module

This module provides a mobility that is attached to another mobility at a given offset. The position, velocity and acceleration are all affectred by the respective quantites and the orientation of the mobility where this one is attached.

FacingMobility simple module

This module provides orientation towards the target mobility model as seen from the source mobility model.

MovingMobilityBase simple module

Abstract base module for mobility models.

StaticConcentricMobility simple module

Places all hosts on concentric circles

StaticGridMobility simple module

Places all hosts in a rectangular grid. The usable area (constraint area minus margins on each side) is split into smaller cells (with separationX,separationY size). Hosts are placed in the middle of each cell. By default, the number of columns and rows follow the aspect ratio of the usable area. By default stepX and stepY are calculated based on the number of columns and rows.

StationaryMobility simple module

This mobility module does nothing; it can be used for stationary nodes.

SuperpositioningMobility compound module

This mobility module combines the trajectory of several other mobility modules using superposition. In other words, the position, velocity and acceleration is the sum of the respective quantities of all submodules.

Parameters

Name Type Default value Description
subjectModule string "^"

module path which determines the subject module, the motion of which this mobility model describes, the default value is the parent module

coordinateSystemModule string ""

module path of the geographic coordinate system module

displayStringTextFormat string "p: %p\nv: %v"

format string for the mobility module's display string text

updateDisplayString bool true

enables continuous update of the subject module's position via modifying its display string

constraintAreaMinX double -inf m

min x position of the constraint area, unconstrained by default (negative infinity)

constraintAreaMinY double -inf m

min y position of the constraint area, unconstrained by default (negative infinity)

constraintAreaMinZ double -inf m

min z position of the constraint area, unconstrained by default (negative infinity)

constraintAreaMaxX double inf m

max x position of the constraint area, unconstrained by default (positive infinity)

constraintAreaMaxY double inf m

max y position of the constraint area, unconstrained by default (positive infinity)

constraintAreaMaxZ double inf m

max z position of the constraint area, unconstrained by default (positive infinity)

Properties

Name Value Description
display i=block/cogwheel

Signals

Name Type Unit
mobilityStateChanged inet::MobilityBase

Source code

//
// Abstract base module for mobility models.
//
// Format directives:
//  - %p position
//  - %v velocity
//  - %s speed
//  - %a acceleration
//  - %P angular position
//  - %V angular velocity
//  - %S angular speed
//  - %A angular acceleration
//
simple MobilityBase like IMobility
{
    parameters:
        @signal[mobilityStateChanged](type=inet::MobilityBase);     // it's work in inet, but not work in extended module in other namespace
        @display("i=block/cogwheel");
        string subjectModule = default("^"); // module path which determines the subject module, the motion of which this mobility model describes, the default value is the parent module
        string coordinateSystemModule = default(""); // module path of the geographic coordinate system module
        string displayStringTextFormat @mutable = default("p: %p\nv: %v"); // format string for the mobility module's display string text
        bool updateDisplayString = default(true); // enables continuous update of the subject module's position via modifying its display string
        double constraintAreaMinX @unit(m) = default(-inf m); // min x position of the constraint area, unconstrained by default (negative infinity)
        double constraintAreaMinY @unit(m) = default(-inf m); // min y position of the constraint area, unconstrained by default (negative infinity)
        double constraintAreaMinZ @unit(m) = default(-inf m); // min z position of the constraint area, unconstrained by default (negative infinity)
        double constraintAreaMaxX @unit(m) = default(inf m); // max x position of the constraint area, unconstrained by default (positive infinity)
        double constraintAreaMaxY @unit(m) = default(inf m); // max y position of the constraint area, unconstrained by default (positive infinity)
        double constraintAreaMaxZ @unit(m) = default(inf m); // max z position of the constraint area, unconstrained by default (positive infinity)
}

File: src/inet/mobility/base/MobilityBase.ned