40#ifndef _WOSS_GROUPMOBMODEL_3D_
41#define _WOSS_GROUPMOBMODEL_3D_
45#include "uw-woss-position.h"
50#define sgn(x) ( ((x)==0.0) ? 0.0 : ((x)/fabs(x)) )
51#define pi (4*atan(1.0))
52#define earth_radius 6371000.0
122 virtual int command(
int argc,
const char*
const* argv);
146 virtual void schedule(
double val) { resched(val); }
150 virtual void expire(Event* e);
173 double distance(WossPosition* pos1, WossPosition* pos2);
181 double mirror_posx(
double x_coord_node,
double x_coord_leader);
189 double mirror_posy(
double y_coord_node,
double y_coord_leader);
197 double mirror_posz(
double z_coord_node,
double z_coord_leader);
Base class of UpdateTimerPosition class which is inherited from TimerHandler class.
virtual ~UpdatePositionTimer()
Destructor of UpdateTimerPosition class.
UpdatePositionTimer(WossGroupMob3D *mo)
Constructor of UpdateTimerPosition class.
virtual void schedule(double val)
Update Time is scheduled using this method.
WossGroupMob3D * mod
An Object pointer of WossGroupMob3D class.
virtual void expire(Event *e)
This method tell the node what to do when update timer expire.
Base class of Group Mobility Model.
double vz
new velocity of a node respectively in x-axis, y-axis and z-axis.
double alpha_
Parameter to be used to vary the randomness.
double eta_
A tunable variable which is the coefficient of the filter in that range between 0 and 1.
double mirror_posz(double z_coord_node, double z_coord_leader)
Approximate position at z-axis.
virtual void setLong(double x_coord, double y_coord)
Method that sets the longitude of the node after update.
double galpha_
It tells the intensity of the attraction filed.
double start_x
Internal variable.
string gm3dGroupTraceFile
Trace file information.
int maddr
Mac address of the node whose movement we would like to trace.
double speedM_
Mean of the speed which is used to compute a Gaussian random variable.
virtual void setLat(double x_coord, double y_coord)
Method that sets the latitude of the node after update.
UpdatePositionTimer update_position_timer
An object of UpdateTimerPosition class.
int wossgroup_debug_
Debug flag.
double updateTime_
Time between two update computation.
virtual double getStartX()
Method that return the starting projection of the node on the cartesian x-axis.
WossGroupMob3D()
Constructor of WossGroupMob3D class.
double pitchMean_
Defines the mean value of the shifting in z-axis.
virtual double getStartY()
Method that return the starting projection of the node on the cartesian y-axis.
double zmin_
Minimum z-axis value.
double speedMean_
Defines the mean value of the speed.
double newz
new position of a node respectively in x-axis, y-axis and z-axis.
double pitch_
Current value of the pitch.
virtual ~WossGroupMob3D()
Destructor of WossGroupMob3D class.
double leaderCharge_
Attraction charge of the leader.
double zFieldWidth_
Range of the z-axis of the field to be simulated.
double start_longitude
Starting longitude of the simualted area.
int count
A counting variable.
double Gaussian()
Method that returns a value from a normal random Gaussian variable (zero mean, unitary viariance)
double start_latitude
Starting latitude of the simualted area.
virtual double getCharge()
Attraction charge to the leader.
WossPosition * leader_
Position pointer of the leader.
BoundType
Defines the behaviour of the node when it reaches an edge of the simulation field.
double mirror_posy(double y_coord_node, double y_coord_leader)
Approximate position at y-axis.
virtual void update()
Method that updates both the position coordinates as function of the number of states to be evaluated...
double direction_
Current value of the direction.
double speedS_
Standard deviation of speed which is also used to compute a Gaussian random variable.
double mirror_posx(double x_coord_node, double x_coord_leader)
Approximate position at x-axis.
BoundType bound_
Defines the behaviour of the node when it reaches the edge.
int mtrace_
Flag to enable trace.
virtual int command(int argc, const char *const *argv)
TCL command intepreter.
double directionMean_
Defines the mean value of the direction.
double yFieldWidth_
Range of the y-axis of the field to be simulated.
double z_coord
position of the node.
double start_y
Internal variable.
double beta_
A variable which is employed to calculate attraction force towards the leader.
double xFieldWidth_
Range of the x-axis of the field to be simulated.
double sigmaPitch_
Standard deviation in the z-axis.
double distance(WossPosition *pos1, WossPosition *pos2)
Calculate the distance between two nodes.
double charge_
Attraction charge of the follower.
int mtrace_of_node_
The node whose movement pattern we want to trace.
double speed_
Current value of the speed.