FreqConv.cpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
39 #include "FreqConv.hpp"
40 
41 namespace gnsstk
42 {
44  {
45  switch (band)
46  {
47  case CarrierBand::L1: return FREQ_GPS_L1;
48  case CarrierBand::L2: return FREQ_GPS_L2;
49  case CarrierBand::L5: return FREQ_GPS_L5;
50  case CarrierBand::G1: return FREQ_GLONASS_G1;
53  case CarrierBand::G2: return FREQ_GLONASS_G2;
54  case CarrierBand::G3: return FREQ_GLONASS_G3;
57  case CarrierBand::E6: return FREQ_GALILEO_E6;
58  case CarrierBand::B1: return FREQ_BEIDOU_B1;
59  case CarrierBand::B2: return FREQ_BEIDOU_B2b;
60  case CarrierBand::B3: return FREQ_BEIDOU_B3;
61  case CarrierBand::I9: return FREQ_NAVIC_S;
62  default: return 0.0;
63  }
64  }
65 
66 
67  double getGamma(CarrierBand band1, CarrierBand band2)
68  {
69  double freq1 = getFrequency(band1);
70  double freq2 = getFrequency(band2);
71  double gammaRoot = freq1/freq2;
72  return gammaRoot * gammaRoot;
73  }
74 } // namespace gnsstk
gnsstk::getGamma
double getGamma(CarrierBand band1, CarrierBand band2)
Definition: FreqConv.cpp:67
gnsstk::CarrierBand::G1
@ G1
GLONASS G1.
gnsstk::FREQ_GALILEO_E5b
const double FREQ_GALILEO_E5b
Galileo E5b carrier frequency in Hz.
Definition: FreqConsts.hpp:100
gnsstk::FREQ_GPS_L2
const double FREQ_GPS_L2
GPS L2 carrier frequency in Hz.
Definition: FreqConsts.hpp:60
gnsstk::CarrierBand::I9
@ I9
NavIC S.
gnsstk::CarrierBand::E5b
@ E5b
Galileo E5b.
gnsstk::CarrierBand
CarrierBand
Definition: CarrierBand.hpp:54
gnsstk::FREQ_BEIDOU_B3
const double FREQ_BEIDOU_B3
BeiDou B3 carrier frequency in Hz.
Definition: FreqConsts.hpp:156
FreqConv.hpp
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::CarrierBand::L2
@ L2
GPS L2, QZSS L2.
gnsstk::FREQ_GALILEO_E6
const double FREQ_GALILEO_E6
Galileo E6 carrier frequency in Hz.
Definition: FreqConsts.hpp:112
gnsstk::FREQ_GLONASS_G1
const double FREQ_GLONASS_G1
GLONASS G1 carrier frequency in Hz.
Definition: FreqConsts.hpp:68
gnsstk::CarrierBand::B3
@ B3
BeiDou B3.
gnsstk::CarrierBand::B1
@ B1
BeiDou B1.
gnsstk::CarrierBand::G3
@ G3
GLONASS G3.
gnsstk::FREQ_BEIDOU_B2b
const double FREQ_BEIDOU_B2b
BeiDou B2b carrier frequency in Hz.
Definition: FreqConsts.hpp:152
gnsstk::FREQ_GPS_L1
const double FREQ_GPS_L1
GPS L1 carrier frequency in Hz.
Definition: FreqConsts.hpp:56
gnsstk::CarrierBand::G1a
@ G1a
GLONASS G1a.
gnsstk::FREQ_GLONASS_G1a
const double FREQ_GLONASS_G1a
GLONASS G1a carrier frequency in Hz.
Definition: FreqConsts.hpp:72
gnsstk::CarrierBand::E5ab
@ E5ab
Galileo E5, BeiDou B2.
gnsstk::FREQ_GLONASS_G3
const double FREQ_GLONASS_G3
GLONASS G3 carrier frequency in Hz.
Definition: FreqConsts.hpp:92
gnsstk::FREQ_BEIDOU_B1
const double FREQ_BEIDOU_B1
BeiDou B1 carrier frequency in Hz.
Definition: FreqConsts.hpp:148
gnsstk::CarrierBand::L1
@ L1
GPS L1, Galileo E1, SBAS L1, QZSS L1, BeiDou L1.
gnsstk::CarrierBand::G2a
@ G2a
GLONASS G2a.
gnsstk::FREQ_GALILEO_E5
const double FREQ_GALILEO_E5
Galileo E5 carrier frequency in Hz.
Definition: FreqConsts.hpp:104
gnsstk::CarrierBand::B2
@ B2
BeiDou B2b.
gnsstk::FREQ_GPS_L5
const double FREQ_GPS_L5
GPS L5 carrier frequency in Hz.
Definition: FreqConsts.hpp:64
gnsstk::getFrequency
double getFrequency(CarrierBand band)
Definition: FreqConv.cpp:43
gnsstk::FREQ_GLONASS_G2
const double FREQ_GLONASS_G2
GLONASS G2 carrier frequency in Hz.
Definition: FreqConsts.hpp:80
gnsstk::FREQ_GLONASS_G2a
const double FREQ_GLONASS_G2a
GLONASS G2a carrier frequency in Hz.
Definition: FreqConsts.hpp:76
gnsstk::CarrierBand::E6
@ E6
Galileo E6, QZSS L6.
gnsstk::FREQ_NAVIC_S
const double FREQ_NAVIC_S
NavIC S carrier frequency in Hz.
Definition: FreqConsts.hpp:168
gnsstk::CarrierBand::L5
@ L5
GPS L5, Galileo E5a, SBAS L5, QZSS L5, BeiDou B2a, NavIC L5.
gnsstk::CarrierBand::G2
@ G2
GLONASS G2.


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39