40#ifndef _UWGAUSSMARKOVMOBMODEL_
41#define _UWGAUSSMARKOVMOBMODEL_
45#define sgn(x) (((x) == 0.0) ? 0.0 : ((x) / fabs(x)))
46#define pi (4 * atan(1.0))
83 virtual int command(
int argc,
const char *
const *argv);
93 virtual double getX();
102 virtual double getY();
111 virtual double getZ();
152 virtual void update(
double now);
UwGMPosition class implements the Gauss Markov 3D mobility model.
virtual void update(double now)
Method that updates both the position coordinates as function of the number of states to be evaluated...
double Gaussian()
Method that returns a value from a normal random Gaussian variable (zero mean, unitary viariance)
double vx
Temporary variable.
double vz
Temporary variable.
virtual int command(int argc, const char *const *argv)
TCL command interpreter.
double alpha_
Parameter to be used to vary the randomness: 0: totally random values (Brownian motion),...
int debug_
Flag to enable or disable dirrefent levels of debug.
double speedMean_
Defines the mean value of the speed, when it is setted to zero the node moves anyway.
double pitchMean_
Mean value for the pitch.
double direction_
Current value of the direction.
virtual ~UwGMPosition()
Destructor of UwGMPosition class.
virtual double getX()
Returns the current projection of the node on the x-axis.
UwGMPosition()
Constructor of UwGMPosition class.
double directionMean_
Defines the mean value of the direction.
double yFieldWidth_
Range of the y-axis of the field to be simulated, in meters.
double nextUpdateTime_
Internal variable used to evaluate the steps to be computed.
virtual double getY()
Returns the current projection of the node on the y-axis.
double vy
Temporary variable.
virtual double getZ()
Returns the current projection of the node on the z-axis.
double speed_
Current value of the speed.
double xFieldWidth_
Range of the x-axis of the field to be simulated, in meters.
double zFieldWidth_
Range of the z-axis of the field to be simulated, in meters.
double updateTime_
Defines the behaviour of the node when it reaches the edge: SPHERIC: return in the simulation field o...
double pitch_
Current value of the pitch.
double alphaPitch_
Pitch of alpha variable.
BoundType
Defines the behaviour of the node when it reaches an edge of the simulation field.