DESERT 4.0.0
UwDriftPosition Class Reference

#include <uwdriftposition.h>

Inheritance diagram for UwDriftPosition:
Inheritance graph
Collaboration diagram for UwDriftPosition:
Collaboration graph

Public Member Functions

 UwDriftPosition ()
 
virtual ~UwDriftPosition ()
 
virtual int command (int, const char *const *)
 

Protected Member Functions

virtual void update (const double &)
 
virtual double getX ()
 
virtual double getY ()
 
virtual double getZ ()
 
virtual short getSign () const
 

Protected Attributes

double xFieldWidth_
 
double yFieldWidth_
 
double zFieldWidth_
 
int boundx_
 
int boundy_
 
int boundz_
 
double speed_horizontal_
 
double speed_longitudinal_
 
double speed_vertical_
 
double alpha_
 
double deltax_
 
double deltay_
 
double deltaz_
 
double starting_speed_x_
 
double starting_speed_y_
 
double starting_speed_z_
 
double updateTime_
 
double nextUpdateTime_
 
int debug_
 

Private Attributes

double old_speed_x_
 
double old_speed_y_
 
double old_speed_z_
 

Detailed Description

UwDriftPosition class implements the drift mobility model.

Constructor & Destructor Documentation

◆ UwDriftPosition()

◆ ~UwDriftPosition()

UwDriftPosition::~UwDriftPosition ( )
virtual

Destructor of UwDriftPosition class.

Member Function Documentation

◆ command()

int UwDriftPosition::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.

◆ getSign()

short UwDriftPosition::getSign ( ) const
protectedvirtual

Returns a randomly 1 or -.

Returns

Referenced by update().

◆ getX()

double UwDriftPosition::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 UwDriftPosition::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 UwDriftPosition::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 UwDriftPosition::update ( const double &  now)
protectedvirtual

Updates both the position coordinates as function of the number of states to be evaluated.

Parameters
doubleCurrent time.

References alpha_, boundx_, boundy_, boundz_, debug_, deltax_, deltay_, deltaz_, getSign(), nextUpdateTime_, old_speed_x_, old_speed_y_, old_speed_z_, speed_horizontal_, speed_longitudinal_, speed_vertical_, updateTime_, xFieldWidth_, yFieldWidth_, and zFieldWidth_.

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

Here is the call graph for this function:

Member Data Documentation

◆ alpha_

double UwDriftPosition::alpha_
protected

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

Referenced by update(), and UwDriftPosition().

◆ boundx_

int UwDriftPosition::boundx_
protected

1 if the x-axis is bounded, 0 otherwise.

Referenced by update(), and UwDriftPosition().

◆ boundy_

int UwDriftPosition::boundy_
protected

1 if the y-axis is bounded, 0 otherwise.

Referenced by update(), and UwDriftPosition().

◆ boundz_

int UwDriftPosition::boundz_
protected

1 if the z-axis is bounded, 0 otherwise.

Referenced by update(), and UwDriftPosition().

◆ debug_

int UwDriftPosition::debug_
protected

Flag to enable or disable dirrefent levels of debug.

Referenced by update(), and UwDriftPosition().

◆ deltax_

double UwDriftPosition::deltax_
protected

Max value of the Uniform Distribution: Random movement between [0, deltax_).

Referenced by update(), and UwDriftPosition().

◆ deltay_

double UwDriftPosition::deltay_
protected

Max value of the Uniform Distribution: Random movement between [0, deltay_).

Referenced by update(), and UwDriftPosition().

◆ deltaz_

double UwDriftPosition::deltaz_
protected

Max value of the Uniform Distribution: Random movement between [0, deltaz_).

Referenced by update(), and UwDriftPosition().

◆ nextUpdateTime_

double UwDriftPosition::nextUpdateTime_
protected

Internal variable used to evaluate the steps to be computed.

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

◆ old_speed_x_

double UwDriftPosition::old_speed_x_
private

Temporary variable.

Referenced by update(), and UwDriftPosition().

◆ old_speed_y_

double UwDriftPosition::old_speed_y_
private

Temporary variable.

Referenced by update(), and UwDriftPosition().

◆ old_speed_z_

double UwDriftPosition::old_speed_z_
private

Temporary variable.

Referenced by update(), and UwDriftPosition().

◆ speed_horizontal_

double UwDriftPosition::speed_horizontal_
protected

Speed of the node in the x-axis, in m/s.

Referenced by update(), and UwDriftPosition().

◆ speed_longitudinal_

double UwDriftPosition::speed_longitudinal_
protected

Speed of the node in the y-axis, in m/s.

Referenced by update(), and UwDriftPosition().

◆ speed_vertical_

double UwDriftPosition::speed_vertical_
protected

Speed of the node in the z-axis, in m/s.

Referenced by update(), and UwDriftPosition().

◆ starting_speed_x_

double UwDriftPosition::starting_speed_x_
protected

Initial speed of the node. x axis in m/s.

Referenced by UwDriftPosition().

◆ starting_speed_y_

double UwDriftPosition::starting_speed_y_
protected

Initial speed of the node. y axis in m/s.

Referenced by UwDriftPosition().

◆ starting_speed_z_

double UwDriftPosition::starting_speed_z_
protected

Initial speed of the node. z axis in m/s.

Referenced by UwDriftPosition().

◆ updateTime_

double UwDriftPosition::updateTime_
protected

Time between two update computation.

Referenced by update(), and UwDriftPosition().

◆ xFieldWidth_

double UwDriftPosition::xFieldWidth_
protected

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

Referenced by update(), and UwDriftPosition().

◆ yFieldWidth_

double UwDriftPosition::yFieldWidth_
protected

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

Referenced by update(), and UwDriftPosition().

◆ zFieldWidth_

double UwDriftPosition::zFieldWidth_
protected

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

Referenced by update(), and UwDriftPosition().


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