Loading...
Searching...
No Matches
ns3::SatMobilityModel Class Referenceabstract

Keep track of the current position and velocity of an object in satellite network. More...

#include "satellite-mobility-model.h"

Inheritance diagram for ns3::SatMobilityModel:
Collaboration diagram for ns3::SatMobilityModel:

Public Types

typedef void(* CourseChangeCallback) (const Ptr< const SatMobilityModel > model)
 Callback signature for SatCourseChange trace source.

Public Member Functions

 SatMobilityModel ()
 Default constructor.
virtual ~SatMobilityModel ()=0
 Destructor for SatMobilityModel.
virtual Ptr< MobilityModel > Copy () const =0
 Copy function allows one to copy the underlying MobilityModel from a MobilityModel pointer, by calling each children Copy implementation.
double GetDistanceFrom (Ptr< const SatMobilityModel > position) const
GeoCoordinate GetGeoPosition (void) const
void NotifyGeoCourseChange (void) const
void SetGeoPosition (const GeoCoordinate &position)

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID.

Private Member Functions

virtual GeoCoordinate DoGetGeoPosition (void) const =0
virtual Vector DoGetPosition (void) const
void DoSetCartesianPosition (const Vector &position) const
 This method is used to force update of cartesian position.
virtual void DoSetGeoPosition (const GeoCoordinate &position)=0
virtual void DoSetPosition (const Vector &position)

Private Attributes

Vector m_cartesianPosition
bool m_cartesianPositionOutdated
bool m_GetAsGeoCoordinates
ns3::TracedCallback< Ptr< const SatMobilityModel > > m_satCourseChangeTrace
 Used to alert subscribers that a change in direction, velocity, or position has occurred.

Detailed Description

Keep track of the current position and velocity of an object in satellite network.

All space coordinates in this class and its subclasses are treated as geodetic coordinates. Support for setting and getting information in Cartesian coordinates also provided.

This is a base class for all satellite mobility models.

Definition at line 41 of file satellite-mobility-model.h.

Member Typedef Documentation

◆ CourseChangeCallback

typedef void(* ns3::SatMobilityModel::CourseChangeCallback) (const Ptr< const SatMobilityModel > model)

Callback signature for SatCourseChange trace source.

Parameters
modelthe SatMobilityModel which is changing course

Definition at line 91 of file satellite-mobility-model.h.

Constructor & Destructor Documentation

◆ SatMobilityModel()

ns3::SatMobilityModel::SatMobilityModel ( )

Default constructor.

Definition at line 61 of file satellite-mobility-model.cc.

References m_cartesianPositionOutdated, and m_GetAsGeoCoordinates.

Referenced by ns3::SatConstantPositionMobilityModel::GetTypeId(), ns3::SatSGP4MobilityModel::GetTypeId(), and ns3::SatTracedMobilityModel::GetTypeId().

Here is the caller graph for this function:

◆ ~SatMobilityModel()

ns3::SatMobilityModel::~SatMobilityModel ( )
pure virtual

Destructor for SatMobilityModel.

Definition at line 67 of file satellite-mobility-model.cc.

Member Function Documentation

◆ Copy()

virtual Ptr< MobilityModel > ns3::SatMobilityModel::Copy ( ) const
pure virtual

Copy function allows one to copy the underlying MobilityModel from a MobilityModel pointer, by calling each children Copy implementation.

This is primarily used by wraparound models for the spectrum channel.

Returns
a copy of the current mobility model

Implemented in ns3::SatConstantPositionMobilityModel, ns3::SatSGP4MobilityModel, and ns3::SatTracedMobilityModel.

◆ DoGetGeoPosition()

virtual GeoCoordinate ns3::SatMobilityModel::DoGetGeoPosition ( void ) const
privatepure virtual
Returns
the current position.

Concrete subclasses of this base class must implement this method.

Implemented in ns3::SatConstantPositionMobilityModel, ns3::SatSGP4MobilityModel, and ns3::SatTracedMobilityModel.

Referenced by DoGetPosition(), GetDistanceFrom(), and GetGeoPosition().

Here is the caller graph for this function:

◆ DoGetPosition()

Vector ns3::SatMobilityModel::DoGetPosition ( void ) const
privatevirtual
Returns
cartesian format position as vector

Implementation for method defined by MobilityModel

