27 #include <ns3/simulator.h>
28 #include <ns3/singleton.h>
30 NS_LOG_COMPONENT_DEFINE(
"SatTracedMobilityModel");
35 NS_OBJECT_ENSURE_REGISTERED(SatTracedMobilityModel);
41 TypeId(
"ns3::SatTracedMobilityModel")
43 .AddConstructor<SatTracedMobilityModel>()
44 .AddAttribute(
"ReferenceEllipsoid",
45 "Reference Ellipsoid model to use when reading coordinates",
54 .AddAttribute(
"UpdateInterval",
55 "Interval at which the position should update",
56 TimeValue(MilliSeconds(1)),
58 MakeTimeChecker(FemtoSeconds(1)));
79 NS_FATAL_ERROR(
"SatTracedMobilityModel default constructor should not be used");
83 const std::string& filename,
84 Ptr<SatAntennaGainPatternContainer> agp)
86 m_traceFilename(filename),
87 m_updateInterval(MilliSeconds(1)),
89 m_geoPosition(0.0, 0.0, 0.0),
90 m_velocity(0.0, 0.0, 0.0),
91 m_antennaGainPatterns(agp)
93 NS_LOG_FUNCTION(
this);
100 NS_LOG_FUNCTION(
this);
106 NS_LOG_FUNCTION(
this);
114 NS_LOG_FUNCTION(
this << position);
118 m_velocity = Vector(distance.x / time, distance.y / time, distance.z / time);
120 NS_LOG_INFO(
"Changing position from " <<
m_geoPosition <<
" to " << position <<
". Velocity is "
130 NS_LOG_FUNCTION(
this);
138 NS_LOG_FUNCTION(
this);
141 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.
Keep track of the current position and velocity of an object in satellite network.
void NotifyGeoCourseChange(void) const
uint32_t GetBestBeamId(void) const
Return the best beam ID based on the current position.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< SatAntennaGainPatternContainer > m_antennaGainPatterns
virtual ~SatTracedMobilityModel()
Destructor for SatMobilityModel.
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)
TypeId GetInstanceTypeId(void) const
GeoCoordinate::ReferenceEllipsoid_t m_refEllipsoid
std::string m_traceFilename
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.