Keep track of the current position and velocity of satellite using SGP4 model. More...
#include "satellite-sgp4-mobility-model.h"
Inheritance diagram for ns3::SatSGP4MobilityModel:
Collaboration diagram for ns3::SatSGP4MobilityModel:Classes | |
| struct | Matrix |
| Matrix data structure to make coordinate conversion code clearer and less verbose. More... | |
| struct | Row |
| row of a Matrix More... | |
Public Member Functions | |
| SatSGP4MobilityModel () | |
| Default constructor. More... | |
| virtual | ~SatSGP4MobilityModel () |
| Destructor. More... | |
| TypeId | GetInstanceTypeId (void) const |
| JulianDate | GetStartTime () const |
| Get the time instant considered as the simulation start. More... | |
| void | SetStartDate (std::string startStr) |
| Set the simulation absolute start time in string format. More... | |
| void | SetStartTime (const JulianDate &t) |
| Set the time instant considered as the simulation start. More... | |
| void | SetTleInfo (const std::string &tle) |
| Set satellite's TLE information required for its initialization. More... | |
Public Member Functions inherited from ns3::SatMobilityModel | |
| SatMobilityModel () | |
| Default constructor. More... | |
| virtual | ~SatMobilityModel ()=0 |
| Destructor for SatMobilityModel. More... | |
| double | GetDistanceFrom (Ptr< const SatMobilityModel > position) const |
| 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... | |
Static Public Member Functions inherited from ns3::SatMobilityModel | |
| static TypeId | GetTypeId (void) |
| Get the type ID. More... | |
Static Public Attributes | |
| static const uint32_t | TleSatInfoWidth = 69 |
| Satellite's information line size defined by TLE data format. More... | |
| static const gravconsttype | WGeoSys = wgs72 |
| World Geodetic System (WGS) constants to be used by SGP4/SDP4 models. More... | |
Private Member Functions | |
| virtual GeoCoordinate | DoGetGeoPosition () const |
| virtual Vector | DoGetPosition () const |
| virtual Vector | DoGetVelocity () const |
| virtual void | DoSetGeoPosition (const GeoCoordinate &position) |
| virtual void | DoSetPosition (const Vector &position) |
| JulianDate | GetTleEpoch (void) const |
| Retrieve the TLE epoch time. More... | |
| bool | IsInitialized (void) const |
| Check if the satellite has already been initialized. More... | |
Static Private Member Functions | |
| static Matrix | PefToItrf (const JulianDate &t) |
| Retrieve the matrix for converting from PEF to ITRF at a given time. More... | |
| static Vector3D | rTemeTorItrf (const Vector3D &rteme, const JulianDate &t) |
| Retrieve the satellite's position vector in ITRF coordinates. More... | |
| static Vector3D | rvTemeTovItrf (const Vector3D &rteme, const Vector3D &vteme, const JulianDate &t) |
| Retrieve the satellite's velocity vector in ITRF coordinates. More... | |
| static Matrix | TemeToPef (const JulianDate &t) |
| Retrieve the matrix for converting from TEME to PEF at a given time. More... | |
Private Attributes | |
| GeoCoordinate | m_lastPosition |
| Last saved satellite position. More... | |
| elsetrec | m_sgp4_record |
| SGP4/SDP4 record. More... | |
| JulianDate | m_start |
| Simulation absolute start time. More... | |
| std::string | m_startStr |
| Simulation absolute start time in string format. More... | |
| Time | m_timeLastUpdate |
| Last position update time. More... | |
| std::string | m_tle1 |
| std::string | m_tle2 |
| satellite's TLE data. More... | |
| bool | m_updatePositionEachRequest |
| Compute position each time a packet is transmitted. More... | |
| Time | m_updatePositionPeriod |
| Period of satellite position refresh, if UpdatePositionEachRequest is false. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::SatMobilityModel | |
| typedef void(* | CourseChangeCallback) (const Ptr< const SatMobilityModel > model) |
Callback signature for SatCourseChange trace source. More... | |
Keep track of the current position and velocity of satellite using SGP4 model.
Definition at line 46 of file satellite-sgp4-mobility-model.h.
| ns3::SatSGP4MobilityModel::SatSGP4MobilityModel | ( | ) |
Default constructor.
Definition at line 74 of file satellite-sgp4-mobility-model.cc.
References m_startStr, and SetStartTime().
Here is the call graph for this function:
|
virtual |
Destructor.
Definition at line 84 of file satellite-sgp4-mobility-model.cc.
|
privatevirtual |
Concrete subclasses of this base class must implement this method.
Implements ns3::SatMobilityModel.
Definition at line 152 of file satellite-sgp4-mobility-model.cc.
References elsetrec::error, GetTleEpoch(), IsInitialized(), m_lastPosition, m_sgp4_record, m_start, m_timeLastUpdate, m_updatePositionEachRequest, m_updatePositionPeriod, rTemeTorItrf(), sgp4(), and WGeoSys.
Referenced by DoGetPosition(), and SetTleInfo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Implementation for method defined by MobilityModel
Reimplemented from ns3::SatMobilityModel.
Definition at line 136 of file satellite-sgp4-mobility-model.cc.
References DoGetGeoPosition(), and ns3::GeoCoordinate::ToVector().
Here is the call graph for this function:
|
privatevirtual |
Definition at line 114 of file satellite-sgp4-mobility-model.cc.
References elsetrec::error, GetTleEpoch(), IsInitialized(), m_sgp4_record, m_start, rvTemeTovItrf(), sgp4(), and WGeoSys.
Here is the call graph for this function:
|
privatevirtual |
| position | the position to set. |
Concrete subclasses of this base class must implement this method.
Implements ns3::SatMobilityModel.
Definition at line 183 of file satellite-sgp4-mobility-model.cc.
References m_lastPosition, and ns3::SatMobilityModel::NotifyGeoCourseChange().
Referenced by DoSetPosition().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
| position | position in Cartesian format to set |
Implementation for method defined by MobilityModel
Reimplemented from ns3::SatMobilityModel.
Definition at line 144 of file satellite-sgp4-mobility-model.cc.
References DoSetGeoPosition().
Here is the call graph for this function:| TypeId ns3::SatSGP4MobilityModel::GetInstanceTypeId | ( | void | ) | const |
Definition at line 69 of file satellite-sgp4-mobility-model.cc.
References GetTypeId().
Here is the call graph for this function:| JulianDate ns3::SatSGP4MobilityModel::GetStartTime | ( | void | ) | const |
Get the time instant considered as the simulation start.
Definition at line 98 of file satellite-sgp4-mobility-model.cc.
References m_start.
|
private |
Retrieve the TLE epoch time.
Definition at line 200 of file satellite-sgp4-mobility-model.cc.
References IsInitialized(), elsetrec::jdsatepoch, and m_sgp4_record.
Referenced by DoGetGeoPosition(), DoGetVelocity(), and SetTleInfo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get the type ID.
Definition at line 48 of file satellite-sgp4-mobility-model.cc.
References m_updatePositionEachRequest, and m_updatePositionPeriod.
Referenced by GetInstanceTypeId().
Here is the caller graph for this function:
|
private |
Check if the satellite has already been initialized.
Definition at line 192 of file satellite-sgp4-mobility-model.cc.
References elsetrec::jdsatepoch, m_sgp4_record, m_tle1, and m_tle2.
Referenced by DoGetGeoPosition(), DoGetVelocity(), and GetTleEpoch().
Here is the caller graph for this function:
|
staticprivate |
Retrieve the matrix for converting from PEF to ITRF at a given time.
| t | When. |
Definition at line 277 of file satellite-sgp4-mobility-model.cc.
References ns3::JulianDate::GetPolarMotion().
Referenced by rTemeTorItrf(), and rvTemeTovItrf().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Retrieve the satellite's position vector in ITRF coordinates.
| t | When. |
Definition at line 256 of file satellite-sgp4-mobility-model.cc.
References PefToItrf(), and TemeToPef().
Referenced by DoGetGeoPosition().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Retrieve the satellite's velocity vector in ITRF coordinates.
| t | When. |
Definition at line 265 of file satellite-sgp4-mobility-model.cc.
References ns3::CrossProduct(), ns3::JulianDate::GetOmegaEarth(), PefToItrf(), and TemeToPef().
Referenced by DoGetVelocity().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::SatSGP4MobilityModel::SetStartDate | ( | std::string | startStr | ) |
Set the simulation absolute start time in string format.
| startStr | Start time of simulation, on format "YYYY-MM-DD hh:mm:ss" |
Definition at line 89 of file satellite-sgp4-mobility-model.cc.
References m_startStr, and SetStartTime().
Here is the call graph for this function:| void ns3::SatSGP4MobilityModel::SetStartTime | ( | const JulianDate & | t | ) |
Set the time instant considered as the simulation start.
| t | the time instant to be considered as simulation start. |
Definition at line 106 of file satellite-sgp4-mobility-model.cc.
References m_start.
Referenced by SatSGP4MobilityModel(), and SetStartDate().
Here is the caller graph for this function:| void ns3::SatSGP4MobilityModel::SetTleInfo | ( | const std::string & | tle | ) |
Set satellite's TLE information required for its initialization.
| tle | The two lines of the TLE data format. |
Definition at line 211 of file satellite-sgp4-mobility-model.cc.
References DoGetGeoPosition(), elsetrec::error, GetTleEpoch(), m_sgp4_record, m_start, m_tle1, m_tle2, sgp4(), TleSatInfoWidth, twoline2rv(), and WGeoSys.
Here is the call graph for this function:
|
staticprivate |
Retrieve the matrix for converting from TEME to PEF at a given time.
| t | When. |
Definition at line 307 of file satellite-sgp4-mobility-model.cc.
References ns3::JulianDate::GetGmst().
Referenced by rTemeTorItrf(), and rvTemeTovItrf().
Here is the call graph for this function:
Here is the caller graph for this function:
|
mutableprivate |
Last saved satellite position.
Definition at line 206 of file satellite-sgp4-mobility-model.h.
Referenced by DoGetGeoPosition(), and DoSetGeoPosition().
|
mutableprivate |
SGP4/SDP4 record.
Definition at line 151 of file satellite-sgp4-mobility-model.h.
Referenced by DoGetGeoPosition(), DoGetVelocity(), GetTleEpoch(), IsInitialized(), and SetTleInfo().
|
private |
Simulation absolute start time.
Definition at line 211 of file satellite-sgp4-mobility-model.h.
Referenced by DoGetGeoPosition(), DoGetVelocity(), GetStartTime(), SetStartTime(), and SetTleInfo().
|
private |
Simulation absolute start time in string format.
Definition at line 216 of file satellite-sgp4-mobility-model.h.
Referenced by SatSGP4MobilityModel(), and SetStartDate().
|
mutableprivate |
Last position update time.
Definition at line 231 of file satellite-sgp4-mobility-model.h.
Referenced by DoGetGeoPosition().
|
private |
Definition at line 150 of file satellite-sgp4-mobility-model.h.
Referenced by IsInitialized(), and SetTleInfo().
|
private |
satellite's TLE data.
Definition at line 150 of file satellite-sgp4-mobility-model.h.
Referenced by IsInitialized(), and SetTleInfo().
|
private |
Compute position each time a packet is transmitted.
Definition at line 221 of file satellite-sgp4-mobility-model.h.
Referenced by DoGetGeoPosition(), and GetTypeId().
|
private |
Period of satellite position refresh, if UpdatePositionEachRequest is false.
Definition at line 226 of file satellite-sgp4-mobility-model.h.
Referenced by DoGetGeoPosition(), and GetTypeId().
|
static |
Satellite's information line size defined by TLE data format.
Definition at line 52 of file satellite-sgp4-mobility-model.h.
Referenced by SetTleInfo().
|
static |
World Geodetic System (WGS) constants to be used by SGP4/SDP4 models.
Definition at line 50 of file satellite-sgp4-mobility-model.h.
Referenced by DoGetGeoPosition(), DoGetVelocity(), and SetTleInfo().