satellite-antenna-gain-pattern-container.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013 Magister Solutions Ltd.
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: Jani Puttonen <jani.puttonen@magister.fi>
19  */
20 
21 #ifndef SATELLITE_ANTENNA_GAIN_PATTERN_CONTAINER_H_
22 #define SATELLITE_ANTENNA_GAIN_PATTERN_CONTAINER_H_
23 
24 #include "geo-coordinate.h"
26 
27 #include "ns3/satellite-beam-user-info.h"
28 
29 #include <map>
30 #include <stdint.h>
31 #include <string>
32 #include <utility>
33 
34 namespace ns3
35 {
36 
37 class SatMobilityModel;
38 
50 class SatAntennaGainPatternContainer : public Object
51 {
52  public:
57  static TypeId GetTypeId(void);
58  TypeId GetInstanceTypeId() const;
59 
64 
70  SatAntennaGainPatternContainer(uint32_t nbSats, std::string patternsFolder);
72 
76  typedef std::map<std::pair<uint32_t, uint32_t>, SatBeamUserInfo> BeamUserInfoMap_t;
77 
83 
89  Ptr<SatAntennaGainPattern> GetAntennaGainPattern(uint32_t beamId) const;
90 
96  Ptr<SatMobilityModel> GetAntennaMobility(uint32_t satelliteId) const;
97 
102  uint32_t GetNAntennaGainPatterns() const;
103 
112  uint32_t GetBestBeamId(uint32_t satelliteId, GeoCoordinate coord, bool ignoreNan);
113 
121  double GetBeamGain(uint32_t satelliteId, uint32_t beamId, GeoCoordinate coord);
122 
123  void ConfigureBeamsMobility(uint32_t satelliteId, Ptr<SatMobilityModel> mobility);
124 
126 
127  private:
128  std::string m_patternsFolder;
129 
133  std::map<uint32_t, Ptr<SatAntennaGainPattern>> m_antennaPatternMap;
134 
138  std::map<uint32_t, Ptr<SatMobilityModel>> m_mobilityModelMap;
139 };
140 
141 } // namespace ns3
142 
143 #endif /* SATELLITE_ANTENNA_GAIN_PATTERN_CONTAINER_H_ */
GeoCoordinate class is used to store and operate with geodetic coordinates.
Antenna gain pattern container holds all antenna patterns related to a satellite system.
double GetBeamGain(uint32_t satelliteId, uint32_t beamId, GeoCoordinate coord)
Get beam gain for given coordinates.
Ptr< SatAntennaGainPattern > GetAntennaGainPattern(uint32_t beamId) const
Get the antenna pattern of a specified beam id.
GeoCoordinate GetDefaultGeoPosition()
Load the default satellite position associated to these traces.
uint32_t GetBestBeamId(uint32_t satelliteId, GeoCoordinate coord, bool ignoreNan)
Get the best beam id based on the antenna patterns in a specified geo coordinate.
std::map< uint32_t, Ptr< SatAntennaGainPattern > > m_antennaPatternMap
Container of antenna patterns.
uint32_t GetNAntennaGainPatterns() const
Get the number of stored antenna pattern.
std::map< std::pair< uint32_t, uint32_t >, SatBeamUserInfo > BeamUserInfoMap_t
definition for beam map key is pair sat ID / beam ID and value is UT/user info.
void ConfigureBeamsMobility(uint32_t satelliteId, Ptr< SatMobilityModel > mobility)
Ptr< SatMobilityModel > GetAntennaMobility(uint32_t satelliteId) const
Get the mobility model of a specified satellite id.
std::map< uint32_t, Ptr< SatMobilityModel > > m_mobilityModelMap
Container of mobility models.
Class that holds information for each beam regarding UTs and their users camped in each beam.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.