DESERT 3.5.1
Loading...
Searching...
No Matches
WossGMMob3D Class Reference

#include <woss-gmmobility-3d.h>

Inheritance diagram for WossGMMob3D:
Collaboration diagram for WossGMMob3D:

Classes

class  UpdateTimerPosition
 

Public Types

enum  BoundType { SPHERIC = 1 , THOROIDAL , HARDWALL , REBOUNCE }
 

Public Member Functions

 WossGMMob3D ()
 
virtual ~WossGMMob3D ()
 
virtual double getStartX ()
 
virtual double getStartY ()
 
virtual void setLat (double x_coord, double y_coord)
 
virtual void setLong (double x_coord, double y_coord)
 
virtual int command (int argc, const char *const *argv)
 

Public Attributes

double newx
 
double newy
 
double newz
 
double vx
 
double vy
 
double vz
 
double x_coord
 
double y_coord
 
double z_coord
 

Protected Member Functions

virtual void update ()
 
double Gaussian ()
 

Protected Attributes

double xFieldWidth_
 
double yFieldWidth_
 
double zFieldWidth_
 
double alpha_
 
double alphaPitch_
 
double speedMean_
 
double directionMean_
 
double pitchMean_
 
double sigmaPitch_
 
BoundType bound_
 
double updateTime_
 
double nextUpdateTime_
 
double speed_
 
double direction_
 
int wossgm_debug_
 
int maddr
 
double start_latitude
 
double start_longitude
 
double start_x
 
double start_y
 
int mtrace_
 
int mtrace_of_node_
 
double pitch_
 
double zmin_
 
string gm3dTraceFile
 
UpdateTimerPosition update_timer_position
 
Uwrandomlib randlib
 

Detailed Description

This class implements the Gauss Markov mobility model.

Movement occurs by updating the speed and the direction only when an information regarding node position is required, in this case, if is necessary, all the uncalculated previous states are computed according to a finite state Markov process. The model is designed to adapt to different level of randomness via one tuning parameter (alpha). Initially each node is assigned a current speed and direction, which will be updated during the simulation.

Definition at line 67 of file woss-gmmobility-3d.h.

Member Enumeration Documentation

◆ BoundType

Enumeration BoundType.

Defines the behaviour of the node when it reaches an edge of the simulated field.

Enumerator
SPHERIC 
THOROIDAL 
HARDWALL 
REBOUNCE 

Definition at line 95 of file woss-gmmobility-3d.h.

Constructor & Destructor Documentation

◆ WossGMMob3D()

WossGMMob3D::WossGMMob3D ( )

Constructor of WossGMMob3D class.

Definition at line 66 of file woss-gmmobility-3d.cpp.

◆ ~WossGMMob3D()

WossGMMob3D::~WossGMMob3D ( )
virtual

Destructor of WossGMMob3D class.

Definition at line 110 of file woss-gmmobility-3d.cpp.

Member Function Documentation

◆ command()

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

TCL command intepreter Moreover it inherits all the OTcl method of Position.

Parameters
argcnumber of arguments in argv
argvarray of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or no

Definition at line 114 of file woss-gmmobility-3d.cpp.

◆ Gaussian()

double WossGMMob3D::Gaussian ( )
protected

Method that returns a value from a normal random Gaussian variable.

Definition at line 226 of file woss-gmmobility-3d.cpp.

◆ getStartX()

double WossGMMob3D::getStartX ( )
virtual

Method that return 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.

Definition at line 193 of file woss-gmmobility-3d.cpp.

◆ getStartY()

double WossGMMob3D::getStartY ( )
virtual

Method that return 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.

Definition at line 201 of file woss-gmmobility-3d.cpp.

◆ setLat()

void WossGMMob3D::setLat ( double  x_coord,
double  y_coord 
)
virtual

Method that return the starting curtesian coordinates of the node on the x-axis and y-axis.

It converts the starting latitude and longitude given in the tcl script into cartesian coordinates.

Definition at line 209 of file woss-gmmobility-3d.cpp.

◆ setLong()

void WossGMMob3D::setLong ( double  x_coord,
double  y_coord 
)
virtual

Definition at line 218 of file woss-gmmobility-3d.cpp.

◆ update()

void WossGMMob3D::update ( )
protectedvirtual

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

Definition at line 253 of file woss-gmmobility-3d.cpp.

Member Data Documentation

◆ alpha_

double WossGMMob3D::alpha_
protected

Parameter to be used to vary the randomness.

0: totally random values (Brownian motion). 1: linear motion

Definition at line 173 of file woss-gmmobility-3d.h.

◆ alphaPitch_

double WossGMMob3D::alphaPitch_
protected

Parameter to be used to vary the randomness in z-axis.

Definition at line 175 of file woss-gmmobility-3d.h.

◆ bound_

BoundType WossGMMob3D::bound_
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)

Definition at line 185 of file woss-gmmobility-3d.h.

◆ direction_

double WossGMMob3D::direction_
protected

Current value of the direction.

Definition at line 198 of file woss-gmmobility-3d.h.

◆ directionMean_

