A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
33
class
ConstantAccelerationMobilityModel
:
public
MobilityModel
34
{
35
public
:
40
static
TypeId
GetTypeId
();
45
ConstantAccelerationMobilityModel
();
46
~ConstantAccelerationMobilityModel
()
override
;
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
59
Time
m_baseTime
;
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 */
ns3::ConstantAccelerationMobilityModel
Mobility model for which the current acceleration does not change once it has been set and until it i...
Definition:
constant-acceleration-mobility-model.h:34
ns3::ConstantAccelerationMobilityModel::SetVelocityAndAcceleration
void SetVelocityAndAcceleration(const Vector &velocity, const Vector &acceleration)
Set the model's velocity and acceleration.
Definition:
constant-acceleration-mobility-model.cc:73
ns3::ConstantAccelerationMobilityModel::GetTypeId
static TypeId GetTypeId()
Register this type with the TypeId system.
Definition:
constant-acceleration-mobility-model.cc:27
ns3::ConstantAccelerationMobilityModel::m_basePosition
Vector m_basePosition
the base position
Definition:
constant-acceleration-mobility-model.h:60
ns3::ConstantAccelerationMobilityModel::DoSetPosition
void DoSetPosition(const Vector &position) override
Definition:
constant-acceleration-mobility-model.cc:64
ns3::ConstantAccelerationMobilityModel::~ConstantAccelerationMobilityModel
~ConstantAccelerationMobilityModel() override
Definition:
constant-acceleration-mobility-model.cc:40
ns3::ConstantAccelerationMobilityModel::ConstantAccelerationMobilityModel
ConstantAccelerationMobilityModel()
Create position located at coordinates (0,0,0) with speed (0,0,0).
Definition:
constant-acceleration-mobility-model.cc:36
ns3::ConstantAccelerationMobilityModel::m_acceleration
Vector m_acceleration
the acceleration
Definition:
constant-acceleration-mobility-model.h:62
ns3::ConstantAccelerationMobilityModel::DoGetPosition
Vector DoGetPosition() const override
Definition:
constant-acceleration-mobility-model.cc:54
ns3::ConstantAccelerationMobilityModel::m_baseTime
Time m_baseTime
the base time
Definition:
constant-acceleration-mobility-model.h:59
ns3::ConstantAccelerationMobilityModel::DoGetVelocity
Vector DoGetVelocity() const override
Definition:
constant-acceleration-mobility-model.cc:45
ns3::ConstantAccelerationMobilityModel::m_baseVelocity
Vector m_baseVelocity
the base velocity
Definition:
constant-acceleration-mobility-model.h:61
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition:
mobility-model.h:40
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
mobility-model.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mobility
model
constant-acceleration-mobility-model.h
Generated on Sun Mar 3 2024 17:11:05 for ns-3 by
1.9.1