Keep track of the current position and velocity of an object in satellite network. More...
#include "satellite-mobility-model.h"
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... | |
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.
typedef void(* ns3::SatMobilityModel::CourseChangeCallback) (const Ptr< const SatMobilityModel > model) |
Callback signature for SatCourseChange
trace source.
model | the SatMobilityModel which is changing course |
Definition at line 77 of file satellite-mobility-model.h.
ns3::SatMobilityModel::SatMobilityModel | ( | ) |
Default constructor.
Definition at line 66 of file satellite-mobility-model.cc.
|
pure virtual |
Destructor for SatMobilityModel.
Definition at line 72 of file satellite-mobility-model.cc.
|
privatepure virtual |
Concrete subclasses of this base class must implement this method.
Implemented in ns3::SatTracedMobilityModel, ns3::SatConstantPositionMobilityModel, and ns3::SatSGP4MobilityModel.
Referenced by DoGetPosition(), and GetGeoPosition().
|
privatevirtual |
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().
|
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.
position | position in cartesian format to set |
Definition at line 125 of file satellite-mobility-model.cc.
References m_cartesianPosition, and m_cartesianPositionOutdated.
Referenced by DoGetPosition().
|
privatepure virtual |
position | the 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().
|
privatevirtual |
position | position 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.
GeoCoordinate ns3::SatMobilityModel::GetGeoPosition | ( | void | ) | const |
Definition at line 77 of file satellite-mobility-model.cc.
References DoGetGeoPosition().
Referenced by GetTypeId().
TypeId ns3::SatMobilityModel::GetInstanceTypeId | ( | void | ) | const |
Definition at line 61 of file satellite-mobility-model.cc.
References GetTypeId().
|
static |
Get the type ID.
Definition at line 35 of file satellite-mobility-model.cc.
References GetGeoPosition(), m_GetAsGeoCoordinates, m_satCourseChangeTrace, ns3::MakeGeoCoordinateChecker(), and SetGeoPosition().
Referenced by GetInstanceTypeId().
void ns3::SatMobilityModel::NotifyGeoCourseChange | ( | void | ) | const |
Definition at line 90 of file satellite-mobility-model.cc.
References m_satCourseChangeTrace.
Referenced by ns3::SatConstantPositionMobilityModel::DoSetGeoPosition(), ns3::SatSGP4MobilityModel::DoSetGeoPosition(), and ns3::SatTracedMobilityModel::DoSetGeoPosition().
void ns3::SatMobilityModel::SetGeoPosition | ( | const GeoCoordinate & | position | ) |
position | the 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().
|
mutableprivate |
Definition at line 128 of file satellite-mobility-model.h.
Referenced by DoGetPosition(), DoSetCartesianPosition(), and DoSetPosition().
|
mutableprivate |
Definition at line 131 of file satellite-mobility-model.h.
Referenced by DoGetPosition(), DoSetCartesianPosition(), DoSetPosition(), and SetGeoPosition().
|
private |
Definition at line 138 of file satellite-mobility-model.h.
Referenced by DoSetPosition(), and GetTypeId().
|
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().