double WossGMMob3D::directionMean_
protected

Defines the mean value of the direction.

Definition at line 179 of file woss-gmmobility-3d.h.

◆ gm3dTraceFile

string WossGMMob3D::gm3dTraceFile
protected

Trace file information.

Definition at line 220 of file woss-gmmobility-3d.h.

◆ maddr

int WossGMMob3D::maddr
protected

Mac address of the node whose movement we would like to trace.

Definition at line 202 of file woss-gmmobility-3d.h.

◆ mtrace_

int WossGMMob3D::mtrace_
protected

Flag to enable trace.

Definition at line 212 of file woss-gmmobility-3d.h.

◆ mtrace_of_node_

int WossGMMob3D::mtrace_of_node_
protected

The node whose movement pattern we want to trace.

Definition at line 214 of file woss-gmmobility-3d.h.

◆ newx

double WossGMMob3D::newx

Definition at line 104 of file woss-gmmobility-3d.h.

◆ newy

double WossGMMob3D::newy

Definition at line 104 of file woss-gmmobility-3d.h.

◆ newz

double WossGMMob3D::newz

new position of a node respectively in x-axis, y-axis and z-axis.

Definition at line 104 of file woss-gmmobility-3d.h.

◆ nextUpdateTime_

double WossGMMob3D::nextUpdateTime_
protected

Intenal variable used to evaluate the steps to be computed.

Definition at line 194 of file woss-gmmobility-3d.h.

◆ pitch_

double WossGMMob3D::pitch_
protected

Current value of the pitch.

Definition at line 216 of file woss-gmmobility-3d.h.

◆ pitchMean_

double WossGMMob3D::pitchMean_
protected

Defines the mean value of the shifting in z-axis.

Definition at line 181 of file woss-gmmobility-3d.h.

◆ randlib

Uwrandomlib WossGMMob3D::randlib
protected

Definition at line 224 of file woss-gmmobility-3d.h.

◆ sigmaPitch_

double WossGMMob3D::sigmaPitch_
protected

Standard deviation in the z-axis.

Definition at line 183 of file woss-gmmobility-3d.h.

◆ speed_

double WossGMMob3D::speed_
protected

Current value of the speed.

Definition at line 196 of file woss-gmmobility-3d.h.

◆ speedMean_

double WossGMMob3D::speedMean_
protected

Defines the mean value of the speed.

When it is setted to zero the node moves anyway

Definition at line 177 of file woss-gmmobility-3d.h.

◆ start_latitude

double WossGMMob3D::start_latitude
protected

Starting latitude of the simualted area.

Definition at line 204 of file woss-gmmobility-3d.h.

◆ start_longitude

double WossGMMob3D::start_longitude
protected

Starting longitude of the simualted area.

Definition at line 206 of file woss-gmmobility-3d.h.

◆ start_x

double WossGMMob3D::start_x
protected

Internal variable.

Definition at line 208 of file woss-gmmobility-3d.h.

◆ start_y

double WossGMMob3D::start_y
protected

Internal variable.

Definition at line 210 of file woss-gmmobility-3d.h.

◆ update_timer_position

UpdateTimerPosition WossGMMob3D::update_timer_position
protected

An object of UpdateTimerPosition class.

Definition at line 222 of file woss-gmmobility-3d.h.

◆ updateTime_

double WossGMMob3D::updateTime_
protected

Time between two update computation.

Definition at line 192 of file woss-gmmobility-3d.h.

◆ vx

double WossGMMob3D::vx

Definition at line 105 of file woss-gmmobility-3d.h.

◆ vy

double WossGMMob3D::vy

Definition at line 105 of file woss-gmmobility-3d.h.

◆ vz

double WossGMMob3D::vz

new velocity of a node respectively in x-axis, y-axis and z-axis.

Definition at line 105 of file woss-gmmobility-3d.h.

◆ wossgm_debug_

int WossGMMob3D::wossgm_debug_
protected

Debug flag.

Definition at line 200 of file woss-gmmobility-3d.h.

◆ x_coord

double WossGMMob3D::x_coord

Definition at line 106 of file woss-gmmobility-3d.h.

◆ xFieldWidth_

double WossGMMob3D::xFieldWidth_
protected

Range of the x-axis of the field to be simulated.

Definition at line 167 of file woss-gmmobility-3d.h.

◆ y_coord

double WossGMMob3D::y_coord

Definition at line 106 of file woss-gmmobility-3d.h.

◆ yFieldWidth_

double WossGMMob3D::yFieldWidth_
protected

Range of the y-axis of the field to be simulated.

Definition at line 169 of file woss-gmmobility-3d.h.

◆ z_coord

double WossGMMob3D::z_coord

Previous position of the node.

Definition at line 106 of file woss-gmmobility-3d.h.

◆ zFieldWidth_

double WossGMMob3D::zFieldWidth_
protected

Range of the z-axis of the field to be simulated.

Definition at line 171 of file woss-gmmobility-3d.h.

◆ zmin_

double WossGMMob3D::zmin_
protected

Minimum z-axis value.

Definition at line 218 of file woss-gmmobility-3d.h.


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