GalINavISC.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 //
28 // This software was developed by Applied Research Laboratories at the
29 // University of Texas at Austin, under contract to an agency or agencies
30 // within the U.S. Department of Defense. The U.S. Government retains all
31 // rights to use, duplicate, distribute, disclose, or release this software.
32 //
33 // Pursuant to DoD Directive 523024
34 //
35 // DISTRIBUTION STATEMENT A: This software has been approved for public
36 // release, distribution is unlimited.
37 //
38 //==============================================================================
39 #include <cmath>
40 #include "GalINavISC.hpp"
41 #include "FreqConv.hpp"
42 
43 using namespace std;
44 
45 namespace gnsstk
46 {
47  GalINavISC ::
48  GalINavISC()
49  : bgdE1E5a(std::numeric_limits<double>::quiet_NaN()),
50  bgdE1E5b(std::numeric_limits<double>::quiet_NaN())
51  {
52  weekFmt = "%4L(%4l)";
53  msgLenSec = 2.0;
54  }
55 
56 
57  void GalINavISC ::
58  dumpCorrections(std::ostream& s) const
59  {
60  const ios::fmtflags oldFlags = s.flags();
61  s << " CORRECTION"
62  << endl << endl
63  << scientific << setprecision(8) << setfill(' ')
64  << setw(20) << left << "BGD(E1,E5a):" << setw(15) << bgdE1E5a << endl
65  << setw(20) << left << "BGD(E1,E5b):" << setw(15) << bgdE1E5b << endl;
66  s.flags(oldFlags);
67  }
68 
69 
70  bool GalINavISC ::
71  validate() const
72  {
73  return !(std::isnan(bgdE1E5a) || std::isnan(bgdE1E5b));
74  }
75 
76 
77  bool GalINavISC ::
78  getISC(const ObsID& oid, double& corrOut)
79  const
80  {
81  if ((oid.band == CarrierBand::L1) && // same as E1
82  ((oid.code == TrackingCode::E1B) ||
83  (oid.code == TrackingCode::E1C)))
84  {
94  if (std::isnan(bgdE1E5b))
95  return false;
96  corrOut = -bgdE1E5b;
97  return true;
98  }
99  else if ((oid.band == CarrierBand::L5) && // same as E5a
100  ((oid.code == TrackingCode::E5aI) ||
101  (oid.code == TrackingCode::E5aQ)))
102  {
103  if (std::isnan(bgdE1E5a))
104  return false;
105  corrOut = -(getGamma(CarrierBand::L1,oid.band) * bgdE1E5a);
106  return true;
107  }
108  else if ((oid.band == CarrierBand::E5b) &&
109  ((oid.code == TrackingCode::E5bI) ||
110  (oid.code == TrackingCode::E5bQ)))
111  {
112  if (std::isnan(bgdE1E5b))
113  return false;
114  corrOut = -(getGamma(CarrierBand::L1,oid.band) * bgdE1E5b);
115  return true;
116  }
117  return false;
118  }
119 }
gnsstk::NavData::msgLenSec
double msgLenSec
Definition: NavData.hpp:199
gnsstk::getGamma
double getGamma(CarrierBand band1, CarrierBand band2)
Definition: FreqConv.cpp:67
gnsstk::TrackingCode::E5bQ
@ E5bQ
Galileo E5b Q code.
gnsstk::TrackingCode::E1B
@ E1B
Galileo E1-B signal, supporting OS/HAS/SoL.
gnsstk::CarrierBand::E5b
@ E5b
Galileo E5b.
gnsstk::GalINavISC::dumpCorrections
void dumpCorrections(std::ostream &s) const override
Definition: GalINavISC.cpp:58
gnsstk::GalINavISC::getISC
bool getISC(const ObsID &oid, double &corrOut) const override
Definition: GalINavISC.cpp:78
example5.oid
oid
Definition: example5.py:29
FreqConv.hpp
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::TrackingCode::E5aI
@ E5aI
Galileo E5a I code.
gnsstk::NavData::weekFmt
std::string weekFmt
Definition: NavData.hpp:193
GalINavISC.hpp
gnsstk::ObsID
Definition: ObsID.hpp:82
gnsstk::GalINavISC::bgdE1E5a
double bgdE1E5a
Broadcast group delay for the E1,E5a pair.
Definition: GalINavISC.hpp:99
gnsstk::GalINavISC::bgdE1E5b
double bgdE1E5b
Broadcast group delay for the E1,E5b pair.
Definition: GalINavISC.hpp:100
gnsstk::CarrierBand::L1
@ L1
GPS L1, Galileo E1, SBAS L1, QZSS L1, BeiDou L1.
std
Definition: Angle.hpp:142
gnsstk::TrackingCode::E5bI
@ E5bI
Galileo E5b I code.
gnsstk::TrackingCode::E5aQ
@ E5aQ
Galileo E5a Q code.
gnsstk::GalINavISC::validate
bool validate() const override
Definition: GalINavISC.cpp:71
gnsstk::TrackingCode::E1C
@ E1C
Galileo E1 Dataless code.
gnsstk::CarrierBand::L5
@ L5
GPS L5, Galileo E5a, SBAS L5, QZSS L5, BeiDou B2a, NavIC L5.


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