satellite-traced-mobility-model.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2018 CNES
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mathias Ettinger <mettinger@toulouse.viveris.com>
19  */
20 
21 #ifndef SATELLITE_TRACED_MOBILITY_MODEL_H
22 #define SATELLITE_TRACED_MOBILITY_MODEL_H
23 
26 
27 #include <ns3/nstime.h>
28 
29 #include <stdint.h>
30 #include <string>
31 
32 namespace ns3
33 {
34 
42 {
43  public:
48  static TypeId GetTypeId(void);
49  TypeId GetInstanceTypeId(void) const;
50 
54  virtual void DoDispose();
55 
60 
64  SatTracedMobilityModel(uint32_t satId,
65  const std::string& filename,
66  Ptr<SatAntennaGainPatternContainer> agp);
67 
71  virtual ~SatTracedMobilityModel();
72 
76  void SetSatId(uint32_t satId);
77 
81  uint32_t GetSatId(void) const;
82 
88  uint32_t GetBestBeamId(bool ignoreNan = false) const;
89 
90  private:
94  virtual Vector DoGetVelocity(void) const;
95 
99  virtual GeoCoordinate DoGetGeoPosition(void) const;
100 
104  virtual void DoSetGeoPosition(const GeoCoordinate& position);
105 
106  void UpdateGeoPositionFromFile(void);
107 
108  uint32_t m_satId;
109  std::string m_traceFilename;
113  Vector m_velocity;
114  Ptr<SatAntennaGainPatternContainer> m_antennaGainPatterns;
115 };
116 
117 } // namespace ns3
118 
119 #endif /* SATELLITE_TRACED_MOBILITY_MODEL_H */
GeoCoordinate class is used to store and operate with geodetic coordinates.
Keep track of the current position and velocity of an object in satellite network.
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.
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.
uint32_t GetSatId(void) const
Return the satellite ID linked to this node.
virtual void DoDispose()
Dispose of this class instance.
virtual GeoCoordinate DoGetGeoPosition(void) const
virtual void DoSetGeoPosition(const GeoCoordinate &position)
GeoCoordinate::ReferenceEllipsoid_t m_refEllipsoid
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.