satellite-utils.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: Sami Rantanen <sami.rantanen@magister.fi>
19  */
20 #ifndef SATELLITE_UTILS_H
21 #define SATELLITE_UTILS_H
22 
23 #include "satellite-enums.h"
24 #include "satellite-mac-tag.h"
25 
26 #include <ns3/mac48-address.h>
27 #include <ns3/packet.h>
28 
29 #include <cmath>
30 #include <limits>
31 #include <sstream>
32 #include <stdint.h>
33 #include <string>
34 #include <utility>
35 #include <vector>
36 
37 namespace ns3
38 {
39 
46 class SatUtils
47 {
48  public:
55  template <typename T>
56  static inline T RadiansToDegrees(T radian)
57  {
58  return (T)((radian) * (180.0 / M_PI));
59  }
60 
67  template <typename T>
68  static inline T DegreesToRadians(T degree)
69  {
70  return (T)((degree) * (M_PI / 180.0));
71  }
72 
78  template <typename T>
79  static inline T MinLin()
80  {
81  return (T)(std::numeric_limits<T>::min());
82  }
83 
89  template <typename T>
90  static inline T MaxLin()
91  {
92  return (T)(std::numeric_limits<T>::max());
93  }
94 
100  template <typename T>
101  static inline T MinDb()
102  {
103  return (T)LinearToDb(MinLin<T>());
104  }
105 
111  template <typename T>
112  static inline T MaxDb()
113  {
114  return (T)LinearToDb(MaxLin<T>());
115  }
116 
123  template <typename T>
124  static inline T DbWToW(T dbw)
125  {
126  return (T)DbToLinear<T>(dbw);
127  }
128 
135  template <typename T>
136  static inline T WToDbW(T w)
137  {
138  return (T)LinearToDb<T>(w);
139  }
140 
150  template <typename T>
151  static inline T DbToLinear(T db)
152  {
153  if ((db < MinDb<T>() && (std::isinf(-db) != false)) || db > MaxDb<T>())
154  {
155  NS_FATAL_ERROR("SatUtils::DbToLinear - unsupported value: " << db);
156  }
157 
158  return (T)std::pow(10.0, db / 10.0);
159  }
160 
169  template <typename T>
170  static inline T LinearToDb(T linear)
171  {
172  if ((linear < MinLin<T>() && linear != 0) || linear > MaxLin<T>())
173  {
174  NS_FATAL_ERROR("SatUtils::LinearToDb - unsupported value: " << linear);
175  }
176 
177  return (T)(10.0 * std::log10(linear));
178  }
179 
186  template <typename T>
187  static inline T DbmToW(T dbm)
188  {
189  return (DbWToW<T>(dbm) / 1000);
190  }
191 
198  template <typename T>
199  static inline T WToDbm(T w)
200  {
201  return (T)(WToDbW<T>(w * 1000.0));
202  }
203 
210  static inline std::string GetPacketInfo(const Ptr<const Packet> p)
211  {
212  std::ostringstream oss;
213  oss << p->GetUid() << " ";
214  SatMacTag tag;
215  if (p->PeekPacketTag(tag))
216  {
217  oss << tag.GetSourceAddress() << " ";
218  oss << tag.GetDestAddress() << " ";
219  }
220  return oss.str();
221  }
222 
229  static inline std::string GetPacketInfo(const std::vector<Ptr<Packet>> packets)
230  {
231  std::ostringstream oss;
232  for (std::vector<Ptr<Packet>>::const_iterator it = packets.begin(); it != packets.end();
233  ++it)
234  {
235  oss << GetPacketInfo(*it);
236  }
237  return oss.str();
238  }
239 
246  static inline uint32_t GetModulatedBits(SatEnums::SatModcod_t modcod)
247  {
248  switch (modcod)
249  {
250  // DVB-S2
252  return 1;
253  break;
254  }
264  return 2;
265  break;
266  }
273  return 3;
274  break;
275  }
284  return 4;
285  break;
286  }
291  return 5;
292  break;
293  }
294  // DVB-S2X
355  return 2;
356  break;
357  }
394  return 3;
395  break;
396  }
459  return 4;
460  break;
461  }
492  return 5;
493  break;
494  }
505  return 6;
506  break;
507  }
512  return 7;
513  break;
514  }
527  return 8;
528  break;
529  }
530  default: {
531  NS_FATAL_ERROR("Unsupported enum SatModcod_t!");
532  break;
533  }
534  }
535  return 0;
536  }
537 
544  static inline double GetCodingRate(SatEnums::SatModcod_t modcod)
545  {
546  switch (modcod)
547  {
548  // DVB-S2
551  return 1.0 / 3.0;
552  break;
553  }
555  return 1.0 / 2.0;
556  break;
557  }
561  return 2.0 / 3.0;
562  break;
563  }
569  return 3.0 / 4.0;
570  break;
571  }
574  return 3.0 / 5.0;
575  break;
576  }
580  return 4.0 / 5.0;
581  break;
582  }
588  return 5.0 / 6.0;
589  break;
590  }
595  return 8.0 / 9.0;
596  break;
597  }
601  return 9.0 / 10.0;
602  break;
603  }
604  // DVB-S2X
607  return 11.0 / 45.0;
608  break;
609  }
614  return 1.0 / 4.0;
615  break;
616  }
619  return 4.0 / 15.0;
620  break;
621  }
624  return 13.0 / 45.0;
625  break;
626  }
629  return 14.0 / 45.0;
630  break;
631  }
636  return 1.0 / 3.0;
637  break;
638  }
643  return 2.0 / 5.0;
644  break;
645  }
648  return 9.0 / 20.0;
649  break;
650  }
657  return 7.0 / 15.0;
658  break;
659  }
666  return 1.0 / 2.0;
667  break;
668  }
677  return 8.0 / 15.0;
678  break;
679  }
682  return 11.0 / 20.0;
683  break;
684  }
689  return 5.0 / 9.0;
690  break;
691  }
700  return 26.0 / 45.0;
701  break;
702  }
717  return 3.0 / 5.0;
718  break;
719  }
722  return 28.0 / 45.0;
723  break;
724  }
729  return 23.0 / 36.0;
730  break;
731  }
734  return 29.0 / 45.0;
735  break;
736  }
757  return 2.0 / 3.0;
758  break;
759  }
762  return 31.0 / 45.0;
763  break;
764  }
769  return 25.0 / 36.0;
770  break;
771  }
786  return 32.0 / 45.0;
787  break;
788  }
793  return 13.0 / 18.0;
794  break;
795  }
802  return 11.0 / 15.0;
803  break;
804  }
825  return 3.0 / 4.0;
826  break;
827  }
836  return 7.0 / 9.0;
837  break;
838  }
853  return 4.0 / 5.0;
854  break;
855  }
874  return 5.0 / 6.0;
875  break;
876  }
879  return 77.0 / 90.0;
880  break;
881  }
898  return 8.0 / 9.0;
899  break;
900  }
909  return 9.0 / 10.0;
910  break;
911  }
912  default: {
913  NS_FATAL_ERROR("Unsupported enum SatModcod_t!");
914  break;
915  }
916  }
917  return 0.0;
918  }
919 
921  {
922  switch (modcod)
923  {
1006  return SatEnums::SHORT_FRAME;
1007  break;
1008  }
1141  return SatEnums::NORMAL_FRAME;
1142  break;
1143  }
1144  default: {
1145  NS_FATAL_ERROR("Frame type not found");
1146  break;
1147  }
1148  }
1149 
1150  return SatEnums::NORMAL_FRAME;
1151  }
1152 
1164  static inline double Interpolate(double x, double x0, double x1, double y0, double y1)
1165  {
1166  double dX = x1 - x0;
1167  double dY = y1 - y0;
1168  double relX = x - x0;
1169  double relY = (dY / dX) * relX;
1170  return y0 + relY;
1171  }
1172 
1178  static inline double ScalarProduct(const std::vector<std::pair<double, double>>& vector)
1179  {
1180  double scalarProduct = 0.0;
1181  for (const std::pair<double, double>& element : vector)
1182  {
1183  scalarProduct += element.first * element.second;
1184  }
1185  return scalarProduct;
1186  }
1187 
1188  private:
1195  virtual ~SatUtils() = 0;
1196 };
1197 
1198 } // namespace ns3
1199 
1200 #endif /* SATELLITE_UTILS_H */
SatBbFrameType_t
BB frame type used in DVB-S2 FWD link.
SatModcod_t
Modulation scheme and coding rate for DVB-S2.
@ SAT_MODCOD_S2X_16APSK_2_TO_3_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_9_TO_10_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_2_TO_3_NORMAL_PILOTS
@ SAT_MODCOD_S2X_256APSK_32_TO_45_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_5_TO_6_SHORT_PILOTS
@ SAT_MODCOD_S2X_8PSK_3_TO_5_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_128APSK_7_TO_9_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_8_TO_15_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_8_TO_15_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_256APSK_11_TO_15_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_4_TO_5_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_3_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_256APSK_3_TO_4_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_3_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_4_TO_5_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_32_TO_45_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_13_TO_45_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_7_TO_15_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_1_TO_2_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_2_TO_5_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_32_TO_45_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_5_TO_6_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_7_TO_9_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_8_TO_9_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_3_TO_4_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_23_TO_36_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_2_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_3_TO_5_NORMAL_PILOTS
@ SAT_MODCOD_S2X_256APSK_11_TO_15_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_64APSK_32_TO_45_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_1_TO_2_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_2_TO_5_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_5_TO_6_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_9_TO_10_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_8_TO_15_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_25_TO_36_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_32_TO_45_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_3_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_5_TO_9_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_64APSK_32_TO_45_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_128APSK_3_TO_4_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_8_TO_9_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_13_TO_18_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8APSK_5_TO_9_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_4_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_32_TO_45_SHORT_PILOTS
@ SAT_MODCOD_S2X_32APSK_32_TO_45_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8APSK_26_TO_45_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_2_TO_3_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_128APSK_3_TO_4_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_4_TO_5_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_8_TO_15_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_5_TO_6_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_4_TO_5_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_3_TO_5_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_26_TO_45_SHORT_PILOTS
@ SAT_MODCOD_S2X_32APSK_9_TO_10_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_64APSK_11_TO_15_NORMAL_PILOTS
@ SAT_MODCOD_S2X_8PSK_5_TO_6_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_8_TO_9_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_23_TO_36_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_4_TO_5_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_5_NORMAL_PILOTS
@ SAT_MODCOD_S2X_8PSK_3_TO_4_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_64APSK_7_TO_9_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_8_TO_9_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_2_TO_3_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_4_TO_5_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_2_TO_3_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_5_TO_6_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_5_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_2_TO_3_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_8_TO_9_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_28_TO_45_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_23_TO_36_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_4_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_25_TO_36_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_3_TO_5_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_2_TO_3_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_14_TO_45_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_5_TO_6_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_5_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_5_TO_6_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_32_TO_45_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_5_TO_6_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_3_TO_4_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_4_TO_15_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_5_TO_6_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_11_TO_20_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_3_TO_4_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_32_TO_45_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_7_TO_15_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_11_TO_20_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_4_TO_5_NORMAL_PILOTS
@ SAT_MODCOD_S2X_256APSK_29_TO_45_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_64APSK_11_TO_15_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_8_TO_9_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_2_TO_3_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_5_TO_6_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_8_TO_9_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_2_TO_3_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_3_TO_5_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_7_TO_15_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_256APSK_31_TO_45_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_8_TO_9_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_7_TO_15_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_4_TO_5_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_28_TO_45_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_3_TO_4_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_13_TO_45_NORMAL_PILOTS
@ SAT_MODCOD_S2X_8PSK_3_TO_5_SHORT_PILOTS
@ SAT_MODCOD_S2X_64APSK_5_TO_6_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_5_TO_6_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_2_TO_3_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_25_TO_36_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_5_TO_6_SHORT_PILOTS
@ SAT_MODCOD_S2X_32APSK_11_TO_15_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_4_TO_5_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_5_TO_6_SHORT_PILOTS
@ SAT_MODCOD_S2X_32APSK_32_TO_45_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_4_TO_5_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_4_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8APSK_5_TO_9_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_13_TO_18_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_8_TO_15_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_5_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_5_TO_6_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_4_TO_5_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_5_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_256APSK_31_TO_45_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_8_TO_9_SHORT_PILOTS
@ SAT_MODCOD_S2X_256APSK_32_TO_45_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_3_TO_5_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_5_TO_6_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_7_TO_9_NORMAL_PILOTS
@ SAT_MODCOD_S2X_8PSK_7_TO_15_SHORT_PILOTS
@ SAT_MODCOD_S2X_64APSK_5_TO_6_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_9_TO_10_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_13_TO_18_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_9_TO_20_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8APSK_26_TO_45_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_64APSK_7_TO_9_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_3_TO_4_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_9_TO_20_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_4_SHORT_PILOTS
@ SAT_MODCOD_S2X_256APSK_2_TO_3_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_26_TO_45_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_2_TO_3_SHORT_PILOTS
@ SAT_MODCOD_S2X_256APSK_29_TO_45_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_256APSK_2_TO_3_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_64APSK_4_TO_5_NORMAL_PILOTS
@ SAT_MODCOD_S2X_8PSK_3_TO_4_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_8_TO_15_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_5_TO_9_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_4_NORMAL_PILOTS
@ SAT_MODCOD_S2X_8PSK_2_TO_3_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_13_TO_18_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_77_TO_90_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_4_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_8_TO_9_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_9_TO_10_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_8_TO_9_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_2_TO_3_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_2_TO_5_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_32_TO_45_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_2_TO_3_SHORT_PILOTS
@ SAT_MODCOD_S2X_32APSK_7_TO_9_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_32_TO_45_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_3_TO_4_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_3_TO_4_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_25_TO_36_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_3_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_3_TO_5_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_3_TO_4_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_7_TO_9_NORMAL_PILOTS
@ SAT_MODCOD_S2X_8PSK_8_TO_9_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_2_NORMAL_PILOTS
@ SAT_MODCOD_S2X_64APSK_4_TO_5_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_2_TO_5_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_8_TO_9_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_8_TO_9_NORMAL_PILOTS
@ SAT_MODCOD_S2X_8PSK_2_TO_3_NORMAL_PILOTS
@ SAT_MODCOD_S2X_8PSK_2_TO_3_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_2_TO_3_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_4_TO_15_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_2_TO_3_L_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_23_TO_36_NORMAL_PILOTS
@ SAT_MODCOD_S2X_16APSK_26_TO_45_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_26_TO_45_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_3_TO_5_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_8_TO_9_SHORT_PILOTS
@ SAT_MODCOD_S2X_QPSK_14_TO_45_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_4_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_26_TO_45_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_2_SHORT_PILOTS
@ SAT_MODCOD_S2X_32APSK_8_TO_9_SHORT_PILOTS
@ SAT_MODCOD_S2X_8PSK_26_TO_45_SHORT_PILOTS
@ SAT_MODCOD_S2X_8PSK_9_TO_10_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_8PSK_9_TO_10_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_8_TO_15_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_3_TO_4_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_2_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_11_TO_45_SHORT_PILOTS
@ SAT_MODCOD_S2X_16APSK_8_TO_15_L_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_11_TO_15_NORMAL_PILOTS
@ SAT_MODCOD_S2X_32APSK_3_TO_4_SHORT_PILOTS
@ SAT_MODCOD_S2X_8PSK_7_TO_15_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_1_TO_4_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_128APSK_7_TO_9_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_QPSK_9_TO_10_NORMAL_PILOTS
@ SAT_MODCOD_S2X_QPSK_11_TO_45_SHORT_NOPILOTS
@ SAT_MODCOD_S2X_16APSK_77_TO_90_NORMAL_NOPILOTS
@ SAT_MODCOD_S2X_32APSK_4_TO_5_SHORT_PILOTS
@ SAT_MODCOD_S2X_256APSK_3_TO_4_NORMAL_PILOTS
This class implements a tag that carries the satellite MAC specific information, such as source and d...
Mac48Address GetSourceAddress(void) const
Get source MAC address.
Mac48Address GetDestAddress(void) const
Get destination MAC address.
SatUtils class is for general conversions used in satellite module.
static T DbWToW(T dbw)
Converts Decibel Watts to Watts.
static T WToDbm(T w)
Converts Watts to Decibel milli Watts.
static SatEnums::SatBbFrameType_t GetFrameTypeS2X(SatEnums::SatModcod_t modcod)
static double Interpolate(double x, double x0, double x1, double y0, double y1)
Simple linear interpolation.
static double ScalarProduct(const std::vector< std::pair< double, double >> &vector)
Scalar product.
static T DbToLinear(T db)
Converts decibels to linear.
static T MinDb()
Get minimum value for Decibel.
static T RadiansToDegrees(T radian)
Converts radians to degrees.
static T DbmToW(T dbm)
Converts Decibel milli Watts to Watts.
static std::string GetPacketInfo(const std::vector< Ptr< Packet >> packets)
Gets packet information in std::string for printing purposes.
static T DegreesToRadians(T degree)
Converts degrees to radians.
static T WToDbW(T w)
Converts Watts to Decibel Watts.
static T LinearToDb(T linear)
Converts linear to decibels.
virtual ~SatUtils()=0
Destructor.
static uint32_t GetModulatedBits(SatEnums::SatModcod_t modcod)
Get the modulated bits of a certain MODCOD.
static T MaxLin()
Get maximum value for linear.
static double GetCodingRate(SatEnums::SatModcod_t modcod)
Gets the coding rate of a certain MODCOD.
static T MaxDb()
Get maximum value for Decibel.
static std::string GetPacketInfo(const Ptr< const Packet > p)
Get packet information in std::string for printing purposes.
static T MinLin()
Get minimum value for linear.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.