IonexStore.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 // 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 
46 #ifndef GNSSTK_IONEXSTORE_HPP
47 #define GNSSTK_IONEXSTORE_HPP
48 
49 #include <map>
50 
51 #include "FileStore.hpp"
52 #include "IonexData.hpp"
53 #include "IonexStoreStrategy.hpp"
54 
55 #include "GNSSconstants.hpp" // DEG_TO_RAD
56 #include "GNSSconstants.hpp" // LX_FREQ, with X = 1,2,5,6,7,8
57 #include "Triple.hpp"
58 
59 namespace gnsstk
60 {
61 
63 
64 
80  class IonexStore : public FileStore<IonexHeader>
81  {
82  public:
84  IonexStore();
85 
87  virtual ~IonexStore();
88 
92  virtual void loadFile(const std::string& filename);
93 
95  void addMap(const IonexData& iod);
96 
106  void dump( std::ostream& s = std::cout,
107  short detail = 0 ) const;
108 
110  void clear();
111 
131  Triple getIonexValue( const CommonTime& t,
132  const Position& RX,
133  IonexStoreStrategy strategy =
135 
145  double getSTEC( double elevation,
146  double tecval,
147  const std::string& ionoMapType ) const;
148 
159  double getIono( double elevation,
160  double tecval,
161  double freq,
162  const std::string& ionoMapType ) const;
163 
164  // The next 6 functions define the interface for calculating
165  // the ionospheric slant delay for a specific frequency
166 
176  double getIonoL1( double elevation,
177  double tecval,
178  const std::string& ionoMapType ) const
179  { return getIono(elevation, tecval, L1_FREQ_GPS, ionoMapType); }
180 
190  double getIonoL2( double elevation,
191  double tecval,
192  const std::string& ionoMapType ) const
193  { return getIono(elevation, tecval, L2_FREQ_GPS, ionoMapType); }
194 
204  double getIonoL5( double elevation,
205  double tecval,
206  const std::string& ionoMapType ) const
207  { return getIono(elevation, tecval, L5_FREQ_GPS, ionoMapType); }
208 
218  double getIonoL6( double elevation,
219  double tecval,
220  const std::string& ionoMapType ) const
221  { return getIono(elevation, tecval, L6_FREQ_GAL, ionoMapType); }
222 
232  double getIonoL7( double elevation,
233  double tecval,
234  const std::string& ionoMapType ) const
235  { return getIono(elevation, tecval, L7_FREQ_GAL, ionoMapType); }
236 
246  double getIonoL8( double elevation,
247  double tecval,
248  const std::string& ionoMapType ) const
249  { return getIono(elevation, tecval, L8_FREQ_GAL, ionoMapType); }
250 
265  double ionoMappingFunction( double elevation,
266  const std::string& ionoMapType ) const;
267 
277  { return initialTime; }
278 
288  { return finalTime; }
289 
299  double findDCB( const SatID& sat,
300  const CommonTime& time ) const;
301 
302  private:
310 
312  typedef std::map<IonexData::IonexValType, IonexData> IonexValTypeMap;
313 
315  typedef std::map<CommonTime, IonexValTypeMap> IonexMap;
316 
319 
321  typedef std::map<CommonTime, IonexHeader::SatDCBMap> IonexDCBMap;
322 
325  }; // End of class 'IonexStore'
326 
328 
329 } // End of namespace gnsstk
330 #endif // GNSSTK_IONEXSTORE_HPP
gnsstk::IonexStore::getIonexValue
Triple getIonexValue(const CommonTime &t, const Position &RX, IonexStoreStrategy strategy=IonexStoreStrategy::ConsRot) const
Definition: IonexStore.cpp:236
gnsstk::IonexStore::IonexMap
std::map< CommonTime, IonexValTypeMap > IonexMap
The key to this map is the time.
Definition: IonexStore.hpp:315
gnsstk::IonexStore::getIono
double getIono(double elevation, double tecval, double freq, const std::string &ionoMapType) const
Definition: IonexStore.cpp:415
gnsstk::IonexStore::clear
void clear()
Remove all data.
Definition: IonexStore.cpp:225
IonexData.hpp
gnsstk::IonexStore::ionoMappingFunction
double ionoMappingFunction(double elevation, const std::string &ionoMapType) const
Definition: IonexStore.cpp:446
gnsstk::IonexStore::inxDCBMap
IonexDCBMap inxDCBMap
Map of DCB values (IonexHeader.firstEpoch, IonexHeader.svsmap)
Definition: IonexStore.hpp:324
gnsstk::L1_FREQ_GPS
const double L1_FREQ_GPS
GPS L1 carrier frequency in Hz.
Definition: DeprecatedConsts.hpp:51
gnsstk::SatID
Definition: SatID.hpp:89
gnsstk::IonexStore::findDCB
double findDCB(const SatID &sat, const CommonTime &time) const
Definition: IonexStore.cpp:499
gnsstk::IonexStore
Definition: IonexStore.hpp:80
FileStore.hpp
GNSSconstants.hpp
gnsstk::Triple
Definition: Triple.hpp:68
gnsstk::L7_FREQ_GAL
const double L7_FREQ_GAL
GAL L7 (E5b) carrier frequency in Hz.
Definition: DeprecatedConsts.hpp:91
gnsstk::IonexStore::initialTime
CommonTime initialTime
Definition: IonexStore.hpp:309
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::IonexStore::IonexValTypeMap
std::map< IonexData::IonexValType, IonexData > IonexValTypeMap
The key to this map is IonexValType.
Definition: IonexStore.hpp:312
gnsstk::IonexStore::getSTEC
double getSTEC(double elevation, double tecval, const std::string &ionoMapType) const
Definition: IonexStore.cpp:386
gnsstk::IonexStore::getIonoL6
double getIonoL6(double elevation, double tecval, const std::string &ionoMapType) const
Definition: IonexStore.hpp:218
gnsstk::IonexStore::IonexStore
IonexStore()
Default constructor.
Definition: IonexStore.cpp:60
IonexStoreStrategy.hpp
gnsstk::IonexStore::dump
void dump(std::ostream &s=std::cout, short detail=0) const
Definition: IonexStore.cpp:146
gnsstk::L2_FREQ_GPS
const double L2_FREQ_GPS
GPS L2 carrier frequency in Hz.
Definition: DeprecatedConsts.hpp:53
gnsstk::IonexStore::IonexDCBMap
std::map< CommonTime, IonexHeader::SatDCBMap > IonexDCBMap
The key of this map is the time (first epoch as in IonexHeader)
Definition: IonexStore.hpp:321
gnsstk::IonexStore::inxMaps
IonexMap inxMaps
Map of IONEX maps.
Definition: IonexStore.hpp:318
example4.time
time
Definition: example4.py:103
gnsstk::IonexData
Definition: IonexData.hpp:70
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::L5_FREQ_GPS
const double L5_FREQ_GPS
GPS L5 carrier frequency in Hz.
Definition: DeprecatedConsts.hpp:55
gnsstk::IonexStore::getIonoL7
double getIonoL7(double elevation, double tecval, const std::string &ionoMapType) const
Definition: IonexStore.hpp:232
gnsstk::IonexStore::addMap
void addMap(const IonexData &iod)
Insert a new IonexData object into the store.
Definition: IonexStore.cpp:124
gnsstk::L6_FREQ_GAL
const double L6_FREQ_GAL
GAL L6 (E6) carrier frequency in Hz.
Definition: DeprecatedConsts.hpp:89
gnsstk::IonexStore::~IonexStore
virtual ~IonexStore()
destructor
Definition: IonexStore.cpp:68
gnsstk::IonexStore::getInitialTime
CommonTime getInitialTime() const
Definition: IonexStore.hpp:276
gnsstk::IonexStore::getIonoL8
double getIonoL8(double elevation, double tecval, const std::string &ionoMapType) const
Definition: IonexStore.hpp:246
gnsstk::IonexStore::getIonoL1
double getIonoL1(double elevation, double tecval, const std::string &ionoMapType) const
Definition: IonexStore.hpp:176
Triple.hpp
gnsstk::Position
Definition: Position.hpp:136
gnsstk::IonexStoreStrategy::ConsRot
@ ConsRot
Interpolate between two consecutive rotated maps.
gnsstk::L8_FREQ_GAL
const double L8_FREQ_GAL
GAL L8 (E5a+E5b) carrier frequency in Hz.
Definition: DeprecatedConsts.hpp:93
gnsstk::IonexStore::loadFile
virtual void loadFile(const std::string &filename)
Definition: IonexStore.cpp:75
gnsstk::IonexStore::getIonoL2
double getIonoL2(double elevation, double tecval, const std::string &ionoMapType) const
Definition: IonexStore.hpp:190
gnsstk::IonexStoreStrategy
IonexStoreStrategy
Enumeration used for IonexStore::getIonexValue().
Definition: IonexStoreStrategy.hpp:51
gnsstk::IonexStore::finalTime
CommonTime finalTime
Definition: IonexStore.hpp:309
gnsstk::IonexStore::getIonoL5
double getIonoL5(double elevation, double tecval, const std::string &ionoMapType) const
Definition: IonexStore.hpp:204
gnsstk::IonexStore::getFinalTime
CommonTime getFinalTime() const
Definition: IonexStore.hpp:287
gnsstk::FileStore
Definition: FileStore.hpp:62


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