A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
constant-acceleration-mobility-model.h
Go to the documentation of this file.
1
/*
2
* SPDX-License-Identifier: GPL-2.0-only
3
*
4
* Author: Gustavo Carneiro <gjc@inescporto.pt>
5
*/
6
#ifndef CONSTANT_ACCELERATION_MOBILITY_MODEL_H
7
#define CONSTANT_ACCELERATION_MOBILITY_MODEL_H
8
9
#include "
mobility-model.h
"
10
11
#include "ns3/nstime.h"
12
13
namespace
ns3
14
{
15
16
/**
17
* \ingroup mobility
18
*
19
* \brief Mobility model for which the current acceleration does not change once it has been set and
20
* until it is set again explicitly to a new value.
21
*/
22
class
ConstantAccelerationMobilityModel
:
public
MobilityModel
23
{
24
public
:
25
/**
26
* Register this type with the TypeId system.
27
* \return the object TypeId
28
*/
29
static
TypeId
GetTypeId
();
30
/**
31
* Create position located at coordinates (0,0,0) with
32
* speed (0,0,0).
33
*/
34
ConstantAccelerationMobilityModel
();
35
~ConstantAccelerationMobilityModel
()
override
;
36
/**
37
* Set the model's velocity and acceleration
38
* \param velocity the velocity (m/s)
39
* \param acceleration the acceleration (m/s^2)
40
*/
41
void
SetVelocityAndAcceleration
(
const
Vector& velocity,
const
Vector& acceleration);
42
43
private
:
44
Vector
DoGetPosition
()
const override
;
45
void
DoSetPosition
(
const
Vector& position)
override
;
46
Vector
DoGetVelocity
()
const override
;
47
48
Time
m_baseTime
;
//!< the base time
49
Vector
m_basePosition
;
//!< the base position
50
Vector
m_baseVelocity
;
//!< the base velocity
51
Vector
m_acceleration
;
//!< the acceleration
52
};
53
54
}
// namespace ns3
55
56
#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:23
ns3::ConstantAccelerationMobilityModel::SetVelocityAndAcceleration
void SetVelocityAndAcceleration(const Vector &velocity, const Vector &acceleration)
Set the model's velocity and acceleration.
Definition
constant-acceleration-mobility-model.cc:62
ns3::ConstantAccelerationMobilityModel::GetTypeId
static TypeId GetTypeId()
Register this type with the TypeId system.
Definition
constant-acceleration-mobility-model.cc:16
ns3::ConstantAccelerationMobilityModel::m_basePosition
Vector m_basePosition
the base position
Definition
constant-acceleration-mobility-model.h:49
ns3::ConstantAccelerationMobilityModel::DoSetPosition
void DoSetPosition(const Vector &position) override
Definition
constant-acceleration-mobility-model.cc:53
ns3::ConstantAccelerationMobilityModel::~ConstantAccelerationMobilityModel
~ConstantAccelerationMobilityModel() override
Definition
constant-acceleration-mobility-model.cc:29
ns3::ConstantAccelerationMobilityModel::ConstantAccelerationMobilityModel
ConstantAccelerationMobilityModel()
Create position located at coordinates (0,0,0) with speed (0,0,0).
Definition
constant-acceleration-mobility-model.cc:25
ns3::ConstantAccelerationMobilityModel::m_acceleration
Vector m_acceleration
the acceleration
Definition
constant-acceleration-mobility-model.h:51
ns3::ConstantAccelerationMobilityModel::DoGetPosition
Vector DoGetPosition() const override
Definition
constant-acceleration-mobility-model.cc:43
ns3::ConstantAccelerationMobilityModel::m_baseTime
Time m_baseTime
the base time
Definition
constant-acceleration-mobility-model.h:48
ns3::ConstantAccelerationMobilityModel::DoGetVelocity
Vector DoGetVelocity() const override
Definition
constant-acceleration-mobility-model.cc:34
ns3::ConstantAccelerationMobilityModel::m_baseVelocity
Vector m_baseVelocity
the base velocity
Definition
constant-acceleration-mobility-model.h:50
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition
mobility-model.h:29
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
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 Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0