Reimplemented in ns3::SatSGP4MobilityModel, and ns3::SatTracedMobilityModel.

Definition at line 100 of file satellite-mobility-model.cc.

References DoGetGeoPosition(), DoSetCartesianPosition(), m_cartesianPosition, m_cartesianPositionOutdated, and ns3::GeoCoordinate::ToVector().

Here is the call graph for this function:

◆ DoSetCartesianPosition()

void ns3::SatMobilityModel::DoSetCartesianPosition ( const Vector & position) const
private

This method is used to force update of cartesian position.

Cartesian position is updated when position is set by method DoSetPosition. In case that position is updated by method DoSetGeoPosition cartesian position is updated only if it is requested by method DoGetPosition.

Parameters
positionposition in cartesian format to set

Definition at line 128 of file satellite-mobility-model.cc.

References m_cartesianPosition, and m_cartesianPositionOutdated.

Referenced by DoGetPosition().

Here is the caller graph for this function:

◆ DoSetGeoPosition()

virtual void ns3::SatMobilityModel::DoSetGeoPosition ( const GeoCoordinate & position)
privatepure virtual
Parameters
positionthe position to set.

Concrete subclasses of this base class must implement this method.

Implemented in ns3::SatConstantPositionMobilityModel, ns3::SatSGP4MobilityModel, and ns3::SatTracedMobilityModel.

Referenced by DoSetPosition(), and SetGeoPosition().

Here is the caller graph for this function:

◆ DoSetPosition()

void ns3::SatMobilityModel::DoSetPosition ( const Vector & position)
privatevirtual
Parameters
positionposition in Cartesian format to set

Implementation for method defined by MobilityModel

Reimplemented in ns3::SatSGP4MobilityModel, and ns3::SatTracedMobilityModel.

Definition at line 112 of file satellite-mobility-model.cc.

References DoSetGeoPosition(), m_cartesianPosition, m_cartesianPositionOutdated, and m_GetAsGeoCoordinates.

Here is the call graph for this function:

◆ GetDistanceFrom()

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

Definition at line 85 of file satellite-mobility-model.cc.

References DoGetGeoPosition(), and ns3::GeoCoordinate::ToVector().

Referenced by ns3::SatHandoverModule::GetNClosestSats().

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

◆ GetGeoPosition()

GeoCoordinate ns3::SatMobilityModel::GetGeoPosition ( void ) const
Returns
the current satellite position

Definition at line 72 of file satellite-mobility-model.cc.

References DoGetGeoPosition().

Referenced by GetTypeId().

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

◆ GetTypeId()

TypeId ns3::SatMobilityModel::GetTypeId ( void )
static

Get the type ID.

Returns
the object TypeId

Definition at line 36 of file satellite-mobility-model.cc.

References GetGeoPosition(), m_GetAsGeoCoordinates, m_satCourseChangeTrace, ns3::MakeGeoCoordinateChecker(), and SetGeoPosition().

Here is the call graph for this function:

◆ NotifyGeoCourseChange()

void ns3::SatMobilityModel::NotifyGeoCourseChange ( void ) const

◆ SetGeoPosition()

void ns3::SatMobilityModel::SetGeoPosition ( const GeoCoordinate & position)
Parameters
positionthe satellite position to set.

Definition at line 78 of file satellite-mobility-model.cc.

References DoSetGeoPosition(), and m_cartesianPositionOutdated.

Referenced by SatFreeSpaceLossTestCase::DoRun(), and GetTypeId().

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

Member Data Documentation

◆ m_cartesianPosition

Vector ns3::SatMobilityModel::m_cartesianPosition
mutableprivate

◆ m_cartesianPositionOutdated

bool ns3::SatMobilityModel::m_cartesianPositionOutdated
mutableprivate

◆ m_GetAsGeoCoordinates

bool ns3::SatMobilityModel::m_GetAsGeoCoordinates
private

Definition at line 152 of file satellite-mobility-model.h.

Referenced by SatMobilityModel(), DoSetPosition(), and GetTypeId().

◆ m_satCourseChangeTrace

ns3::TracedCallback<Ptr<const SatMobilityModel> > ns3::SatMobilityModel::m_satCourseChangeTrace
private

Used to alert subscribers that a change in direction, velocity, or position has occurred.

Definition at line 137 of file satellite-mobility-model.h.

Referenced by GetTypeId(), and NotifyGeoCourseChange().


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