Rinex3NavHeader.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 
42 
43 #ifndef GNSSTK_RINEX3NAVHEADER_HPP
44 #define GNSSTK_RINEX3NAVHEADER_HPP
45 
46 #include <iostream>
47 #include <string>
48 #include <vector>
49 #include <map>
50 
51 #include "StringUtils.hpp"
52 #include "FFStream.hpp"
53 #include "Rinex3NavBase.hpp"
54 #include "RinexSatID.hpp"
55 #include "TimeSystemCorr.hpp"
56 #include "RNDouble.hpp"
57 #include "gnsstk_export.h"
58 
59 namespace gnsstk
60 {
61 
63 
64 
66  class IonoCorr
67  {
68  public:
70  enum CorrType
71  {
73  GAL,
74  GPSA,
76  };
78 
80  IonoCorr();
81 
84  IonoCorr(std::string str);
85 
87  std::string asString() const noexcept;
88 
92  void fromString(const std::string str);
93 
95  bool operator==(const IonoCorr& ic) const;
96 
98  bool operator<(const IonoCorr& ic) const;
99 
100  // Member data
103  }; // End of class 'IonoCorr'
104 
108  {
109  public:
110 
112 
115  : valid(0), version(3.02),
116  leapSeconds(0), leapDelta(0), leapWeek(0),leapDay(0)
117  {}
118 
121  {}
122 
124  virtual bool isHeader() const
125  { return true; }
126 
128  virtual void dump(std::ostream& s) const;
129 
135  void setFileSystem(const std::string& str);
136 
146  bool compare(const Rinex3NavHeader& right,
147  std::vector<std::string>& diffs,
148  const std::vector<std::string>& inclExclList,
149  bool incl = false);
150 
153  unsigned long valid;
154 
157  {
158  validVersion = 0x01,
159  validRunBy = 0x02,
160  validComment = 0x04,
161  validIonoCorrGPS = 0x08,
162  validIonoCorrGal = 0x010,
163  validTimeSysCorr = 0x020,
164  validLeapSeconds = 0x040,
165  validEoH = 0x080000000,
166 
170  allValid3 = 0x080000003,
171  // the only changes 3->3.01 in optional rec. (Leap) allValid301 =
172  // 0x080000003,
173  allValid2 = 0x080000003
174  };
175 
176 
177 
178  double version;
179  std::string fileType;
180  std::string fileSys;
182  std::string fileProgram;
183  std::string fileAgency;
184  std::string date;
185  std::vector<std::string> commentList;
186  std::map<std::string,TimeSystemCorrection> mapTimeCorr;
189  std::map<std::string,IonoCorr> mapIonoCorr;
190  long leapSeconds;
191  long leapDelta;
192  long leapWeek;
193  long leapDay;
194 
195  GNSSTK_EXPORT
196  static const std::string stringVersion; // "RINEX VERSION / TYPE"
197  GNSSTK_EXPORT
198  static const std::string stringRunBy; // "PGM / RUN BY / DATE"
199  GNSSTK_EXPORT
200  static const std::string stringComment; // "COMMENT"
201  // R3.x
202  GNSSTK_EXPORT
203  static const std::string stringIonoCorr; // "IONOSPHERIC CORR"
204  GNSSTK_EXPORT
205  static const std::string stringTimeSysCorr; // "TIME SYSTEM CORR"
206  GNSSTK_EXPORT
207  static const std::string stringLeapSeconds; // "LEAP SECONDS"
208  GNSSTK_EXPORT
209  static const std::string stringDeltaUTC; // "DELTA-UTC: A0,A1,T,W" // R2.11 GPS
210  GNSSTK_EXPORT
211  static const std::string stringCorrSysTime; // "CORR TO SYSTEM TIME" // R2.10 GLO
212  GNSSTK_EXPORT
213  static const std::string stringDUTC; // "D-UTC A0,A1,T,W,S,U" // R2.11 GEO
214  GNSSTK_EXPORT
215  static const std::string stringIonAlpha; // "ION ALPHA" // R2.11
216  GNSSTK_EXPORT
217  static const std::string stringIonBeta; // "ION BETA" // R2.11
218  GNSSTK_EXPORT
219  static const std::string stringEoH; // "END OF HEADER"
220 
221 
222  protected:
223 
224 
231  virtual void reallyPutRecord(FFStream& s) const;
232 
233 
243  virtual void reallyGetRecord(FFStream& s);
244 
245  }; // End of class 'Rinex3NavHeader'
246 
248 
249 } // End of namespace gnsstk
250 
251 #endif // GNSSTK_RINEX3NAVHEADER_HPP
gnsstk::dump
void dump(vector< SatPass > &SatPassList, ostream &os, bool rev, bool dbug)
Definition: SatPassUtilities.cpp:59
gnsstk::Rinex3NavHeader::fileSysSat
SatID fileSysSat
File system as a SatID.
Definition: Rinex3NavHeader.hpp:181
gnsstk::Rinex3NavHeader::stringIonAlpha
static const GNSSTK_EXPORT std::string stringIonAlpha
Definition: Rinex3NavHeader.hpp:215
gnsstk::IonoCorr::IonoCorr
IonoCorr()
Set data members to default values.
Definition: Rinex3NavHeader.cpp:85
gnsstk::Rinex3NavHeader::version
double version
RINEX Version.
Definition: Rinex3NavHeader.hpp:178
gnsstk::Rinex3NavHeader::leapWeek
long leapWeek
Week number of ref time.
Definition: Rinex3NavHeader.hpp:192
gnsstk::Rinex3NavHeader::fileType
std::string fileType
File type "N....".
Definition: Rinex3NavHeader.hpp:179
gnsstk::Rinex3NavHeader::valid
unsigned long valid
Definition: Rinex3NavHeader.hpp:153
gnsstk::Rinex3NavHeader::stringVersion
static const GNSSTK_EXPORT std::string stringVersion
Definition: Rinex3NavHeader.hpp:196
gnsstk::FFStream
Definition: FFStream.hpp:119
const
#define const
Definition: getopt.c:43
StringUtils.hpp
gnsstk::Rinex3NavHeader::stringEoH
static const GNSSTK_EXPORT std::string stringEoH
Definition: Rinex3NavHeader.hpp:219
gnsstk::Rinex3NavHeader::commentList
std::vector< std::string > commentList
Definition: Rinex3NavHeader.hpp:185
gnsstk::Rinex3NavHeader::stringTimeSysCorr
static const GNSSTK_EXPORT std::string stringTimeSysCorr
Definition: Rinex3NavHeader.hpp:205
gnsstk::Rinex3NavHeader::stringIonBeta
static const GNSSTK_EXPORT std::string stringIonBeta
Definition: Rinex3NavHeader.hpp:217
gnsstk::SatID
Definition: SatID.hpp:89
gnsstk::Rinex3NavHeader::mapIonoCorr
std::map< std::string, IonoCorr > mapIonoCorr
map of label : GAL, GPSA or GPSB, and IONO CORRs
Definition: Rinex3NavHeader.hpp:189
gnsstk::Rinex3NavHeader::stringIonoCorr
static const GNSSTK_EXPORT std::string stringIonoCorr
Definition: Rinex3NavHeader.hpp:203
gnsstk::IonoCorr
Ionospheric Corrections.
Definition: Rinex3NavHeader.hpp:66
RNDouble.hpp
gnsstk::IonoCorr::asString
std::string asString() const noexcept
Return string version of CorrType.
Definition: Rinex3NavHeader.cpp:124
gnsstk::Rinex3NavHeader::stringRunBy
static const GNSSTK_EXPORT std::string stringRunBy
Definition: Rinex3NavHeader.hpp:198
gnsstk::IonoCorr::GAL
@ GAL
Galileo.
Definition: Rinex3NavHeader.hpp:73
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
Rinex3NavBase.hpp
gnsstk::Rinex3NavBase
Definition: Rinex3NavBase.hpp:59
gnsstk::IonoCorr::CorrType
CorrType
Supported ionospheric correction types.
Definition: Rinex3NavHeader.hpp:70
gnsstk::Rinex3NavHeader
Definition: Rinex3NavHeader.hpp:107
gnsstk::FormattedDouble
Definition: FormattedDouble.hpp:70
gnsstk::Rinex3NavHeader::stringComment
static const GNSSTK_EXPORT std::string stringComment
Definition: Rinex3NavHeader.hpp:200
gnsstk::Rinex3NavHeader::isHeader
virtual bool isHeader() const
Rinex3NavHeader is a "header" so this function always returns true.
Definition: Rinex3NavHeader.hpp:124
gnsstk::Rinex3NavHeader::stringCorrSysTime
static const GNSSTK_EXPORT std::string stringCorrSysTime
Definition: Rinex3NavHeader.hpp:211
gnsstk::IonoCorr::GPSB
@ GPSB
Definition: Rinex3NavHeader.hpp:75
gnsstk::IonoCorr::Unknown
@ Unknown
A default value.
Definition: Rinex3NavHeader.hpp:72
gnsstk::Rinex3NavHeader::leapDelta
long leapDelta
Change in Leap seconds at ref time.
Definition: Rinex3NavHeader.hpp:191
example6.validEoH
validEoH
Definition: example6.py:82
version
string version(string("2.4 9/23/15 rev"))
example6.valid
valid
Definition: example6.py:20
gnsstk::IonoCorr::type
CorrType type
type of correction - enum CorrType
Definition: Rinex3NavHeader.hpp:101
gnsstk::Rinex3NavHeader::date
std::string date
Date string; includes "UTC" at the end.
Definition: Rinex3NavHeader.hpp:184
gnsstk::Rinex3NavHeader::stringDUTC
static const GNSSTK_EXPORT std::string stringDUTC
Definition: Rinex3NavHeader.hpp:213
gnsstk::Rinex3NavHeader::leapSeconds
long leapSeconds
Leap seconds.
Definition: Rinex3NavHeader.hpp:190
gnsstk::Rinex3NavHeader::stringLeapSeconds
static const GNSSTK_EXPORT std::string stringLeapSeconds
Definition: Rinex3NavHeader.hpp:207
gnsstk::IonoCorr::param
FormattedDouble param[4]
parameters ai0-ai2,0(GAL), alpha0-3 or beta0-3(GPS)
Definition: Rinex3NavHeader.hpp:102
gnsstk::Rinex3NavHeader::fileAgency
std::string fileAgency
Agency string.
Definition: Rinex3NavHeader.hpp:183
std
Definition: Angle.hpp:142
gnsstk::Rinex3NavHeader::stringDeltaUTC
static const GNSSTK_EXPORT std::string stringDeltaUTC
Definition: Rinex3NavHeader.hpp:209
gnsstk::IonoCorr::GPSA
@ GPSA
GPS alpha.
Definition: Rinex3NavHeader.hpp:74
gnsstk::Rinex3NavHeader::validBits
validBits
These are validity bits used in checking the RINEX NAV header.
Definition: Rinex3NavHeader.hpp:156
gnsstk::Rinex3NavHeader::~Rinex3NavHeader
virtual ~Rinex3NavHeader()
Destructor.
Definition: Rinex3NavHeader.hpp:120
RinexSatID.hpp
gnsstk::Rinex3NavHeader::fileSys
std::string fileSys
File system string.
Definition: Rinex3NavHeader.hpp:180
FFStream.hpp
gnsstk::IonoCorr::fromString
void fromString(const std::string str)
Definition: Rinex3NavHeader.cpp:139
gnsstk::Rinex3NavHeader::fileProgram
std::string fileProgram
Program string.
Definition: Rinex3NavHeader.hpp:182
TimeSystemCorr.hpp
gnsstk::Rinex3NavHeader::Rinex3NavHeader
Rinex3NavHeader()
Constructor.
Definition: Rinex3NavHeader.hpp:114
gnsstk::Rinex3NavHeader::leapDay
long leapDay
Day of week of ref time.
Definition: Rinex3NavHeader.hpp:193


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