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. | |
Public Member Functions | |
| SatMobilityObserver () | |
| Default constructor of the mobility observer (should not be called). | |
| SatMobilityObserver (Ptr< SatMobilityModel > ownMobility, Ptr< SatMobilityModel > geoSatMobility, bool isRegenerative=false) | |
| Constructor for mobility observer. | |
| virtual | ~SatMobilityObserver () |
| Destructor of the mobility observer. | |
| virtual void | DoDispose (void) |
| Dispose of this class instance. | |
| double | GetElevationAngle (void) |
| Get elevation angle. | |
| Time | GetTimingAdvance (void) |
| Get timing advance. | |
| double | GetVelocity (void) |
| Get velocity of own movement (speed). | |
| void | ObserveTimingAdvance (Ptr< PropagationDelayModel > ownDelayModel, Ptr< PropagationDelayModel > anotherDelayModel, Ptr< SatMobilityModel > anotherMobility) |
| Enable observing of the timing advance. | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Get the type ID. | |
Private Member Functions | |
| void | NotifyPropertyChange (void) const |
| Notify listeners about some property is changed. | |
| void | PositionChanged (std::string context, Ptr< const SatMobilityModel > position) |
| Listener (callback) for mobility position changes. | |
| void | SatelliteStatusChanged () |
| Do actions needed when satellite position is changed. | |
| void | UpdateElevationAngle () |
| Update elevation angle. | |
| void | UpdateTimingAdvance () |
| Update timing advance. | |
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. | |
| 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 118 of file satellite-mobility-observer.h.
| ns3::SatMobilityObserver::SatMobilityObserver | ( | ) |
Default constructor of the mobility observer (should not be called).
Definition at line 90 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 98 of file satellite-mobility-observer.cc.
References ns3::GeoCoordinate::GetAltitude(), ns3::GeoCoordinate::GetRefEllipsoid(), m_anotherMobility, m_anotherProgDelayModel, m_earthRadius, m_geoSatMobility, m_initialized, m_isRegenerative, m_ownMobility, m_ownProgDelayModel, m_timingAdvance_s, m_updateElevationAngle, m_updateTimingAdvance, m_velocity, PositionChanged(), SatelliteStatusChanged(), and ns3::GeoCoordinate::ToVector().
|
virtual |
Destructor of the mobility observer.
Definition at line 155 of file satellite-mobility-observer.cc.
|
virtual |
Dispose of this class instance.
Definition at line 144 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 189 of file satellite-mobility-observer.cc.
References m_elevationAngle, m_geoSatMobility, m_ownMobility, m_updateElevationAngle, and UpdateElevationAngle().
Referenced by ns3::SatBeamHelper::InstallFadingContainer().
| Time ns3::SatMobilityObserver::GetTimingAdvance | ( | void | ) |
Get timing advance.
Definition at line 219 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.
| double ns3::SatMobilityObserver::GetVelocity | ( | void | ) |
Get velocity of own movement (speed).
Definition at line 207 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 245 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 161 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 256 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 346 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 278 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 327 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 155 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), DoDispose(), GetTimingAdvance(), GetTypeId(), ObserveTimingAdvance(), and UpdateTimingAdvance().
|
private |
Definition at line 158 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), DoDispose(), GetTimingAdvance(), GetTypeId(), ObserveTimingAdvance(), and UpdateTimingAdvance().
|
private |
Definition at line 166 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), and SatelliteStatusChanged().
|
private |
Definition at line 165 of file satellite-mobility-observer.h.
Referenced by GetElevationAngle(), and UpdateElevationAngle().
|
private |
Definition at line 156 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), DoDispose(), GetElevationAngle(), GetTimingAdvance(), GetTypeId(), SatelliteStatusChanged(), UpdateElevationAngle(), and UpdateTimingAdvance().
|
private |
Definition at line 160 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), and NotifyPropertyChange().
|
private |
Definition at line 171 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), and UpdateTimingAdvance().
|
private |
Definition at line 164 of file satellite-mobility-observer.h.
Referenced by GetTypeId(), and UpdateElevationAngle().
|
private |
Definition at line 168 of file satellite-mobility-observer.h.
Referenced by SatelliteStatusChanged(), and UpdateElevationAngle().
|
private |
Definition at line 163 of file satellite-mobility-observer.h.
Referenced by GetTypeId(), and UpdateElevationAngle().
|
private |
Definition at line 154 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), DoDispose(), GetElevationAngle(), GetTimingAdvance(), GetTypeId(), GetVelocity(), ObserveTimingAdvance(), UpdateElevationAngle(), and UpdateTimingAdvance().
|
private |
Definition at line 157 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), DoDispose(), GetTypeId(), ObserveTimingAdvance(), and UpdateTimingAdvance().
|
private |
Used to alert subscribers that a change in some observed property has occurred.
Definition at line 152 of file satellite-mobility-observer.h.
Referenced by GetTypeId(), and NotifyPropertyChange().
|
private |
Definition at line 167 of file satellite-mobility-observer.h.
Referenced by SatelliteStatusChanged(), and UpdateElevationAngle().
|
private |
Definition at line 169 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), GetTimingAdvance(), and UpdateTimingAdvance().
|
private |
Definition at line 161 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), GetElevationAngle(), and PositionChanged().
|
private |
Definition at line 162 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), GetTimingAdvance(), and PositionChanged().
|
private |
Definition at line 170 of file satellite-mobility-observer.h.
Referenced by SatMobilityObserver(), and GetVelocity().