NeQuickIonoNavData.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_NEQUICKIONODATA_HPP
40 #define GNSSTK_NEQUICKIONODATA_HPP
41 
42 #include "IonoNavData.hpp"
43 #include "CivilTime.hpp"
44 #include "CCIR.hpp"
45 #include "MODIP.hpp"
46 #include "GalileoIonoEllipsoid.hpp"
47 #include "DebugTrace.hpp"
48 
49 /*
50  * ALL EQUATION AND SECTION REFERENCES ARE TO THE DOCUMENT
51  * "Ionospheric Correction Algorithm for Galileo Single Frequency Users"
52  * aka "Galileo Ionospheric Model"
53  * UNLESS OTHERWISE STATED
54  */
55 
56 // forward declaration of test class
58 
59 namespace gnsstk
60 {
62 
63 
82  {
83  public:
86 
92  bool validate() const override
93  { return true; }
94 
99  void dump(std::ostream& s, DumpDetail dl) const override;
100 
107  double getIonoCorr(const CommonTime& when,
108  const Position& rxgeo,
109  const Position& svgeo,
110  CarrierBand band) const override;
111 
118  double getTEC(const CommonTime& when,
119  const Position& rxgeo,
120  const Position& svgeo) const;
121 
125  double ai[3];
126  // These are technically Galileo-specific terms, and they
127  // seem to be as yet unused according to the ICD (section
128  // 5.1.6, "reserved for future use"), however until such time
129  // as we have a situation where we use an NeQuick model that
130  // does NOT use this data, I'm leaving it here so it only
131  // needs to be defined once.
132  bool idf[5];
133 
138  static double neExp(double x);
139 
140  protected:
151  double getEffIonoLevel(double modip_u) const;
152 
155  {
156  public:
167  ModelParameters(double modip_u, const Position& pos, double az,
168  CCIR& ccirData, const CivilTime& when);
169 
175  static AngleReduced solarDeclination(const CivilTime& when);
176 
181  static Angle solarZenithAngle(const Position& pos,
182  const CivilTime& when);
183 
188  static Angle effSolarZenithAngle(const Position& pos,
189  const CivilTime& when);
190 
195  void legendre(double modip_u, const Position& pos);
196 
200  void height();
201 
205  void thickness();
206 
211  void exosphereAdjust(unsigned month);
212 
218  void peakAmplitudes();
219 
228  static inline double epstein(double x, double y, double z, double w);
229 
241  static inline double solarGetLongitude(const CivilTime& when);
242 
248  double electronDensity(const Position& pos);
249 
254  double electronDensityTop(const Position& pos);
255 
261  double electronDensityBottom(const Position& pos);
262 
264  double fAzr;
265  double ffoE;
266  double fNmE;
267  double fBEtop;
268  double fA[3];
269  // hmE and BEbot are constants.
270  double ffoF1;
271  double fNmF1;
272  double fhmF1;
273  double fB1top;
274  double fB1bot;
275  double ffoF2;
276  double fNmF2;
277  double fhmF2;
278  double fB2bot;
279  double fM3000F2;
280  double fH0;
282 
283  private:
285  ModelParameters(CCIR& ccirData);
286 
287  friend class ::NeQuickIonoNavData_T;
288  };
289 
292  {
293  public:
305  IntegrationParameters(const Position& rx, const Position& sv,
306  const Position& Pp, bool vertical);
314  std::vector<double> integHeights;
317  std::vector<double> intThresh;
318  };
319 
333  double getSED(double dist, const Position& rxgeo, const Position& svgeo,
334  const MODIP& modip, CCIR& ccirData, const CivilTime& when,
335  double azu)
336  const;
337 
351  double getVED(double dist, const Position& rxgeo, const Position& svgeo,
352  double modip_u, CCIR& ccirData, const CivilTime& when,
353  double azu)
354  const;
355 
379  double integrateGaussKronrod(double heightPt1, double heightPt2,
380  const Position& rxgeo, const Position& svgeo,
381  const MODIP& modip, double modipSta,
382  CCIR& ccirData,
383  const CivilTime& when, double azu,
384  double tolerance, bool vertical,
385  unsigned recursionLevel = 0)
386  const;
387 
395 
396  private:
398  static constexpr double DEGREE_PER_HOUR = 15.0;
399 
400  friend class ::NeQuickIonoNavData_T;
401  };
402 
404  epstein(double x, double y, double z, double w)
405  {
407  DEBUGTRACE("thickness_param=" << std::scientific << z);
408  DEBUGTRACE("height_km=" << std::scientific << w);
409  DEBUGTRACE("pPeak->height_km=" << std::scientific << y);
410  double tmp = exp((w-y)/z);
411  DEBUGTRACE("electron_density (1)=" << std::scientific << tmp);
412  double rv = (x*tmp) / ((1+tmp)*(1+tmp)); //eq.3
413  DEBUGTRACE("electron_density (2)=" << std::scientific << rv);
414  return rv;
415  }
416 
419  {
420  // eq.4, sort of.
421  return (DEGREE_PER_HOUR * when.getUTHour() - 180.0) * DEG2RAD;
422  }
423 
425 
426 }
427 
428 #endif // GNSSTK_NEQUICKIONODATA_HPP
gnsstk::AngleReduced
Definition: AngleReduced.hpp:60
gnsstk::NeQuickIonoNavData::ModelParameters::fM3000F2
double fM3000F2
F2 layer transmission factor.
Definition: NeQuickIonoNavData.hpp:279
gnsstk::DEG2RAD
const double DEG2RAD
Multiply degrees by DEG2RAD to get radians.
Definition: GNSSconstants.hpp:64
gnsstk::NeQuickIonoNavData::integrateGaussKronrod
double integrateGaussKronrod(double heightPt1, double heightPt2, const Position &rxgeo, const Position &svgeo, const MODIP &modip, double modipSta, CCIR &ccirData, const CivilTime &when, double azu, double tolerance, bool vertical, unsigned recursionLevel=0) const
Definition: NeQuickIonoNavData.cpp:913
gnsstk::NeQuickIonoNavData::ModelParameters::fB1bot
double fB1bot
F1 layer bottom-side thickness parameter in km.
Definition: NeQuickIonoNavData.hpp:274
CCIR.hpp
gnsstk::NeQuickIonoNavData::ModelParameters::fBEtop
double fBEtop
E layer top-side thickness parameter in km.
Definition: NeQuickIonoNavData.hpp:267
gnsstk::NeQuickIonoNavData::ModelParameters::ffoF1
double ffoF1
F1 layer critical frequency in MHz.
Definition: NeQuickIonoNavData.hpp:270
gnsstk::NeQuickIonoNavData::ModelParameters::ffoE
double ffoE
E layer critical frequency in MHz.
Definition: NeQuickIonoNavData.hpp:265
gnsstk::NeQuickIonoNavData::ModelParameters::effSolarZenithAngle
static Angle effSolarZenithAngle(const Position &pos, const CivilTime &when)
Definition: NeQuickIonoNavData.cpp:490
gnsstk::NeQuickIonoNavData::ModelParameters::epstein
static double epstein(double x, double y, double z, double w)
Definition: NeQuickIonoNavData.hpp:404
gnsstk::CarrierBand
CarrierBand
Definition: CarrierBand.hpp:54
gnsstk::NeQuickIonoNavData::ModelParameters::fH0
double fH0
Top-side thickness parameter in km.
Definition: NeQuickIonoNavData.hpp:280
DEBUGTRACE
#define DEBUGTRACE(EXPR)
Definition: DebugTrace.hpp:119
gnsstk::NeQuickIonoNavData::DEGREE_PER_HOUR
static constexpr double DEGREE_PER_HOUR
Number of degrees longitude per hour.
Definition: NeQuickIonoNavData.hpp:398
gnsstk::IonoNavData
Definition: IonoNavData.hpp:53
gnsstk::NeQuickIonoNavData::ModelParameters::fA
double fA[3]
F2, F1, E layer peak amplitudes.
Definition: NeQuickIonoNavData.hpp:268
gnsstk::NeQuickIonoNavData::idf
bool idf[5]
Ionospheric disturbance flag for regions 1-5 (0-4).
Definition: NeQuickIonoNavData.hpp:132
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::Angle
Definition: Angle.hpp:53
gnsstk::NeQuickIonoNavData::getSED
double getSED(double dist, const Position &rxgeo, const Position &svgeo, const MODIP &modip, CCIR &ccirData, const CivilTime &when, double azu) const
Definition: NeQuickIonoNavData.cpp:285
gnsstk::NeQuickIonoNavData::ModelParameters::ccir
CCIR & ccir
Reference to iono model data.
Definition: NeQuickIonoNavData.hpp:263
gnsstk::NeQuickIonoNavData::ai
double ai[3]
Definition: NeQuickIonoNavData.hpp:125
gnsstk::NeQuickIonoNavData::ModelParameters::fhmF2
double fhmF2
F2 layer maximum density height in km.
Definition: NeQuickIonoNavData.hpp:277
gnsstk::NeQuickIonoNavData::IntegrationParameters::IntegrationParameters
IntegrationParameters(const Position &rx, const Position &sv, const Position &Pp, bool vertical)
Definition: NeQuickIonoNavData.cpp:818
y
page HOWTO subpage DoxygenGuide Documenting Your Code page DoxygenGuide Documenting Your Code todo Flesh out this document section doctips Tips for Documenting When defining make sure that the prototype is identical between the cpp and hpp including both the namespaces and the parameter names for you have std::string as the return type in the hpp file and string as the return type in the cpp Doxygen may get confused and autolink to the cpp version with no documentation If you don t use the same parameter names between the cpp and hpp that will also confuse Doxygen Don t put type information in return or param documentation It doesn t really add anything and will often cause Doxygen to complain and not produce the documentation< br > use note Do not put a comma after a param name unless you mean to document multiple parameters< br/> the output stream</code >< br/> y
Definition: DOCUMENTING.dox:15
gnsstk::NeQuickIonoNavData::IntegrationParameters::intThresh
std::vector< double > intThresh
Definition: NeQuickIonoNavData.hpp:317
IonoNavData.hpp
gnsstk::NeQuickIonoNavData::ModelParameters::fNmF1
double fNmF1
F1 layer maximum electron density in el m**-2.
Definition: NeQuickIonoNavData.hpp:271
gnsstk::NeQuickIonoNavData::ModelParameters::fNmF2
double fNmF2
F2 layer maximum electron density in el m**-2.
Definition: NeQuickIonoNavData.hpp:276
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::NeQuickIonoNavData::ModelParameters
Aggregate the model parameters as defined in section 2.5.5.
Definition: NeQuickIonoNavData.hpp:154
gnsstk::NeQuickIonoNavData::ModelParameters::electronDensityTop
double electronDensityTop(const Position &pos)
Definition: NeQuickIonoNavData.cpp:743
gnsstk::NeQuickIonoNavData::getIonoCorr
double getIonoCorr(const CommonTime &when, const Position &rxgeo, const Position &svgeo, CarrierBand band) const override
Definition: NeQuickIonoNavData.cpp:183
gnsstk::GalileoIonoEllipsoid
Definition: GalileoIonoEllipsoid.hpp:57
CivilTime.hpp
gnsstk::NeQuickIonoNavData::ModelParameters::thickness
void thickness()
Definition: NeQuickIonoNavData.cpp:622
example4.pos
pos
Definition: example4.py:125
gnsstk::MODIP
Definition: MODIP.hpp:54
gnsstk::NeQuickIonoNavData::ModelParameters::fNmE
double fNmE
E layer maximum electron density in el m**-2.
Definition: NeQuickIonoNavData.hpp:266
gnsstk::NeQuickIonoNavData::ModelParameters::solarZenithAngle
static Angle solarZenithAngle(const Position &pos, const CivilTime &when)
Definition: NeQuickIonoNavData.cpp:474
gnsstk::NeQuickIonoNavData::ModelParameters::solarDeclination
static AngleReduced solarDeclination(const CivilTime &when)
Definition: NeQuickIonoNavData.cpp:452
gnsstk::NeQuickIonoNavData::ModelParameters::exosphereAdjust
void exosphereAdjust(unsigned month)
Definition: NeQuickIonoNavData.cpp:636
GalileoIonoEllipsoid.hpp
gnsstk::CivilTime
Definition: CivilTime.hpp:55
gnsstk::NeQuickIonoNavData::ModelParameters::legendre
void legendre(double modip_u, const Position &pos)
Definition: NeQuickIonoNavData.cpp:503
gnsstk::NeQuickIonoNavData::ModelParameters::electronDensityBottom
double electronDensityBottom(const Position &pos)
Definition: NeQuickIonoNavData.cpp:766
gnsstk::DumpDetail
DumpDetail
Specify level of detail for dump output.
Definition: DumpDetail.hpp:51
gnsstk::NeQuickIonoNavData::ModelParameters::solarGetLongitude
static double solarGetLongitude(const CivilTime &when)
Definition: NeQuickIonoNavData.hpp:418
gnsstk::NeQuickIonoNavData::IntegrationParameters
Class to contain data used when integrating TEC.
Definition: NeQuickIonoNavData.hpp:291
gnsstk::NeQuickIonoNavData::ModelParameters::height
void height()
Definition: NeQuickIonoNavData.cpp:603
gnsstk::NeQuickIonoNavData::ModelParameters::fAzr
double fAzr
Effective sunspot number.
Definition: NeQuickIonoNavData.hpp:264
gnsstk::CCIR
Definition: CCIR.hpp:59
DebugTrace.hpp
gnsstk::NeQuickIonoNavData::neExp
static double neExp(double x)
Definition: NeQuickIonoNavData.cpp:322
gnsstk::NeQuickIonoNavData::ModelParameters::fhmF1
double fhmF1
F1 layer maximum density height in km.
Definition: NeQuickIonoNavData.hpp:272
gnsstk::NeQuickIonoNavData::dump
void dump(std::ostream &s, DumpDetail dl) const override
Definition: NeQuickIonoNavData.cpp:129
gnsstk::NeQuickIonoNavData::ModelParameters::ffoF2
double ffoF2
F2 layer critical frequency in MHz.
Definition: NeQuickIonoNavData.hpp:275
gnsstk::NeQuickIonoNavData::elModel
GalileoIonoEllipsoid elModel
Definition: NeQuickIonoNavData.hpp:394
gnsstk::Position
Definition: Position.hpp:136
gnsstk::NeQuickIonoNavData::getVED
double getVED(double dist, const Position &rxgeo, const Position &svgeo, double modip_u, CCIR &ccirData, const CivilTime &when, double azu) const
Definition: NeQuickIonoNavData.cpp:304
gnsstk::NeQuickIonoNavData::validate
bool validate() const override
Definition: NeQuickIonoNavData.hpp:92
DEBUGTRACE_FUNCTION
#define DEBUGTRACE_FUNCTION()
Definition: DebugTrace.hpp:117
gnsstk::NeQuickIonoNavData::ModelParameters::electronDensity
double electronDensity(const Position &pos)
Definition: NeQuickIonoNavData.cpp:724
gnsstk::NeQuickIonoNavData::ModelParameters::peakAmplitudes
void peakAmplitudes()
Definition: NeQuickIonoNavData.cpp:682
example6.month
month
Definition: example6.py:65
gnsstk::NeQuickIonoNavData
Definition: NeQuickIonoNavData.hpp:81
gnsstk::NeQuickIonoNavData::ModelParameters::ModelParameters
ModelParameters(double modip_u, const Position &pos, double az, CCIR &ccirData, const CivilTime &when)
Definition: NeQuickIonoNavData.cpp:337
MODIP.hpp
gnsstk::NeQuickIonoNavData::IntegrationParameters::integHeights
std::vector< double > integHeights
Definition: NeQuickIonoNavData.hpp:314
gnsstk::NeQuickIonoNavData::ModelParameters::fB2bot
double fB2bot
F2 layer bottom-side thickness parameter in km.
Definition: NeQuickIonoNavData.hpp:278
NeQuickIonoNavData_T
Definition: NeQuickIonoNavData_T.cpp:72
gnsstk::NeQuickIonoNavData::getEffIonoLevel
double getEffIonoLevel(double modip_u) const
Definition: NeQuickIonoNavData.cpp:263
gnsstk::NeQuickIonoNavData::ModelParameters::fB1top
double fB1top
F1 layer top-side thickness parameter in km.
Definition: NeQuickIonoNavData.hpp:273
gnsstk::NeQuickIonoNavData::ModelParameters::fXeff
Angle fXeff
Effective solar zenith angle.
Definition: NeQuickIonoNavData.hpp:281
gnsstk::NeQuickIonoNavData::NeQuickIonoNavData
NeQuickIonoNavData()
Initialize internal data.
Definition: NeQuickIonoNavData.cpp:121
gnsstk::CivilTime::getUTHour
double getUTHour() const
Get the "universal time"-esque fractional hour of day.
Definition: CivilTime.hpp:195
gnsstk::NeQuickIonoNavData::getTEC
double getTEC(const CommonTime &when, const Position &rxgeo, const Position &svgeo) const
Definition: NeQuickIonoNavData.cpp:198


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