Contenuto principale

nodeMobilityConstantVelocity

Implement constant velocity mobility model

Since R2026a

    Description

    Use the nodeMobilityConstantVelocity object to implement constant velocity mobility model.

    Creation

    Description

    constVelocityModel = nodeMobilityConstantVelocity creates a default constant velocity mobility model.

    constVelocityModel = nodeMobilityConstantVelocity(PropertyName=Value) sets properties using one or more optional name-value arguments. For example, RefreshInterval=3 sets the refresh interval to 3.

    Note that, in the constant velocity model, a wireless node travels with a constant velocity.

    Properties

    expand all

    Node velocity in 3-D Cartesian coordinates, specified as a three-element numeric vector. The units are in meters per second.

    Data Types: single | double

    Refresh interval, specified as a nonnegative numeric scalar. The nodeMobilityConstantVelocity object updates the position and velocity information once during this refresh interval, but only when a subclass of wnet.Node request it. The units are in seconds.

    Note that, if you set RefreshInterval to 0, the object updates position and velocity information immediately whenever a subclass of wnet.Node requests it.

    Data Types: single | double

    Examples

    collapse all

    This command creates the constant velocity mobility model with all default settings.

    randomWalkModel = nodeMobilityConstantVelocity
    randomWalkModel = 
      nodeMobilityConstantVelocity with properties:
    
               Velocity: [0 0 0]
        RefreshInterval: 0.1000
    
    

    This syntax sets specific properties for the constant velocity mobility model using name-value arguments.

    randomWalkModel = nodeMobilityConstantVelocity( ...
        Velocity=[2 1 0], ...          % velocity vector in m/s along x, y, z axes
        RefreshInterval= 0.1)          % Refresh every 0.1 seconds
    randomWalkModel = 
      nodeMobilityConstantVelocity with properties:
    
               Velocity: [2 1 0]
        RefreshInterval: 0.1000
    
    

    Version History

    Introduced in R2026a