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

Fixed geocentric mobility model whose generic position is ECEF. More...

#include "geocentric-ecef-mobility-model.h"

Inheritance diagram for ns3::GeocentricEcefMobilityModel:
Collaboration diagram for ns3::GeocentricEcefMobilityModel:

Public Member Functions

 GeocentricEcefMobilityModel ()=default
 Create a geocentric ECEF mobility model.
 ~GeocentricEcefMobilityModel () override=default
 Destructor.
Public Member Functions inherited from ns3::GeocentricConstantPositionMobilityModel
 GeocentricConstantPositionMobilityModel ()=default
 Create a position located at coordinates (0,0,0).
 ~GeocentricConstantPositionMobilityModel () override=default
Ptr< MobilityModelCopy () const override
 Copy function allows one to copy the underlying MobilityModel from a MobilityModel pointer, by calling each children Copy implementation.
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 ()
 Caller graph was not generated because of its size.
 ~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 final
 Get the most derived TypeId for this Object.
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
template<typename T>
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) 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.
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.
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::GeocentricConstantPositionMobilityModel
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

Vector DoGetPosition () const override
 Override to return ECEF coordinates instead of ENU.

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

Fixed geocentric mobility model whose generic position is ECEF.

This class adapts GeocentricConstantPositionMobilityModel for NTN scenarios where fixed ground nodes and satellite nodes must report positions in the same coordinate frame through the generic MobilityModel API.

GeocentricConstantPositionMobilityModel provides GetGeocentricPosition() for ECEF (Earth-Centered Earth-Fixed) coordinates, but its GetPosition() reports the local topocentric/ENU (East-North-Up) position. LEO satellite mobility models report ECEF coordinates from GetPosition(). Some NR, 3GPP propagation, spectrum, and antenna geometry code queries nodes only through MobilityModel::GetPosition(), so changing those call sites to use GetGeocentricPosition() would require broader API changes.

GeocentricEcefMobilityModel therefore overrides DoGetPosition() so GetPosition() returns the same ECEF coordinates as GetGeocentricPosition(), while retaining the geographic and geocentric accessors from the parent class.

Internal:
TODO: Consider if a unified units/coordinate system framework could eliminate the need for specialized mobility model classes like this one by allowing positions to carry their coordinate system metadata.

Definition at line 43 of file geocentric-ecef-mobility-model.h.

Constructor & Destructor Documentation

◆ GeocentricEcefMobilityModel()

ns3::GeocentricEcefMobilityModel::GeocentricEcefMobilityModel ( )
default

Create a geocentric ECEF mobility model.

Referenced by GetTypeId().

Here is the caller graph for this function:

◆ ~GeocentricEcefMobilityModel()

ns3::GeocentricEcefMobilityModel::~GeocentricEcefMobilityModel ( )
overridedefault

Destructor.

Member Function Documentation

◆ DoGetPosition()

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

Override to return ECEF coordinates instead of ENU.

Returns
the position in ECEF (Earth-Centered Earth-Fixed) coordinates

This overrides the parent class's DoGetPosition() which returns ENU coordinates. Instead, this returns the same ECEF coordinates as DoGetGeocentricPosition().

Reimplemented from ns3::GeocentricConstantPositionMobilityModel.

Definition at line 31 of file geocentric-ecef-mobility-model.cc.

References ns3::GeocentricConstantPositionMobilityModel::GetGeocentricPosition(), and NS_LOG_FUNCTION.

Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::GeocentricEcefMobilityModel::GetTypeId ( )
static

Register this type with the TypeId system.

Returns
the object TypeId

Definition at line 21 of file geocentric-ecef-mobility-model.cc.

References ns3::GeocentricConstantPositionMobilityModel::GeocentricConstantPositionMobilityModel(), GeocentricEcefMobilityModel(), and ns3::TypeId::SetParent().

Here is the call graph for this function:

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