GLOCNavAlmNumberCruncher.hpp
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 #ifndef GNSSTK_GLOCNAVALMNUMBERCRUNCHER_CPP
40 #define GNSSTK_GLOCNAVALMNUMBERCRUNCHER_CPP
41 
45 #include "DebugTrace.hpp"
46 
47 namespace gnsstk
48 {
50  getXvt(const GLOCNavAlm& alm,
51  const gnsstk::CommonTime& toi)
52  {
53  setDeltatpr(alm.Toa, toi);
54  setW(alm.deltaT);
55  setTdr(alm.deltaT, alm.deltaTdot);
56  setn();
58  setE0(alm.ecc);
59  setL1(alm.ecc);
60  setL(alm.deltaT, alm.deltaTdot);
61  setB();
65  return corrected.getXvt(toi);
66  }
67 
68 
71  {
72  Deltatpr = ti - almTime;
73  }
74 
75 
77  setW(double DeltaTA)
78  {
79  W = Deltatpr / (Tav + DeltaTA);
80  }
81 
82 
84  setTdr(double DeltaTA, double DeltaTdotA)
85  {
86  Tdr = Tav + DeltaTA + (2*W + 1) * DeltaTdotA;
87  }
88 
89 
92  {
93  n = (2.0*gnsstk::PI)/Tdr;
94  }
95 
96 
98  setE0(double epsilonA)
99  {
100  double E0Term1 = (1.0 - epsilonA) / (1.0 + epsilonA);
101  double E0Term2 = sqrt(E0Term1) * tan(uncorrected.getomega() / 2.0);
102  E0 = -2.0 * atan(E0Term2);
103  }
104 
105 
107  setL1(double epsilonA)
108  {
109  L1 = uncorrected.getomega() + E0 - (epsilonA * sin(E0));
110  }
111 
112 
114  setL(double DeltaTA, double DeltaTdotA)
115  {
116  L = L1 + n * (Deltatpr - ((Tav+DeltaTA)*W) - (DeltaTdotA*W*W));
117  }
118 
119 
122  {
123  B = ((3.0 * J20 * ae * ae) /
124  (2.0 * uncorrected.geta() * uncorrected.geta()));
125  }
126 } // namespace gnsstk
127 
128 #endif //GNSSTK_GLOCNAVALMNUMBERCRUNCHER_CPP
129 
gnsstk::GLOCNavAlm::NumberCruncher::setB
void setB()
Definition: GLOCNavAlmNumberCruncher.hpp:121
gnsstk::GLOCNavAlm::NumberCruncher::setn
void setn()
Definition: GLOCNavAlmNumberCruncher.hpp:91
gnsstk::GLOCNavAlm::ae
static const GNSSTK_EXPORT double ae
Equatorial radius of Earth in km.
Definition: GLOCNavAlm.hpp:69
gnsstk::GLOCNavAlm::NumberCruncher::n
double n
Mean motion.
Definition: GLOCNavAlm.hpp:346
gnsstk::GLOCNavAlm::Deltas::setData
void setData(double B, double Lk, const Uncorrected &uncor)
Definition: GLOCNavAlmDeltas.hpp:50
L1
gnsstk::Matrix< double > L1
Definition: Matrix_LUDecomp_T.cpp:46
gnsstk::GLOCNavAlm::Tav
static const GNSSTK_EXPORT double Tav
Tav</cp> as defined in ICD-GLONASS-CDMA-L3 section 5.3.2.15.
Definition: GLOCNavAlm.hpp:75
gnsstk::GLOCNavAlm::deltaT
double deltaT
Draconic orbital period offset.
Definition: GLOCNavAlm.hpp:142
gnsstk::GLOCNavAlm::NumberCruncher::L1
double L1
Mean longitude at ascending node.
Definition: GLOCNavAlm.hpp:348
gnsstk::GLOCNavAlm::J20
static const GNSSTK_EXPORT double J20
Second degree coefficient of normal potential, table 4.1.
Definition: GLOCNavAlm.hpp:77
gnsstk::PI
const double PI
GPS value of PI; also specified by GAL.
Definition: GNSSconstants.hpp:62
gnsstk::GLOCNavAlm::Corrected::setData
void setData(double L, const Uncorrected &uncor, const Deltas &delta1, const Deltas &delta2)
Definition: GLOCNavAlmCorrected.hpp:50
gnsstk::GLOCNavAlm::Corrected::getXvt
Xvt getXvt(const gnsstk::CommonTime &toi)
Definition: GLOCNavAlmCorrected.hpp:71
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::GLOCNavAlm::NumberCruncher::setW
void setW(double DeltaTA)
Definition: GLOCNavAlmNumberCruncher.hpp:77
std::sin
double sin(gnsstk::Angle x)
Definition: Angle.hpp:144
gnsstk::GLOCNavAlm::NumberCruncher::setL1
void setL1(double epsilonA)
Definition: GLOCNavAlmNumberCruncher.hpp:107
gnsstk::GLOCNavAlm
Definition: GLOCNavAlm.hpp:61
gnsstk::GLOCNavAlm::NumberCruncher::getXvt
Xvt getXvt(const GLOCNavAlm &alm, const gnsstk::CommonTime &toi)
Definition: GLOCNavAlmNumberCruncher.hpp:50
gnsstk::GLOCNavAlm::ecc
double ecc
Eccentricity at tlambdaA.
Definition: GLOCNavAlm.hpp:140
gnsstk::GLOCNavAlm::NumberCruncher::Tdr
double Tdr
Mean draconic period in orbit W+1.
Definition: GLOCNavAlm.hpp:345
gnsstk::GLOCNavAlm::Uncorrected::setData
void setData(const GLOCNavAlm &alm, double Tdr, double n, double Deltatpr)
Definition: GLOCNavAlmUncorrected.hpp:50
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::GLOCNavAlm::NumberCruncher::corrected
Corrected corrected
Corrected parameters (stage 9).
Definition: GLOCNavAlm.hpp:342
gnsstk::GLOCNavAlm::Toa
CommonTime Toa
Reference time for almanac.
Definition: GLOCNavAlm.hpp:129
gnsstk::GLOCNavAlm::NumberCruncher::setE0
void setE0(double epsilonA)
Definition: GLOCNavAlmNumberCruncher.hpp:98
gnsstk::GLOCNavAlm::NumberCruncher::uncorrected
Uncorrected uncorrected
Uncorrected parameters (stage 1-9-ish).
Definition: GLOCNavAlm.hpp:341
gnsstk::GLOCNavAlm::NumberCruncher::setL
void setL(double DeltaTA, double DeltaTdotA)
Definition: GLOCNavAlmNumberCruncher.hpp:114
std::tan
double tan(gnsstk::Angle x)
Definition: Angle.hpp:148
gnsstk::GLOCNavAlm::NumberCruncher::setDeltatpr
void setDeltatpr(const gnsstk::CommonTime &almTime, const gnsstk::CommonTime &ti)
Definition: GLOCNavAlmNumberCruncher.hpp:70
gnsstk::GLOCNavAlm::NumberCruncher::L
double L
Current mean longitude of SV.
Definition: GLOCNavAlm.hpp:349
DebugTrace.hpp
gnsstk::GLOCNavAlm::NumberCruncher::k1
Deltas k1
Delta values for k=1.
Definition: GLOCNavAlm.hpp:339
gnsstk::GLOCNavAlm::NumberCruncher::k2
Deltas k2
Delta values for k=2.
Definition: GLOCNavAlm.hpp:340
gnsstk::GLOCNavAlm::NumberCruncher::Deltatpr
double Deltatpr
Time diff in seconds from ref to interest.
Definition: GLOCNavAlm.hpp:343
gnsstk::GLOCNavAlm::deltaTdot
double deltaTdot
Draconic orbital period rate.
Definition: GLOCNavAlm.hpp:143
gnsstk::GLOCNavAlm::NumberCruncher::B
double B
Correction scale factor.
Definition: GLOCNavAlm.hpp:350
gnsstk::GLOCNavAlm::NumberCruncher::setTdr
void setTdr(double DeltaTA, double DeltaTdotA)
Definition: GLOCNavAlmNumberCruncher.hpp:84


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