IonexData.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 
44 #ifndef GNSSTK_IONEXDATA_HPP
45 #define GNSSTK_IONEXDATA_HPP
46 
47 #include <map>
48 
49 #include "FFStream.hpp"
50 #include "Position.hpp"
51 #include "Vector.hpp"
52 #include "WGS84Ellipsoid.hpp"
53 
54 #include "IonexStream.hpp"
55 #include "gnsstk_export.h"
56 
57 
58 
59 namespace gnsstk
60 {
61 
63 
64 
70  class IonexData : public IonexBase
71  {
72  public:
73 
79  GNSSTK_EXPORT
80  static const std::string startTecMapString;
81  GNSSTK_EXPORT
82  static const std::string startRmsMapString;
83  GNSSTK_EXPORT
84  static const std::string startHgtMapString;
85  GNSSTK_EXPORT
86  static const std::string currentEpochString;
87  GNSSTK_EXPORT
88  static const std::string dataBlockString;
89  GNSSTK_EXPORT
90  static const std::string endTecMapString;
91  GNSSTK_EXPORT
92  static const std::string endRmsMapString;
93  GNSSTK_EXPORT
94  static const std::string endHgtMapString;
95  GNSSTK_EXPORT
96  static const std::string endOfFile;
97 
98 
99 
102  {
103  IonexValType();
104 
105  IonexValType(const std::string& t, const std::string& d,
106  const std::string& u);
107 
108  std::string type;
109  std::string description;
110  std::string units;
111  }; // End of struct 'IonexValType'
112 
113 
118  GNSSTK_EXPORT
119  static const IonexValType UN;
120  GNSSTK_EXPORT
121  static const IonexValType TEC;
122  GNSSTK_EXPORT
123  static const IonexValType RMS;
125 
126 
131  int mapID;
132  int dim[3];
134 
137 
138  // The following fields are similar to the ones in 'IonexHeader'
139  int exponent;
140 
141  double lat[3];
142  double lon[3];
143  double hgt[3];
144 
145  bool valid;
146 
147 
149  IonexData();
150 
152  virtual ~IonexData();
153 
155  virtual bool isData() const
156  { return true; }
157 
158 
160  virtual bool isValid() const
161  { return valid; }
162 
163 
165  virtual void dump (std::ostream& s = std::cout) const;
166 
167 
181  int getIndex( const Triple& in, int igp, Triple& out ) const;
182 
183 
200  double getValue(const Position& pos) const;
201 
202 
203  protected:
204 
211  void reallyPutRecord(FFStream& s) const override;
212 
213 
226  void reallyGetRecord(FFStream& s) override;
227 
228 
229  private:
230 
231 
238  std::string writeTime(const CommonTime& dt) const;
239 
240 
246  CommonTime parseTime(const std::string& line) const;
247 
248 
249  }; // End of class 'IonexData'
250 
251 
253  inline bool operator==( const IonexData::IonexValType& x,
254  const IonexData::IonexValType& y )
255  {return (x.type == y.type); };
256 
257 
259  inline bool operator!=( const IonexData::IonexValType& x,
260  const IonexData::IonexValType& y )
261  {return (x.type != y.type); };
262 
263 
265  inline bool operator<( const IonexData::IonexValType& x,
266  const IonexData::IonexValType& y )
267  {return (x.type < y.type); };
268 
269 
271  inline std::ostream& operator<<( std::ostream& s,
272  const IonexData::IonexValType ivt )
273  {
274  return s << "Type= " << ivt.type
275  << ", Description= " << ivt.description
276  << ", Units= " << ivt.units;
277  };
278 
279 
281 
282 
283 } // End of namespace gnsstk
284 #endif // GNSSTK_IONEXDATA_HPP
gnsstk::IonexData::time
CommonTime time
the time corresponding to the current data records
Definition: IonexData.hpp:133
gnsstk::operator==
bool operator==(const IonexData::IonexValType &x, const IonexData::IonexValType &y)
operator == for IonexData::IonexValType
Definition: IonexData.hpp:253
gnsstk::IonexData::reallyGetRecord
void reallyGetRecord(FFStream &s) override
Definition: IonexData.cpp:227
gnsstk::IonexData::IonexValType::units
std::string units
units (optional). E.g. "meters"
Definition: IonexData.hpp:110
gnsstk::IonexData::isData
virtual bool isData() const
IonexData is a "data", so this function always returns true.
Definition: IonexData.hpp:155
gnsstk::FFStream
Definition: FFStream.hpp:119
gnsstk::IonexData::lat
double lat[3]
Definition of a grid in latitude.
Definition: IonexData.hpp:141
gnsstk::IonexData::endRmsMapString
static const GNSSTK_EXPORT std::string endRmsMapString
"END OF RMS MAP"
Definition: IonexData.hpp:92
gnsstk::IonexData::dataBlockString
static const GNSSTK_EXPORT std::string dataBlockString
"LAT/LON1/LON2/DLON/H"
Definition: IonexData.hpp:88
gnsstk::IonexData::currentEpochString
static const GNSSTK_EXPORT std::string currentEpochString
"EPOCH OF CURRENT MAP"
Definition: IonexData.hpp:86
WGS84Ellipsoid.hpp
gnsstk::IonexData::data
Vector< double > data
TEC or RMS data.
Definition: IonexData.hpp:136
Position.hpp
gnsstk::IonexData::IonexValType::IonexValType
IonexValType()
Definition: IonexData.cpp:81
IonexStream.hpp
gnsstk::IonexData::writeTime
std::string writeTime(const CommonTime &dt) const
Definition: IonexData.cpp:623
gnsstk::Triple
Definition: Triple.hpp:68
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::IonexData::parseTime
CommonTime parseTime(const std::string &line) const
Definition: IonexData.cpp:608
gnsstk::IonexData::UN
static const GNSSTK_EXPORT IonexValType UN
Definition: IonexData.hpp:119
gnsstk::IonexData::IonexValType::type
std::string type
type e.g. TEC, RMS
Definition: IonexData.hpp:108
gnsstk::IonexData::hgt
double hgt[3]
Definition of a grid in height.
Definition: IonexData.hpp:143
gnsstk::IonexData::mapID
int mapID
denote the internal number of the current map
Definition: IonexData.hpp:131
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::IonexData::RMS
static const GNSSTK_EXPORT IonexValType RMS
Definition: IonexData.hpp:123
gnsstk::IonexData::startRmsMapString
static const GNSSTK_EXPORT std::string startRmsMapString
"START OF RMS MAP"
Definition: IonexData.hpp:82
gnsstk::IonexData::IonexValType
A structure used to store IONEX Value Types.
Definition: IonexData.hpp:101
gnsstk::IonexData::IonexData
IonexData()
Default constructor.
Definition: IonexData.cpp:98
gnsstk::IonexData
Definition: IonexData.hpp:70
gnsstk::operator<<
std::ostream & operator<<(std::ostream &s, const ObsEpoch &oe) noexcept
Definition: ObsEpochMap.cpp:54
gnsstk::IonexData::type
IonexValType type
Type of data either TEC or RMS.
Definition: IonexData.hpp:135
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::IonexData::lon
double lon[3]
Definition of a grid in longitude.
Definition: IonexData.hpp:142
gnsstk::IonexData::getIndex
int getIndex(const Triple &in, int igp, Triple &out) const
Definition: IonexData.cpp:427
gnsstk::IonexData::endOfFile
static const GNSSTK_EXPORT std::string endOfFile
"END OF FILE"
Definition: IonexData.hpp:96
example4.pos
pos
Definition: example4.py:125
gnsstk::operator!=
bool operator!=(const IonexData::IonexValType &x, const IonexData::IonexValType &y)
operator != for IonexData::IonexValType
Definition: IonexData.hpp:259
gnsstk::Vector< double >
gnsstk::IonexData::dim
int dim[3]
How many values are along latitude, longitude, height.
Definition: IonexData.hpp:132
gnsstk::IonexData::endTecMapString
static const GNSSTK_EXPORT std::string endTecMapString
"END OF TEC MAP"
Definition: IonexData.hpp:90
gnsstk::IonexData::valid
bool valid
Validity flag.
Definition: IonexData.hpp:145
gnsstk::IonexData::~IonexData
virtual ~IonexData()
Destructor.
Definition: IonexData.cpp:105
gnsstk::operator<
bool operator<(const IonexData::IonexValType &x, const IonexData::IonexValType &y)
operator < for IonexData::IonexValType
Definition: IonexData.hpp:265
gnsstk::IonexData::TEC
static const GNSSTK_EXPORT IonexValType TEC
Definition: IonexData.hpp:121
gnsstk::IonexData::startTecMapString
static const GNSSTK_EXPORT std::string startTecMapString
"START OF TEC MAP"
Definition: IonexData.hpp:80
gnsstk::IonexData::endHgtMapString
static const GNSSTK_EXPORT std::string endHgtMapString
"END OF HEIGHT MAP"
Definition: IonexData.hpp:94
gnsstk::IonexData::reallyPutRecord
void reallyPutRecord(FFStream &s) const override
Definition: IonexData.cpp:112
gnsstk::Position
Definition: Position.hpp:136
gnsstk::IonexData::exponent
int exponent
Exponent defining the unit of the values.
Definition: IonexData.hpp:139
gnsstk::IonexData::getValue
double getValue(const Position &pos) const
Definition: IonexData.cpp:519
gnsstk::IonexData::startHgtMapString
static const GNSSTK_EXPORT std::string startHgtMapString
"START OF HEIGHT MAP"
Definition: IonexData.hpp:84
FFStream.hpp
gnsstk::IonexData::isValid
virtual bool isValid() const
Am I an valid object?
Definition: IonexData.hpp:160
Vector.hpp
gnsstk::IonexData::IonexValType::description
std::string description
Description (optional)
Definition: IonexData.hpp:109
gnsstk::IonexBase
Definition: IonexBase.hpp:59
gnsstk::IonexData::dump
virtual void dump(std::ostream &s=std::cout) const
A debug output function.
Definition: IonexData.cpp:409


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