Mobility model using geocentric euclidean coordinates, as defined in 38.811 chapter 6.3. More...
#include "geocentric-constant-position-mobility-model.h"
Public Member Functions | |
GeocentricConstantPositionMobilityModel ()=default | |
Create a position located at coordinates (0,0,0) | |
~GeocentricConstantPositionMobilityModel () override=default | |
virtual Vector | GetCoordinateTranslationReferencePoint () const |
Get the reference point for coordinate conversion. | |
double | GetDistanceFrom (Ptr< const GeocentricConstantPositionMobilityModel > other) const |
virtual double | GetElevationAngle (Ptr< const GeocentricConstantPositionMobilityModel > other) |
Computes elevation angle between a ground terminal and a HAPS/Satellite. | |
virtual Vector | GetGeocentricPosition () const |
Get the position using Geocentric Cartesian coordinates. | |
virtual Vector | GetGeographicPosition () const |
Get the position using geographic (geodetic) coordinates. | |
virtual Vector | GetPosition () const |
virtual void | SetCoordinateTranslationReferencePoint (const Vector &refPoint) |
Set the reference point for coordinate conversion. | |
virtual void | SetGeocentricPosition (const Vector &position) |
Set the position using Geocentric Cartesian coordinates. | |
virtual void | SetGeographicPosition (const Vector &latLonAlt) |
Set the position using geographic coordinates. | |
virtual void | SetPosition (const Vector &position) |
Public Member Functions inherited from ns3::MobilityModel | |
MobilityModel () | |
~MobilityModel () override=0 | |
int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. | |
double | GetDistanceFrom (Ptr< const MobilityModel > position) const |
Vector | GetPosition () const |
Vector | GetPositionWithReference (const Vector &referencePosition) const |
This method may be used if the position returned may depend on some reference position provided. | |
double | GetRelativeSpeed (Ptr< const MobilityModel > other) const |
Vector | GetVelocity () const |
void | SetPosition (const Vector &position) |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Register this type with the TypeId system. | |
Static Public Member Functions inherited from ns3::MobilityModel | |
static TypeId | GetTypeId () |
Register this type with the TypeId system. | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. | |
Private Member Functions | |
virtual Vector | DoGetCoordinateTranslationReferencePoint () const |
Get the reference point for coordinate conversion. | |
double | DoGetDistanceFrom (Ptr< const GeocentricConstantPositionMobilityModel > other) const |
virtual double | DoGetElevationAngle (Ptr< const GeocentricConstantPositionMobilityModel > other) |
Computes elevation angle between a ground terminal and a HAPS/Satellite. | |
virtual Vector | DoGetGeocentricPosition () const |
Get the position using Geocentric Cartesian coordinates. | |
virtual Vector | DoGetGeographicPosition () const |
Get the position using geographic (geodetic) coordinates. | |
Vector | DoGetPosition () const override |
Vector | DoGetVelocity () const override |
virtual void | DoSetCoordinateTranslationReferencePoint (const Vector &refPoint) |
Set the reference point for coordinate conversion. | |
virtual void | DoSetGeocentricPosition (const Vector &position) |
Set the position using Geocentric Cartesian coordinates. | |
virtual void | DoSetGeographicPosition (const Vector &latLonAlt) |
Set the position using geographic coordinates. | |
void | DoSetPosition (const Vector &position) override |
Private Attributes | |
Vector | m_geographicReferencePoint {0, 0, 0} |
This is the point (meter) taken as a reference for converting from geographic to topographic (also referred to as planar Cartesian) | |
Vector | m_position {0, 0, 0} |
the constant Geographic position,, in order: latitude (degree), longitude (degree), altitude (meter). | |
Additional Inherited Members | |
Public Types inherited from ns3::MobilityModel | |
typedef void(* | TracedCallback) (Ptr< const MobilityModel > model) |
TracedCallback signature. | |
Protected Member Functions inherited from ns3::MobilityModel | |
void | NotifyCourseChange () const |
Must be invoked by subclasses when the course of the position changes to notify course change listeners. | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoDispose () |
Destructor implementation. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
Mobility model using geocentric euclidean coordinates, as defined in 38.811 chapter 6.3.
Definition at line 26 of file geocentric-constant-position-mobility-model.h.
|
default |
Create a position located at coordinates (0,0,0)
|
overridedefault |
|
privatevirtual |
Get the reference point for coordinate conversion.
Definition at line 225 of file geocentric-constant-position-mobility-model.cc.
References m_geographicReferencePoint.
Referenced by GetCoordinateTranslationReferencePoint().
|
private |
other | a reference to another mobility model |
Definition at line 136 of file geocentric-constant-position-mobility-model.cc.
References ns3::GeographicPositions::GeographicToCartesianCoordinates(), m_position, and ns3::GeographicPositions::SPHERE.
Referenced by GetDistanceFrom().
|
privatevirtual |
Computes elevation angle between a ground terminal and a HAPS/Satellite.
After calculating the plane perpendicular to a cartesian position vector, the elevation angle is calculated using https://www.w3schools.blog/angle-between-a-line-and-a-plane. The altitude of the position passed as a parameter must be higher than that of the reference point.
other | pointer to the HAPS/satellite mobility model |
Definition at line 192 of file geocentric-constant-position-mobility-model.cc.
References DoGetGeocentricPosition().
Referenced by GetElevationAngle().
|
privatevirtual |
Get the position using Geocentric Cartesian coordinates.
Definition at line 171 of file geocentric-constant-position-mobility-model.cc.
References ns3::GeographicPositions::GeographicToCartesianCoordinates(), m_position, and ns3::GeographicPositions::SPHERE.
Referenced by DoGetElevationAngle(), and GetGeocentricPosition().
|
privatevirtual |
Get the position using geographic (geodetic) coordinates.
Definition at line 152 of file geocentric-constant-position-mobility-model.cc.
References m_position.
Referenced by GetGeographicPosition().
|
overrideprivatevirtual |
Implements ns3::MobilityModel.
Definition at line 115 of file geocentric-constant-position-mobility-model.cc.
References ns3::GeographicPositions::GeographicToTopocentricCoordinates(), m_geographicReferencePoint, m_position, and ns3::GeographicPositions::SPHERE.
Referenced by GetPosition().
|
overrideprivatevirtual |
Implements ns3::MobilityModel.
Definition at line 231 of file geocentric-constant-position-mobility-model.cc.
|
privatevirtual |
Set the reference point for coordinate conversion.
refPoint | vector containing the geographic reference point (meter) |
Definition at line 218 of file geocentric-constant-position-mobility-model.cc.
References m_geographicReferencePoint.
Referenced by SetCoordinateTranslationReferencePoint().
|
privatevirtual |
Set the position using Geocentric Cartesian coordinates.
position | pointer to a Vector containing (x, y, z) (meter) coordinates |
Definition at line 182 of file geocentric-constant-position-mobility-model.cc.
References ns3::GeographicPositions::CartesianToGeographicCoordinates(), m_position, ns3::MobilityModel::NotifyCourseChange(), and ns3::GeographicPositions::SPHERE.
Referenced by SetGeocentricPosition().
|
privatevirtual |
Set the position using geographic coordinates.
Sets the position, using geographic coordinates and asserting that the provided parameter falls within the appropriate range.
latLonAlt | pointer to a Vector containing (latitude (degree), longitude (degree), altitude (meter)). The values are expected to be in the ranges [-90, 90], [-180, 180], [0, +inf[, respectively. These assumptions are enforced with an assert for the latitude and the altitude, while the longitude is normalized to the expected range. |
Definition at line 158 of file geocentric-constant-position-mobility-model.cc.
References m_position, ns3::MobilityModel::NotifyCourseChange(), NS_ASSERT_MSG, and ns3::WrapTo180().
Referenced by SetGeographicPosition().
|
overrideprivatevirtual |
position | the position to set. |
Implements ns3::MobilityModel.
Definition at line 125 of file geocentric-constant-position-mobility-model.cc.
References m_geographicReferencePoint, m_position, ns3::MobilityModel::NotifyCourseChange(), ns3::GeographicPositions::SPHERE, and ns3::GeographicPositions::TopocentricToGeographicCoordinates().
Referenced by SetPosition().
|
virtual |
Get the reference point for coordinate conversion.
Definition at line 90 of file geocentric-constant-position-mobility-model.cc.
References DoGetCoordinateTranslationReferencePoint().
double ns3::GeocentricConstantPositionMobilityModel::GetDistanceFrom | ( | Ptr< const GeocentricConstantPositionMobilityModel > | other | ) | const |
other | a reference to another mobility model |
Definition at line 108 of file geocentric-constant-position-mobility-model.cc.
References DoGetDistanceFrom().
|
virtual |
Computes elevation angle between a ground terminal and a HAPS/Satellite.
After calculating the plane perpendicular to a cartesian position vector, the elevation angle is calculated using https://www.w3schools.blog/angle-between-a-line-and-a-plane. The altitude of the position passed as a parameter must be higher than that of the reference point.
other | pointer to the HAPS/satellite mobility model |
Definition at line 76 of file geocentric-constant-position-mobility-model.cc.
References DoGetElevationAngle().
|
virtual |
Get the position using Geocentric Cartesian coordinates.
Definition at line 64 of file geocentric-constant-position-mobility-model.cc.
References DoGetGeocentricPosition().
|
virtual |
Get the position using geographic (geodetic) coordinates.
Definition at line 52 of file geocentric-constant-position-mobility-model.cc.
References DoGetGeographicPosition().
|
virtual |
Definition at line 96 of file geocentric-constant-position-mobility-model.cc.
References DoGetPosition().
|
static |
Register this type with the TypeId system.
Definition at line 26 of file geocentric-constant-position-mobility-model.cc.
References m_geographicReferencePoint, m_position, ns3::MakeVector3DAccessor(), ns3::MakeVector3DChecker(), and ns3::TypeId::SetParent().
|
virtual |
Set the reference point for coordinate conversion.
refPoint | vector containing the geographic reference point (meter) |
Definition at line 83 of file geocentric-constant-position-mobility-model.cc.
References DoSetCoordinateTranslationReferencePoint().
|
virtual |
Set the position using Geocentric Cartesian coordinates.
position | pointer to a Vector containing (x, y, z) (meter) coordinates |
Definition at line 70 of file geocentric-constant-position-mobility-model.cc.
References DoSetGeocentricPosition().
|
virtual |
Set the position using geographic coordinates.
Sets the position, using geographic coordinates and asserting that the provided parameter falls within the appropriate range.
latLonAlt | pointer to a Vector containing (latitude (degree), longitude (degree), altitude (meter)). The values are expected to be in the ranges [-90, 90], [-180, 180], [0, +inf[, respectively. These assumptions are enforced with an assert for the latitude and the altitude, while the longitude is normalized to the expected range. |
Definition at line 58 of file geocentric-constant-position-mobility-model.cc.
References DoSetGeographicPosition().
|
virtual |
position | the position to set. |
Definition at line 102 of file geocentric-constant-position-mobility-model.cc.
References DoSetPosition().
|
private |
This is the point (meter) taken as a reference for converting from geographic to topographic (also referred to as planar Cartesian)
Definition at line 146 of file geocentric-constant-position-mobility-model.h.
Referenced by DoGetCoordinateTranslationReferencePoint(), DoGetPosition(), DoSetCoordinateTranslationReferencePoint(), DoSetPosition(), and GetTypeId().
|
private |
the constant Geographic position,, in order: latitude (degree), longitude (degree), altitude (meter).
Definition at line 140 of file geocentric-constant-position-mobility-model.h.
Referenced by DoGetDistanceFrom(), DoGetGeocentricPosition(), DoGetGeographicPosition(), DoGetPosition(), DoSetGeocentricPosition(), DoSetGeographicPosition(), DoSetPosition(), and GetTypeId().