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. More...
 

Public Member Functions

 SatMobilityModel ()
 Default constructor. More...
 
virtual ~SatMobilityModel ()=0
 Destructor for SatMobilityModel. More...
 
GeoCoordinate GetGeoPosition (void) const
 
TypeId GetInstanceTypeId (void) const
 
void NotifyGeoCourseChange (void) const
 
void SetGeoPosition (const GeoCoordinate &position)
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 

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. More...
 
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. More...
 

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 77 of file satellite-mobility-model.h.

Constructor & Destructor Documentation

◆ SatMobilityModel()

ns3::SatMobilityModel::SatMobilityModel ( )

Default constructor.

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

◆ ~SatMobilityModel()

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

Destructor for SatMobilityModel.

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

Member Function Documentation

◆ 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::SatTracedMobilityModel, ns3::SatConstantPositionMobilityModel, and ns3::SatSGP4MobilityModel.

Referenced by DoGetPosition(), 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.

Definition at line 97 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 125 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::SatTracedMobilityModel, ns3::SatSGP4MobilityModel, and ns3::SatConstantPositionMobilityModel.

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.

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

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

+ Here is the call graph for this function:

◆ GetGeoPosition()

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

Definition at line 77 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:

◆ GetInstanceTypeId()

TypeId ns3::SatMobilityModel::GetInstanceTypeId ( void  ) const

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

References GetTypeId().

+ Here is the call graph for this function:

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

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

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

Referenced by GetInstanceTypeId().

+ Here is the call graph for this function:
+ Here is the caller 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 83 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 138 of file satellite-mobility-model.h.

Referenced by 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 123 of file satellite-mobility-model.h.

Referenced by GetTypeId(), and NotifyGeoCourseChange().


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