Observes given mobilities and keeps track of certain wanted properties. More...
#include "satellite-mobility-observer.h"
Public Types | |
typedef void(* | PropertyChangedCallback) (Ptr< const SatMobilityObserver > mobilityObserver) |
Callback signature for PropertyChanged trace source. More... | |
Public Member Functions | |
SatMobilityObserver () | |
Default constructor of the mobility observer (should not be called) More... | |
SatMobilityObserver (Ptr< SatMobilityModel > ownMobility, Ptr< SatMobilityModel > geoSatMobility, bool isRegenerative=false) | |
Constructor for mobility observer. More... | |
virtual | ~SatMobilityObserver () |
Destructor of the mobility observer. More... | |
virtual void | DoDispose (void) |
Dispose of this class instance. More... | |
double | GetElevationAngle (void) |
Get elevation angle. More... | |
TypeId | GetInstanceTypeId (void) const |
Time | GetTimingAdvance (void) |
Get timing advance. More... | |
double | GetVelocity (void) |
Get velocity of own movement (speed). More... | |
void | ObserveTimingAdvance (Ptr< PropagationDelayModel > ownDelayModel, Ptr< PropagationDelayModel > anotherDelayModel, Ptr< SatMobilityModel > anotherMobility) |
Enable observing of the timing advance. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
void | NotifyPropertyChange (void) const |
Notify listeners about some property is changed. More... | |
void | PositionChanged (std::string context, Ptr< const SatMobilityModel > position) |
Listener (callback) for mobility position changes. More... | |
void | SatelliteStatusChanged () |
Do actions needed when satellite position is changed. More... | |
void | UpdateElevationAngle () |
Update elevation angle. More... | |
void | UpdateTimingAdvance () |
Update timing advance. More... | |
Private Attributes | |
Ptr< SatMobilityModel > | m_anotherMobility |
Ptr< PropagationDelayModel > | m_anotherProgDelayModel |
double | m_earthRadius |
double | m_elevationAngle |
Ptr< SatMobilityModel > | m_geoSatMobility |
bool | m_initialized |
bool | m_isRegenerative |
double | m_maxAltitude |
double | m_maxDistanceToSatellite |
double | m_minAltitude |
Ptr< SatMobilityModel > | m_ownMobility |
Ptr< PropagationDelayModel > | m_ownProgDelayModel |
TracedCallback< Ptr< const SatMobilityObserver > > | m_propertyChangeTrace |
Used to alert subscribers that a change in some observed property has occurred. More... | |
double | m_radiusRatio |
Time | m_timingAdvance_s |
bool | m_updateElevationAngle |
bool | m_updateTimingAdvance |
double | m_velocity |
Observes given mobilities and keeps track of certain wanted properties.
Properties can be observed currently are; the timing advance and elevation angle.
Observing of timing advance is set by method ObserveTimingAdvance If satellite regenerates packets on return link, delay corresponds to SAT<->UT link. Otherwise, delay corresponds to GW<->UT link.
Definition at line 45 of file satellite-mobility-observer.h.
typedef void(* ns3::SatMobilityObserver::PropertyChangedCallback) (Ptr< const SatMobilityObserver > mobilityObserver) |
Callback signature for PropertyChanged
trace source.
mobilityObserver | An instance of SatMobilityObserver which property has changed. |
Definition at line 119 of file satellite-mobility-observer.h.
ns3::SatMobilityObserver::SatMobilityObserver | ( | ) |
Default constructor of the mobility observer (should not be called)
Definition at line 98 of file satellite-mobility-observer.cc.
ns3::SatMobilityObserver::SatMobilityObserver | ( | Ptr< SatMobilityModel > | ownMobility, |
Ptr< SatMobilityModel > | geoSatMobility, | ||
bool | isRegenerative = false |
||
) |
Constructor for mobility observer.
ownMobility | Own mobility to observe |
geoSatMobility | Satellite mobility to observe |
isRegenerative | Indicates if the satellite regenerates packets |
Definition at line 106 of file satellite-mobility-observer.cc.
References ns3::GeoCoordinate::GetAltitude(), ns3::GeoCoordinate::GetRefEllipsoid(), m_earthRadius, m_geoSatMobility, m_initialized, m_ownMobility, m_timingAdvance_s, m_updateElevationAngle, m_updateTimingAdvance, m_velocity, PositionChanged(), SatelliteStatusChanged(), and ns3::GeoCoordinate::ToVector().
|
virtual |
Destructor of the mobility observer.
Definition at line 163 of file satellite-mobility-observer.cc.
|
virtual |
Dispose of this class instance.
Definition at line 152 of file satellite-mobility-observer.cc.
References m_anotherMobility, m_anotherProgDelayModel, m_geoSatMobility, m_ownMobility, and m_ownProgDelayModel.
double ns3::SatMobilityObserver::GetElevationAngle | ( | void | ) |
Get elevation angle.
Definition at line 197 of file satellite-mobility-observer.cc.
References m_elevationAngle, m_geoSatMobility, m_ownMobility, m_updateElevationAngle, and UpdateElevationAngle().
Referenced by ns3::SatBeamHelper::InstallFadingContainer().
TypeId ns3::SatMobilityObserver::GetInstanceTypeId | ( | void | ) | const |
Definition at line 91 of file satellite-mobility-observer.cc.
References GetTypeId().
Time ns3::SatMobilityObserver::GetTimingAdvance | ( | void | ) |
Get timing advance.
Definition at line 227 of file satellite-mobility-observer.cc.
References m_anotherMobility, m_anotherProgDelayModel, m_geoSatMobility, m_ownMobility, m_timingAdvance_s, m_updateTimingAdvance, and UpdateTimingAdvance().
Referenced by ns3::SatUtHelperDvb::Install().
|
static |
Get the type ID.
Definition at line 43 of file satellite-mobility-observer.cc.
References m_anotherMobility, m_anotherProgDelayModel, m_geoSatMobility, m_maxAltitude, m_minAltitude, m_ownMobility, m_ownProgDelayModel, and m_propertyChangeTrace.
Referenced by GetInstanceTypeId().
double ns3::SatMobilityObserver::GetVelocity | ( | void | ) |
Get velocity of own movement (speed).
Definition at line 215 of file satellite-mobility-observer.cc.
References m_ownMobility, and m_velocity.
Referenced by ns3::SatBeamHelper::InstallFadingContainer().
|
private |
Notify listeners about some property is changed.
Definition at line 253 of file satellite-mobility-observer.cc.
References m_initialized, and m_propertyChangeTrace.
Referenced by PositionChanged().
void ns3::SatMobilityObserver::ObserveTimingAdvance | ( | Ptr< PropagationDelayModel > | ownDelayModel, |
Ptr< PropagationDelayModel > | anotherDelayModel, | ||
Ptr< SatMobilityModel > | anotherMobility | ||
) |
Enable observing of the timing advance.
ownDelayModel | Own propagation delay model. |
anotherDelayModel | Propagation delay model of the another end. |
anotherMobility | Mobility of the another end. |
Definition at line 169 of file satellite-mobility-observer.cc.
References m_anotherMobility, m_anotherProgDelayModel, m_ownMobility, m_ownProgDelayModel, and PositionChanged().
Referenced by ns3::SatUserHelper::UpdateUtRoutes().
|
private |
Listener (callback) for mobility position changes.
context | Context of the mobility whose position is changed |
position | Mobility whose position is changed |
Definition at line 264 of file satellite-mobility-observer.cc.
References m_updateElevationAngle, m_updateTimingAdvance, NotifyPropertyChange(), and SatelliteStatusChanged().
Referenced by SatMobilityObserver(), and ObserveTimingAdvance().
|
private |
Do actions needed when satellite position is changed.
Definition at line 354 of file satellite-mobility-observer.cc.
References m_earthRadius, m_geoSatMobility, m_maxDistanceToSatellite, and m_radiusRatio.
Referenced by SatMobilityObserver(), and PositionChanged().
|
private |
Update elevation angle.
Definition at line 286 of file satellite-mobility-observer.cc.
References ns3::SatUtils::DegreesToRadians(), ns3::GeoCoordinate::GetAltitude(), ns3::GeoCoordinate::GetLatitude(), ns3::GeoCoordinate::GetLongitude(), m_elevationAngle, m_geoSatMobility, m_maxAltitude, m_maxDistanceToSatellite, m_minAltitude, m_ownMobility, m_radiusRatio, ns3::SatUtils::RadiansToDegrees(), ns3::GeoCoordinate::SetAltitude(), and ns3::GeoCoordinate::ToVector().
Referenced by GetElevationAngle().
|
private |
Update timing advance.
Definition at line 335 of file satellite-mobility-observer.cc.
References m_anotherMobility, m_anotherProgDelayModel, m_geoSatMobility, m_isRegenerative, m_ownMobility, m_ownProgDelayModel, and m_timingAdvance_s.
Referenced by GetTimingAdvance().
|
private |
Definition at line 156 of file satellite-mobility-observer.h.
Referenced by DoDispose(), GetTimingAdvance(), GetTypeId(), ObserveTimingAdvance(), and UpdateTimingAdvance().
|
private |
Definition at line 159 of file satellite-mobility-observer.h.
Referenced by DoDispose(), GetTimingAdvance(), GetTypeId(), ObserveTimingAdvance(), and UpdateTimingAdvance().
|
private |
Definition at line 167 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), and SatelliteStatusChanged().
|
private |
Definition at line 166 of file satellite-mobility-observer.h.
Referenced by GetElevationAngle(), and UpdateElevationAngle().
|
private |
Definition at line 157 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), DoDispose(), GetElevationAngle(), GetTimingAdvance(), GetTypeId(), SatelliteStatusChanged(), UpdateElevationAngle(), and UpdateTimingAdvance().
|
private |
Definition at line 161 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), and NotifyPropertyChange().
|
private |
Definition at line 172 of file satellite-mobility-observer.h.
Referenced by UpdateTimingAdvance().
|
private |
Definition at line 165 of file satellite-mobility-observer.h.
Referenced by GetTypeId(), and UpdateElevationAngle().
|
private |
Definition at line 169 of file satellite-mobility-observer.h.
Referenced by SatelliteStatusChanged(), and UpdateElevationAngle().
|
private |
Definition at line 164 of file satellite-mobility-observer.h.
Referenced by GetTypeId(), and UpdateElevationAngle().
|
private |
Definition at line 155 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), DoDispose(), GetElevationAngle(), GetTimingAdvance(), GetTypeId(), GetVelocity(), ObserveTimingAdvance(), UpdateElevationAngle(), and UpdateTimingAdvance().
|
private |
Definition at line 158 of file satellite-mobility-observer.h.
Referenced by DoDispose(), GetTypeId(), ObserveTimingAdvance(), and UpdateTimingAdvance().
|
private |
Used to alert subscribers that a change in some observed property has occurred.
Definition at line 153 of file satellite-mobility-observer.h.
Referenced by GetTypeId(), and NotifyPropertyChange().
|
private |
Definition at line 168 of file satellite-mobility-observer.h.
Referenced by SatelliteStatusChanged(), and UpdateElevationAngle().
|
private |
Definition at line 170 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), GetTimingAdvance(), and UpdateTimingAdvance().
|
private |
Definition at line 162 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), GetElevationAngle(), and PositionChanged().
|
private |
Definition at line 163 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), GetTimingAdvance(), and PositionChanged().
|
private |
Definition at line 171 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), and GetVelocity().