A Discrete-Event Network Simulator
API
gauss-markov-mobility-model.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 Dan Broyles
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Dan Broyles <dbroyl01@ku.edu>
18  * Thanks to Kevin Peters, faculty advisor James P.G. Sterbenz, and the ResiliNets
19  * initiative at The University of Kansas, https://resilinets.org
20  */
21 #ifndef GAUSS_MARKOV_MOBILITY_MODEL_H
22 #define GAUSS_MARKOV_MOBILITY_MODEL_H
23 
24 #include "box.h"
26 #include "mobility-model.h"
27 #include "position-allocator.h"
28 
29 #include "ns3/event-id.h"
30 #include "ns3/nstime.h"
31 #include "ns3/object.h"
32 #include "ns3/ptr.h"
33 #include "ns3/random-variable-stream.h"
34 
35 namespace ns3
36 {
37 
82 {
83  public:
88  static TypeId GetTypeId();
90 
91  private:
95  void Start();
100  void DoWalk(Time timeLeft);
101  void DoDispose() override;
102  Vector DoGetPosition() const override;
103  void DoSetPosition(const Vector& position) override;
104  Vector DoGetVelocity() const override;
105  int64_t DoAssignStreams(int64_t) override;
108  double m_alpha;
109  double m_meanVelocity;
111  double m_meanPitch;
112  double m_Velocity;
113  double m_Direction;
114  double m_Pitch;
123 };
124 
125 } // namespace ns3
126 
127 #endif /* GAUSS_MARKOV_MOBILITY_MODEL_H */
a 3d box
Definition: box.h:35
Utility class used to move node with constant velocity.
An identifier for simulation events.
Definition: event-id.h:55
Ptr< NormalRandomVariable > m_normalDirection
Gaussian rv for next direction value.
void DoDispose() override
Destructor implementation.
Ptr< NormalRandomVariable > m_normalPitch
Gaussian rv for next pitch.
void Start()
Initialize the model and calculate new velocity, direction, and pitch.
void DoWalk(Time timeLeft)
Perform a walk operation.
double m_meanVelocity
current mean velocity
double m_meanDirection
current mean direction
static TypeId GetTypeId()
Register this type with the TypeId system.
Ptr< NormalRandomVariable > m_normalVelocity
Gaussian rv used to for next velocity.
EventId m_event
event id of scheduled start
ConstantVelocityHelper m_helper
constant velocity helper
int64_t DoAssignStreams(int64_t) override
The default implementation does nothing but return the passed-in parameter.
Ptr< RandomVariableStream > m_rndMeanPitch
rv used to assign avg.
Ptr< RandomVariableStream > m_rndMeanVelocity
rv used to assign avg velocity
void DoSetPosition(const Vector &position) override
Ptr< RandomVariableStream > m_rndMeanDirection
rv used to assign avg direction
double m_alpha
tunable constant in the model
Time m_timeStep
duraiton after which direction and speed should change
Keep track of the current position and velocity of an object.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.