27#include "ns3/simulator.h"
28#include "ns3/singleton.h"
32NS_LOG_COMPONENT_DEFINE(
"SatTracedMobilityModel");
43 TypeId(
"ns3::SatTracedMobilityModel")
45 .AddConstructor<SatTracedMobilityModel>()
46 .AddAttribute(
"ReferenceEllipsoid",
47 "Reference Ellipsoid model to use when reading coordinates",
49 MakeEnumAccessor<GeoCoordinate::ReferenceEllipsoid_t>(
57 .AddAttribute(
"UpdateInterval",
58 "Interval at which the position should update",
59 TimeValue(MilliSeconds(1)),
61 MakeTimeChecker(FemtoSeconds(1)));
76 NS_FATAL_ERROR(
"SatTracedMobilityModel default constructor should not be used");
80 const std::string& filename,
81 Ptr<SatAntennaGainPatternContainer> agp)
90 NS_LOG_FUNCTION(
this);
97 NS_LOG_FUNCTION(
this);
103 NS_LOG_FUNCTION(
this);
111 NS_LOG_FUNCTION(
this << position);
115 m_velocity = Vector(distance.x / time, distance.y / time, distance.z / time);
117 NS_LOG_INFO(
"Changing position from " <<
m_geoPosition <<
" to " << position <<
". Velocity is "
127 NS_LOG_FUNCTION(
this);
135 NS_LOG_FUNCTION(
this << position);
143 NS_LOG_FUNCTION(
this);
151 NS_LOG_FUNCTION(
this);
154 Singleton<SatPositionInputTraceContainer>::Get()->GetPosition(
m_traceFilename,
GeoCoordinate class is used to store and operate with geodetic coordinates.
Vector ToVector() const
Converts Geodetic coordinates to Cartesian coordinates.
SatMobilityModel()
Default constructor.
void NotifyGeoCourseChange(void) const
Satellite mobility model for which the current position change based on values read from a file.
void SetSatId(uint32_t satId)
Set the satellite ID linked to this node.
static TypeId GetTypeId(void)
Get the type ID.
virtual void DoSetPosition(const Vector &position)
uint32_t GetBestBeamId(bool ignoreNan=false) const
Return the best beam ID based on the current position.
Ptr< SatAntennaGainPatternContainer > m_antennaGainPatterns
virtual ~SatTracedMobilityModel()
Destructor for SatMobilityModel.
virtual Vector DoGetPosition(void) const
uint32_t GetSatId(void) const
Return the satellite ID linked to this node.
virtual Vector DoGetVelocity(void) const
GeoCoordinate m_geoPosition
virtual void DoDispose()
Dispose of this class instance.
void UpdateGeoPositionFromFile(void)
SatTracedMobilityModel()
Default constructor.
virtual GeoCoordinate DoGetGeoPosition(void) const
virtual void DoSetGeoPosition(const GeoCoordinate &position)
GeoCoordinate::ReferenceEllipsoid_t m_refEllipsoid
std::string m_traceFilename
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.