A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::GeocentricConstantPositionMobilityModel Class Reference

Mobility model using geocentric euclidean coordinates, as defined in 38.811 chapter 6.3. More...

#include "geocentric-constant-position-mobility-model.h"

+ Inheritance diagram for ns3::GeocentricConstantPositionMobilityModel:
+ Collaboration diagram for ns3::GeocentricConstantPositionMobilityModel:

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< ObjectGetObject () 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< ObjectGetObject (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.
 
SimpleRefCountoperator= (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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GeocentricConstantPositionMobilityModel()

ns3::GeocentricConstantPositionMobilityModel::GeocentricConstantPositionMobilityModel ( )
default

Create a position located at coordinates (0,0,0)

◆ ~GeocentricConstantPositionMobilityModel()

ns3::GeocentricConstantPositionMobilityModel::~GeocentricConstantPositionMobilityModel ( )
overridedefault

Member Function Documentation

◆ DoGetCoordinateTranslationReferencePoint()

Vector ns3::GeocentricConstantPositionMobilityModel::DoGetCoordinateTranslationReferencePoint ( ) const
privatevirtual

Get the reference point for coordinate conversion.

Returns
Vector containing geographic reference point (meter)

Definition at line 225 of file geocentric-constant-position-mobility-model.cc.

References m_geographicReferencePoint.

Referenced by GetCoordinateTranslationReferencePoint().

+ Here is the caller graph for this function:

◆ DoGetDistanceFrom()

double ns3::GeocentricConstantPositionMobilityModel::DoGetDistanceFrom ( Ptr< const GeocentricConstantPositionMobilityModel > other) const
private

Parameters
othera reference to another mobility model
Returns
the distance between the two objects. Unit is meters.

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoGetElevationAngle()

double ns3::GeocentricConstantPositionMobilityModel::DoGetElevationAngle ( Ptr< const GeocentricConstantPositionMobilityModel > other)
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.

Parameters
otherpointer to the HAPS/satellite mobility model
Returns
the elevation angle in degrees

Definition at line 192 of file geocentric-constant-position-mobility-model.cc.

References DoGetGeocentricPosition().

Referenced by GetElevationAngle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoGetGeocentricPosition()

Vector ns3::GeocentricConstantPositionMobilityModel::DoGetGeocentricPosition ( ) const
privatevirtual

Get the position using Geocentric Cartesian coordinates.

Returns
Vector containing (x, y, z) (meter) 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoGetGeographicPosition()

Vector ns3::GeocentricConstantPositionMobilityModel::DoGetGeographicPosition ( ) const
privatevirtual

Get the position using geographic (geodetic) coordinates.

Returns
Vector containing (latitude (degree), longitude (degree), altitude (meter))

Definition at line 152 of file geocentric-constant-position-mobility-model.cc.

References m_position.

Referenced by GetGeographicPosition().

+ Here is the caller graph for this function:

◆ DoGetPosition()

Vector ns3::GeocentricConstantPositionMobilityModel::DoGetPosition ( ) const
overrideprivatevirtual

Returns
the current position

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoGetVelocity()

Vector ns3::GeocentricConstantPositionMobilityModel::DoGetVelocity ( ) const
overrideprivatevirtual

Returns
the current velocity.

Implements ns3::MobilityModel.

Definition at line 231 of file geocentric-constant-position-mobility-model.cc.

◆ DoSetCoordinateTranslationReferencePoint()

void ns3::GeocentricConstantPositionMobilityModel::DoSetCoordinateTranslationReferencePoint ( const Vector & refPoint)
privatevirtual

Set the reference point for coordinate conversion.

Parameters
refPointvector containing the geographic reference point (meter)

Definition at line 218 of file geocentric-constant-position-mobility-model.cc.

References m_geographicReferencePoint.

Referenced by SetCoordinateTranslationReferencePoint().

+ Here is the caller graph for this function:

◆ DoSetGeocentricPosition()

void ns3::GeocentricConstantPositionMobilityModel::DoSetGeocentricPosition ( const Vector & position)
privatevirtual

Set the position using Geocentric Cartesian coordinates.

Parameters
positionpointer 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoSetGeographicPosition()

void ns3::GeocentricConstantPositionMobilityModel::DoSetGeographicPosition ( const Vector & latLonAlt)
privatevirtual

Set the position using geographic coordinates.

Sets the position, using geographic coordinates and asserting that the provided parameter falls within the appropriate range.

Parameters
latLonAltpointer 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoSetPosition()

void ns3::GeocentricConstantPositionMobilityModel::DoSetPosition ( const Vector & position)
overrideprivatevirtual

Parameters
positionthe 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCoordinateTranslationReferencePoint()

Vector ns3::GeocentricConstantPositionMobilityModel::GetCoordinateTranslationReferencePoint ( ) const
virtual

Get the reference point for coordinate conversion.

Returns
Vector containing geographic reference point (meter)

Definition at line 90 of file geocentric-constant-position-mobility-model.cc.

References DoGetCoordinateTranslationReferencePoint().

+ Here is the call graph for this function:

◆ GetDistanceFrom()

double ns3::GeocentricConstantPositionMobilityModel::GetDistanceFrom ( Ptr< const GeocentricConstantPositionMobilityModel > other) const
Parameters
othera reference to another mobility model
Returns
the distance between the two objects. Unit is meters.

Definition at line 108 of file geocentric-constant-position-mobility-model.cc.

References DoGetDistanceFrom().

+ Here is the call graph for this function:

◆ GetElevationAngle()

double ns3::GeocentricConstantPositionMobilityModel::GetElevationAngle ( Ptr< const GeocentricConstantPositionMobilityModel > other)
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.

Parameters
otherpointer to the HAPS/satellite mobility model
Returns
the elevation angle in degrees

Definition at line 76 of file geocentric-constant-position-mobility-model.cc.

References DoGetElevationAngle().

+ Here is the call graph for this function:

◆ GetGeocentricPosition()

Vector ns3::GeocentricConstantPositionMobilityModel::GetGeocentricPosition ( ) const
virtual

Get the position using Geocentric Cartesian coordinates.

Returns
Vector containing (x, y, z) (meter) coordinates

Definition at line 64 of file geocentric-constant-position-mobility-model.cc.

References DoGetGeocentricPosition().

+ Here is the call graph for this function:

◆ GetGeographicPosition()

Vector ns3::GeocentricConstantPositionMobilityModel::GetGeographicPosition ( ) const
virtual

Get the position using geographic (geodetic) coordinates.

Returns
Vector containing (latitude (degree), longitude (degree), altitude (meter))

Definition at line 52 of file geocentric-constant-position-mobility-model.cc.

References DoGetGeographicPosition().

+ Here is the call graph for this function:

◆ GetPosition()

Vector ns3::GeocentricConstantPositionMobilityModel::GetPosition ( ) const
virtual
Returns
the current position

Definition at line 96 of file geocentric-constant-position-mobility-model.cc.

References DoGetPosition().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::GeocentricConstantPositionMobilityModel::GetTypeId ( )
static

Register this type with the TypeId system.

Returns
the object TypeId

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().

+ Here is the call graph for this function:

◆ SetCoordinateTranslationReferencePoint()

void ns3::GeocentricConstantPositionMobilityModel::SetCoordinateTranslationReferencePoint ( const Vector & refPoint)
virtual

Set the reference point for coordinate conversion.

Parameters
refPointvector containing the geographic reference point (meter)

Definition at line 83 of file geocentric-constant-position-mobility-model.cc.

References DoSetCoordinateTranslationReferencePoint().

+ Here is the call graph for this function:

◆ SetGeocentricPosition()

void ns3::GeocentricConstantPositionMobilityModel::SetGeocentricPosition ( const Vector & position)
virtual

Set the position using Geocentric Cartesian coordinates.

Parameters
positionpointer to a Vector containing (x, y, z) (meter) coordinates

Definition at line 70 of file geocentric-constant-position-mobility-model.cc.

References DoSetGeocentricPosition().

+ Here is the call graph for this function:

◆ SetGeographicPosition()

void ns3::GeocentricConstantPositionMobilityModel::SetGeographicPosition ( const Vector & latLonAlt)
virtual

Set the position using geographic coordinates.

Sets the position, using geographic coordinates and asserting that the provided parameter falls within the appropriate range.

Parameters
latLonAltpointer 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().

+ Here is the call graph for this function:

◆ SetPosition()

void ns3::GeocentricConstantPositionMobilityModel::SetPosition ( const Vector & position)
virtual
Parameters
positionthe position to set.

Definition at line 102 of file geocentric-constant-position-mobility-model.cc.

References DoSetPosition().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_geographicReferencePoint

Vector ns3::GeocentricConstantPositionMobilityModel::m_geographicReferencePoint {0, 0, 0}
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().

◆ m_position

Vector ns3::GeocentricConstantPositionMobilityModel::m_position {0, 0, 0}
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().


The documentation for this class was generated from the following files: