A Discrete-Event Network Simulator
API
constant-acceleration-mobility-model.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License version 2 as
4  * published by the Free Software Foundation;
5  *
6  * This program is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  * GNU General Public License for more details.
10  *
11  * You should have received a copy of the GNU General Public License
12  * along with this program; if not, write to the Free Software
13  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14  *
15  * Author: Gustavo Carneiro <gjc@inescporto.pt>
16  */
17 #ifndef CONSTANT_ACCELERATION_MOBILITY_MODEL_H
18 #define CONSTANT_ACCELERATION_MOBILITY_MODEL_H
19 
20 #include "mobility-model.h"
21 
22 #include "ns3/nstime.h"
23 
24 namespace ns3
25 {
26 
34 {
35  public:
40  static TypeId GetTypeId();
52  void SetVelocityAndAcceleration(const Vector& velocity, const Vector& acceleration);
53 
54  private:
55  Vector DoGetPosition() const override;
56  void DoSetPosition(const Vector& position) override;
57  Vector DoGetVelocity() const override;
58 
60  Vector m_basePosition;
61  Vector m_baseVelocity;
62  Vector m_acceleration;
63 };
64 
65 } // namespace ns3
66 
67 #endif /* CONSTANT_ACCELERATION_MOBILITY_MODEL_H */
Mobility model for which the current acceleration does not change once it has been set and until it i...
void SetVelocityAndAcceleration(const Vector &velocity, const Vector &acceleration)
Set the model's velocity and acceleration.
static TypeId GetTypeId()
Register this type with the TypeId system.
ConstantAccelerationMobilityModel()
Create position located at coordinates (0,0,0) with speed (0,0,0).
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.