DESERT 4.0.0
UwGMPosition Class Reference

#include <uwgmposition.h>

Inheritance diagram for UwGMPosition:
Inheritance graph
Collaboration diagram for UwGMPosition:
Collaboration graph

Public Member Functions

 UwGMPosition ()
 
virtual ~UwGMPosition ()
 
virtual int command (int argc, const char *const *argv)
 

Protected Member Functions

virtual double getX ()
 
virtual double getY ()
 
virtual double getZ ()
 

Protected Attributes

double xFieldWidth_
 
double yFieldWidth_
 
double zFieldWidth_
 
double alpha_
 
double alphaPitch_
 
double speedMean_
 
double directionMean_
 
double pitchMean_
 
BoundType bound_
 
double updateTime_
 
double nextUpdateTime_
 
double speed_
 
double direction_
 
double pitch_
 
int debug_
 

Private Member Functions

virtual void update (double now)
 
double Gaussian ()
 

Private Attributes

double vx
 
double vy
 
double vz
 

Detailed Description

UwGMPosition class implements the Gauss Markov 3D mobility model.

Constructor & Destructor Documentation

◆ UwGMPosition()

UwGMPosition::UwGMPosition ( )

◆ ~UwGMPosition()

UwGMPosition::~UwGMPosition ( )
virtual

Destructor of UwGMPosition class.

Member Function Documentation

◆ command()

int UwGMPosition::command ( int  argc,
const char *const *  argv 
)
virtual

TCL command interpreter. It implements the following OTcl methods:

Parameters
argcNumber of arguments in argv.
argvArray of strings which are the command parameters (Note that argv[0] is the name of the object).
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.

References bound_, HARDWALL, REBOUNCE, speed_, speedMean_, SPHERIC, and THOROIDAL.

◆ Gaussian()

double UwGMPosition::Gaussian ( )
private

Method that returns a value from a normal random Gaussian variable (zero mean, unitary viariance)

Referenced by update().

◆ getX()

double UwGMPosition::getX ( )
protectedvirtual

Returns the current projection of the node on the x-axis. If it's necessary (updating time ia expired), update the position values before returns it.

Returns
The new x-axis position value of the node.

References nextUpdateTime_, and update().

Here is the call graph for this function:

◆ getY()

double UwGMPosition::getY ( )
protectedvirtual

Returns the current projection of the node on the y-axis. If it's necessary (updating time ia expired), update the position values before returns it.

Returns
The new y-axis position value of the node.

References nextUpdateTime_, and update().

Here is the call graph for this function:

◆ getZ()

double UwGMPosition::getZ ( )
protectedvirtual

Returns the current projection of the node on the z-axis. If it's necessary (updating time ia expired), update the position values before returns it.

Returns
The new z-axis position value of the node.

References nextUpdateTime_, and update().

Here is the call graph for this function:

◆ update()

void UwGMPosition::update ( double  now)
privatevirtual

Method that updates both the position coordinates as function of the number of states to be evaluated.

References alpha_, alphaPitch_, bound_, debug_, direction_, directionMean_, Gaussian(), HARDWALL, nextUpdateTime_, pitch_, pitchMean_, REBOUNCE, speed_, speedMean_, SPHERIC, THOROIDAL, updateTime_, vx, vy, vz, xFieldWidth_, yFieldWidth_, and zFieldWidth_.

Referenced by getX(), getY(), and getZ().

Here is the call graph for this function:

Member Data Documentation

◆ alpha_

double UwGMPosition::alpha_
protected

Parameter to be used to vary the randomness: 0: totally random values (Brownian motion), 1: linear motion.

Referenced by update(), and UwGMPosition().

◆ alphaPitch_

double UwGMPosition::alphaPitch_
protected

Pitch of alpha variable.

Referenced by update(), and UwGMPosition().

◆ bound_

BoundType UwGMPosition::bound_
protected

Referenced by command(), and update().

◆ debug_

int UwGMPosition::debug_
protected

Flag to enable or disable dirrefent levels of debug.

Referenced by update(), and UwGMPosition().

◆ direction_

double UwGMPosition::direction_
protected

Current value of the direction.

Referenced by update().

◆ directionMean_

double UwGMPosition::directionMean_
protected

Defines the mean value of the direction.

Referenced by update(), and UwGMPosition().

◆ nextUpdateTime_

double UwGMPosition::nextUpdateTime_
protected

Internal variable used to evaluate the steps to be computed.

Referenced by getX(), getY(), getZ(), and update().

◆ pitch_

double UwGMPosition::pitch_
protected

Current value of the pitch.

Referenced by update().

◆ pitchMean_

double UwGMPosition::pitchMean_
protected

Mean value for the pitch.

Referenced by update(), and UwGMPosition().

◆ speed_

double UwGMPosition::speed_
protected

Current value of the speed.

Referenced by command(), and update().

◆ speedMean_

double UwGMPosition::speedMean_
protected

Defines the mean value of the speed, when it is setted to zero the node moves anyway.

Referenced by command(), and update().

◆ updateTime_

double UwGMPosition::updateTime_
protected

Defines the behaviour of the node when it reaches the edge: SPHERIC: return in the simulation field on the opposite side THOROIDAL: return in the centre of simulation field HARDWALL: the movement is stopped in the edge REBOUNCE: the node rebounce (i.e., the movement that should be outside the simulation field is mirrored inside) Time between two update computation.

Referenced by update(), and UwGMPosition().

◆ vx

double UwGMPosition::vx
private

Temporary variable.

Referenced by update().

◆ vy

double UwGMPosition::vy
private

Temporary variable.

Referenced by update().

◆ vz

double UwGMPosition::vz
private

Temporary variable.

Referenced by update().

◆ xFieldWidth_

double UwGMPosition::xFieldWidth_
protected

Range of the x-axis of the field to be simulated, in meters.

Referenced by update(), and UwGMPosition().

◆ yFieldWidth_

double UwGMPosition::yFieldWidth_
protected

Range of the y-axis of the field to be simulated, in meters.

Referenced by update(), and UwGMPosition().

◆ zFieldWidth_

double UwGMPosition::zFieldWidth_
protected

Range of the z-axis of the field to be simulated, in meters.

Referenced by update(), and UwGMPosition().


The documentation for this class was generated from the following files: