ns3::SatMobilityObserver Class Reference

Observes given mobilities and keeps track of certain wanted properties. More...

#include "satellite-mobility-observer.h"

+ Inheritance diagram for ns3::SatMobilityObserver:
+ Collaboration diagram for ns3::SatMobilityObserver:

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< SatMobilityModelm_anotherMobility
 
Ptr< PropagationDelayModel > m_anotherProgDelayModel
 
double m_earthRadius
 
double m_elevationAngle
 
Ptr< SatMobilityModelm_geoSatMobility
 
bool m_initialized
 
bool m_isRegenerative
 
double m_maxAltitude
 
double m_maxDistanceToSatellite
 
double m_minAltitude
 
Ptr< SatMobilityModelm_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
 

Detailed Description

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 43 of file satellite-mobility-observer.h.

Member Typedef Documentation

◆ PropertyChangedCallback

typedef void(* ns3::SatMobilityObserver::PropertyChangedCallback) (Ptr< const SatMobilityObserver > mobilityObserver)

Callback signature for PropertyChanged trace source.

Parameters
mobilityObserverAn instance of SatMobilityObserver which property has changed.

Definition at line 117 of file satellite-mobility-observer.h.

Constructor & Destructor Documentation

◆ SatMobilityObserver() [1/2]

ns3::SatMobilityObserver::SatMobilityObserver ( )

Default constructor of the mobility observer (should not be called)

Definition at line 94 of file satellite-mobility-observer.cc.

◆ SatMobilityObserver() [2/2]

ns3::SatMobilityObserver::SatMobilityObserver ( Ptr< SatMobilityModel ownMobility,
Ptr< SatMobilityModel geoSatMobility,
bool  isRegenerative = false 
)

Constructor for mobility observer.

Parameters
ownMobilityOwn mobility to observe
geoSatMobilitySatellite mobility to observe
isRegenerativeIndicates if the satellite regenerates packets

Definition at line 102 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().

+ Here is the call graph for this function:

◆ ~SatMobilityObserver()

ns3::SatMobilityObserver::~SatMobilityObserver ( )
virtual

Destructor of the mobility observer.

Definition at line 159 of file satellite-mobility-observer.cc.

Member Function Documentation

◆ DoDispose()

void ns3::SatMobilityObserver::DoDispose ( void  )
virtual

Dispose of this class instance.

Definition at line 148 of file satellite-mobility-observer.cc.

References m_anotherMobility, m_anotherProgDelayModel, m_geoSatMobility, m_ownMobility, and m_ownProgDelayModel.

◆ GetElevationAngle()

double ns3::SatMobilityObserver::GetElevationAngle ( void  )

Get elevation angle.

Returns
the current elevation angle as degrees.

Definition at line 193 of file satellite-mobility-observer.cc.

References m_elevationAngle, m_geoSatMobility, m_ownMobility, m_updateElevationAngle, and UpdateElevationAngle().

Referenced by ns3::SatBeamHelper::InstallFadingContainer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

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

Definition at line 87 of file satellite-mobility-observer.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetTimingAdvance()

Time ns3::SatMobilityObserver::GetTimingAdvance ( void  )

Get timing advance.

Returns
the current timing advance.

Definition at line 223 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::SatUtHelper::InstallDvb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 39 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().

+ Here is the caller graph for this function:

◆ GetVelocity()

double ns3::SatMobilityObserver::GetVelocity ( void  )

Get velocity of own movement (speed).

Returns
the current velocity.

Definition at line 211 of file satellite-mobility-observer.cc.

References m_ownMobility, and m_velocity.

Referenced by ns3::SatBeamHelper::InstallFadingContainer().

+ Here is the caller graph for this function:

◆ NotifyPropertyChange()

void ns3::SatMobilityObserver::NotifyPropertyChange ( void  ) const
private

Notify listeners about some property is changed.

Definition at line 249 of file satellite-mobility-observer.cc.

References m_initialized, and m_propertyChangeTrace.

Referenced by PositionChanged().

+ Here is the caller graph for this function:

◆ ObserveTimingAdvance()

void ns3::SatMobilityObserver::ObserveTimingAdvance ( Ptr< PropagationDelayModel >  ownDelayModel,
Ptr< PropagationDelayModel >  anotherDelayModel,
Ptr< SatMobilityModel anotherMobility 
)

Enable observing of the timing advance.

Parameters
ownDelayModelOwn propagation delay model.
anotherDelayModelPropagation delay model of the another end.
anotherMobilityMobility of the another end.

Definition at line 165 of file satellite-mobility-observer.cc.

References m_anotherMobility, m_anotherProgDelayModel, m_ownMobility, m_ownProgDelayModel, and PositionChanged().

Referenced by ns3::SatUserHelper::UpdateUtRoutes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PositionChanged()

void ns3::SatMobilityObserver::PositionChanged ( std::string  context,
Ptr< const SatMobilityModel position 
)
private

Listener (callback) for mobility position changes.

Parameters
contextContext of the mobility whose position is changed
positionMobility whose position is changed

Definition at line 260 of file satellite-mobility-observer.cc.

References m_updateElevationAngle, m_updateTimingAdvance, NotifyPropertyChange(), and SatelliteStatusChanged().

Referenced by SatMobilityObserver(), and ObserveTimingAdvance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SatelliteStatusChanged()

void ns3::SatMobilityObserver::SatelliteStatusChanged ( )
private

Do actions needed when satellite position is changed.

Definition at line 350 of file satellite-mobility-observer.cc.

References m_earthRadius, m_geoSatMobility, m_maxDistanceToSatellite, and m_radiusRatio.

Referenced by SatMobilityObserver(), and PositionChanged().

+ Here is the caller graph for this function:

◆ UpdateElevationAngle()

void ns3::SatMobilityObserver::UpdateElevationAngle ( )
private

◆ UpdateTimingAdvance()

void ns3::SatMobilityObserver::UpdateTimingAdvance ( )
private

Update timing advance.

Definition at line 331 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().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_anotherMobility

Ptr<SatMobilityModel> ns3::SatMobilityObserver::m_anotherMobility
private

◆ m_anotherProgDelayModel

Ptr<PropagationDelayModel> ns3::SatMobilityObserver::m_anotherProgDelayModel
private

◆ m_earthRadius

double ns3::SatMobilityObserver::m_earthRadius
private

Definition at line 165 of file satellite-mobility-observer.h.

Referenced by SatMobilityObserver(), and SatelliteStatusChanged().

◆ m_elevationAngle

double ns3::SatMobilityObserver::m_elevationAngle
private

Definition at line 164 of file satellite-mobility-observer.h.

Referenced by GetElevationAngle(), and UpdateElevationAngle().

◆ m_geoSatMobility

◆ m_initialized

bool ns3::SatMobilityObserver::m_initialized
private

Definition at line 159 of file satellite-mobility-observer.h.

Referenced by SatMobilityObserver(), and NotifyPropertyChange().

◆ m_isRegenerative

bool ns3::SatMobilityObserver::m_isRegenerative
private

Definition at line 170 of file satellite-mobility-observer.h.

Referenced by UpdateTimingAdvance().

◆ m_maxAltitude

double ns3::SatMobilityObserver::m_maxAltitude
private

Definition at line 163 of file satellite-mobility-observer.h.

Referenced by GetTypeId(), and UpdateElevationAngle().

◆ m_maxDistanceToSatellite

double ns3::SatMobilityObserver::m_maxDistanceToSatellite
private

Definition at line 167 of file satellite-mobility-observer.h.

Referenced by SatelliteStatusChanged(), and UpdateElevationAngle().

◆ m_minAltitude

double ns3::SatMobilityObserver::m_minAltitude
private

Definition at line 162 of file satellite-mobility-observer.h.

Referenced by GetTypeId(), and UpdateElevationAngle().

◆ m_ownMobility

◆ m_ownProgDelayModel

Ptr<PropagationDelayModel> ns3::SatMobilityObserver::m_ownProgDelayModel
private

◆ m_propertyChangeTrace

TracedCallback<Ptr<const SatMobilityObserver> > ns3::SatMobilityObserver::m_propertyChangeTrace
private

Used to alert subscribers that a change in some observed property has occurred.

Definition at line 151 of file satellite-mobility-observer.h.

Referenced by GetTypeId(), and NotifyPropertyChange().

◆ m_radiusRatio

double ns3::SatMobilityObserver::m_radiusRatio
private

Definition at line 166 of file satellite-mobility-observer.h.

Referenced by SatelliteStatusChanged(), and UpdateElevationAngle().

◆ m_timingAdvance_s

Time ns3::SatMobilityObserver::m_timingAdvance_s
private

◆ m_updateElevationAngle

bool ns3::SatMobilityObserver::m_updateElevationAngle
private

◆ m_updateTimingAdvance

bool ns3::SatMobilityObserver::m_updateTimingAdvance
private

◆ m_velocity

double ns3::SatMobilityObserver::m_velocity
private

Definition at line 169 of file satellite-mobility-observer.h.

Referenced by SatMobilityObserver(), and GetVelocity().


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