Rinex3ClockHeader.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 RINEX3CLOCKHEADER_HPP
45 #define RINEX3CLOCKHEADER_HPP
46 
47 #include <string>
48 #include <vector>
49 #include <map>
50 #include "Rinex3ClockBase.hpp"
51 #include "RinexSatID.hpp"
52 #include "RinexObsID.hpp"
53 #include "TimeSystem.hpp"
54 #include "gnsstk_export.h"
55 
56 namespace gnsstk
57 {
59 
60 
65  {
66  public:
67 
71  {}
72 
74 
75  GNSSTK_EXPORT
76  static const std::string versionString;
77  GNSSTK_EXPORT
78  static const std::string runByString;
79  GNSSTK_EXPORT
80  static const std::string commentString;
81  GNSSTK_EXPORT
82  static const std::string sysString;
83  GNSSTK_EXPORT
84  static const std::string timeSystemString;
85  GNSSTK_EXPORT
86  static const std::string leapSecondsString;
87  GNSSTK_EXPORT
88  static const std::string sysDCBString;
89  GNSSTK_EXPORT
90  static const std::string sysPCVString;
91  GNSSTK_EXPORT
92  static const std::string numDataString;
93  GNSSTK_EXPORT
94  static const std::string stationNameString;
95  GNSSTK_EXPORT
96  static const std::string stationClockRefString;
97  GNSSTK_EXPORT
98  static const std::string analysisCenterString;
99  GNSSTK_EXPORT
100  static const std::string numClockRefString;
101  GNSSTK_EXPORT
102  static const std::string analysisClkRefrString;
103  GNSSTK_EXPORT
104  static const std::string numReceiversString;
105  GNSSTK_EXPORT
106  static const std::string solnStateString;
107  GNSSTK_EXPORT
108  static const std::string numSolnSatsString;
109  GNSSTK_EXPORT
110  static const std::string prnListString;
111  GNSSTK_EXPORT
112  static const std::string endOfHeaderString;
113 
114 
117  {
118  versionValid = 0x01,
119  runByValid = 0x02,
120  commentValid = 0x04,
121  sysValid = 0x08,
122 
123  timeSystemValid = 0x010,
125  sysDCBValid = 0x040,
126  sysPCVValid = 0x080,
127 
128  numDataValid = 0x0100,
129  stationNameValid = 0x0200,
132 
133  numClockRefValid = 0x01000,
135  numReceiversValid = 0x04000,
136  solnStateValid = 0x08000,
137 
138  numSolnSatsValid = 0x010000,
139  prnListValid = 0x020000,
140  endOfHeaderValid = 0x040000,
141 
142  //allRequiredValid = 0x07F9A3, ///< this mask if for all required fields
143  //allRequiredValid = 0x07F903, ///< this mask if for all required fields
144  allRequiredValid = 0x07C903,
145  allValid = 0x07FFFF
146  };
147 
149  virtual ~Rinex3ClockHeader() {}
150 
151  // The next four lines is our common interface
153  virtual bool isHeader() const { return true; }
154 
163 #pragma clang diagnostic push
164 #pragma clang diagnostic ignored "-Woverloaded-virtual"
165  virtual void dump(std::ostream& s=std::cout, short detail = 0) const noexcept;
166 #pragma clang diagnostic pop
167 
169  void dumpValid(std::ostream& s=std::cout) const noexcept;
170 
171  double version;
172  std::string program;
173  std::string runby;
174  std::string fileSys;
175  std::vector<std::string> dataTypes;
176 
178  std::string satSysPrev;
180  int numObs;
181  typedef std::map<std::string, std::vector<RinexObsID> > RinexObsMap;
183 
186 
187  std::string analCenterDesignator;
188  std::string analysisCenter;
189  std::string terrRefFrame;
190  // system letter, program name, and source of code bias corrections
191  typedef std::pair<std::string,std::string> stringPair;
192  std::map<std::string, stringPair > dcbsMap;
193  // system letter, program name, and source of phase center corrections
194  std::map<std::string, stringPair > pcvsMap;
195 
196 
198  std::map<std::string,std::string> stationID;
199  // NB these coordinates are often more than 32 bits -- cannot store as number!
200  std::map<std::string,std::string> stationX;
201  std::map<std::string,std::string> stationY;
202  std::map<std::string,std::string> stationZ;
203 
205  std::vector<RinexSatID> satList;
206 
207  std::vector<std::string> commentList;
208 
209  unsigned long valid;
210 
211  protected:
213  void clear(void)
214  {
215  version = 3.0;
216  program = std::string();
217  runby = std::string();
218  dataTypes.clear();
219  leapSeconds = 0;
220  analysisCenter = std::string();
221  terrRefFrame = std::string();
223  dcbsMap.clear();
224  pcvsMap.clear();
225  numSolnStations = 0;
226  stationID.clear();
227  stationX.clear();
228  stationY.clear();
229  stationZ.clear();
230  numSolnSatellites = 0;
231  satList.clear();
232  commentList.clear();
233 
234  valid = 0;
235  }
236 
242  virtual void reallyPutRecord(FFStream& s) const;
243 
253  virtual void reallyGetRecord(FFStream& s);
254 
255  }; // end class Rinex3ClockHeader
256 
258 
259 } // namespace
260 
261 #endif // RINEX3CLOCKHEADER_HPP
TimeSystem.hpp
gnsstk::Rinex3ClockHeader::~Rinex3ClockHeader
virtual ~Rinex3ClockHeader()
destructor
Definition: Rinex3ClockHeader.hpp:149
gnsstk::Rinex3ClockHeader::sysString
static const GNSSTK_EXPORT std::string sysString
"SYS / # / OBS TYPES"
Definition: Rinex3ClockHeader.hpp:82
gnsstk::Rinex3ClockHeader::valid
unsigned long valid
valid bits for this header
Definition: Rinex3ClockHeader.hpp:209
gnsstk::Rinex3ClockHeader::dcbsMap
std::map< std::string, stringPair > dcbsMap
Definition: Rinex3ClockHeader.hpp:192
gnsstk::Rinex3ClockHeader::timeSystemString
static const GNSSTK_EXPORT std::string timeSystemString
"TIME SYSTEM ID"
Definition: Rinex3ClockHeader.hpp:84
gnsstk::Rinex3ClockHeader::stationID
std::map< std::string, std::string > stationID
4-char name, station id
Definition: Rinex3ClockHeader.hpp:198
gnsstk::Rinex3ClockHeader::numReceiversValid
@ numReceiversValid
"# OF SOLN STA / TRF"
Definition: Rinex3ClockHeader.hpp:135
gnsstk::Rinex3ClockHeader::version
double version
Rinex3Clock Version or file format.
Definition: Rinex3ClockHeader.hpp:171
gnsstk::Rinex3ClockHeader::leapSeconds
int leapSeconds
Leap seconds.
Definition: Rinex3ClockHeader.hpp:184
gnsstk::Rinex3ClockHeader::validBits
validBits
Validity bits for the RINEX Clock Header (** optional)
Definition: Rinex3ClockHeader.hpp:116
gnsstk::FFStream
Definition: FFStream.hpp:119
gnsstk::Rinex3ClockHeader
Definition: Rinex3ClockHeader.hpp:64
gnsstk::Rinex3ClockHeader::program
std::string program
Program name.
Definition: Rinex3ClockHeader.hpp:172
const
#define const
Definition: getopt.c:43
gnsstk::Rinex3ClockHeader::commentList
std::vector< std::string > commentList
comments
Definition: Rinex3ClockHeader.hpp:207
gnsstk::Rinex3ClockHeader::dump
virtual void dump(std::ostream &s=std::cout, short detail=0) const noexcept
Definition: Rinex3ClockHeader.cpp:518
gnsstk::Rinex3ClockHeader::analysisCenter
std::string analysisCenter
Analysis center.
Definition: Rinex3ClockHeader.hpp:188
gnsstk::Rinex3ClockHeader::Rinex3ClockHeader
Rinex3ClockHeader()
constructor
Definition: Rinex3ClockHeader.hpp:69
gnsstk::Rinex3ClockHeader::numObs
int numObs
save OBS # / TYPES and Sys / SCALE FACTOR for continuation lines.
Definition: Rinex3ClockHeader.hpp:180
gnsstk::Rinex3ClockHeader::stationClockRefString
static const GNSSTK_EXPORT std::string stationClockRefString
"STATION CLK REF"
Definition: Rinex3ClockHeader.hpp:96
gnsstk::Rinex3ClockHeader::stationZ
std::map< std::string, std::string > stationZ
name, station Z coord in mm
Definition: Rinex3ClockHeader.hpp:202
gnsstk::Rinex3ClockHeader::prnListString
static const GNSSTK_EXPORT std::string prnListString
"PRN LIST"
Definition: Rinex3ClockHeader.hpp:110
gnsstk::Rinex3ClockHeader::runByString
static const GNSSTK_EXPORT std::string runByString
"PGM / RUN BY / DATE"
Definition: Rinex3ClockHeader.hpp:78
gnsstk::Rinex3ClockHeader::runby
std::string runby
Run by string.
Definition: Rinex3ClockHeader.hpp:173
gnsstk::CarrierBand::Any
@ Any
Used to match any carrier band.
gnsstk::TimeSystem::Any
@ Any
wildcard; allows comparison with any other type
gnsstk::Rinex3ClockHeader::reallyPutRecord
virtual void reallyPutRecord(FFStream &s) const
Definition: Rinex3ClockHeader.cpp:290
gnsstk::Rinex3ClockHeader::stationClockRefValid
@ stationClockRefValid
"STATION CLK REF" **
Definition: Rinex3ClockHeader.hpp:130
gnsstk::Rinex3ClockHeader::satList
std::vector< RinexSatID > satList
List of sats (PRN LIST)
Definition: Rinex3ClockHeader.hpp:205
gnsstk::Rinex3ClockHeader::numDataValid
@ numDataValid
"# / TYPES OF DATA"
Definition: Rinex3ClockHeader.hpp:128
gnsstk::Rinex3ClockHeader::stationNameValid
@ stationNameValid
"STATION NAME / NUM" **
Definition: Rinex3ClockHeader.hpp:129
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::Rinex3ClockHeader::solnStateValid
@ solnStateValid
"SOLN STA NAME / NUM"
Definition: Rinex3ClockHeader.hpp:136
gnsstk::Rinex3ClockHeader::numSolnSatsString
static const GNSSTK_EXPORT std::string numSolnSatsString
"# OF SOLN SATS"
Definition: Rinex3ClockHeader.hpp:108
gnsstk::Rinex3ClockHeader::sysValid
@ sysValid
"SYS / # / OBS TYPES" **
Definition: Rinex3ClockHeader.hpp:121
gnsstk::Rinex3ClockHeader::dataTypes
std::vector< std::string > dataTypes
list of data types
Definition: Rinex3ClockHeader.hpp:175
gnsstk::Rinex3ClockHeader::commentString
static const GNSSTK_EXPORT std::string commentString
"COMMENT"
Definition: Rinex3ClockHeader.hpp:80
gnsstk::Rinex3ClockHeader::numClockRefValid
@ numClockRefValid
"# OF CLK REF" **
Definition: Rinex3ClockHeader.hpp:133
gnsstk::Rinex3ClockHeader::sysDCBString
static const GNSSTK_EXPORT std::string sysDCBString
"SYS / DCBS APPLIED"
Definition: Rinex3ClockHeader.hpp:88
gnsstk::Rinex3ClockHeader::stationY
std::map< std::string, std::string > stationY
name, station Y coord in mm
Definition: Rinex3ClockHeader.hpp:201
gnsstk::Rinex3ClockHeader::sysPCVValid
@ sysPCVValid
"SYS / PCVS APPLIED" **
Definition: Rinex3ClockHeader.hpp:126
gnsstk::Rinex3ClockHeader::analysisCenterString
static const GNSSTK_EXPORT std::string analysisCenterString
"ANALYSIS CENTER"
Definition: Rinex3ClockHeader.hpp:98
gnsstk::Rinex3ClockHeader::sysDCBValid
@ sysDCBValid
"SYS / DCBS APPLIED" **
Definition: Rinex3ClockHeader.hpp:125
gnsstk::Rinex3ClockHeader::dumpValid
void dumpValid(std::ostream &s=std::cout) const noexcept
Dump validity bits -> header strings.
Definition: Rinex3ClockHeader.cpp:578
RinexObsID.hpp
gnsstk::Rinex3ClockHeader::numReceiversString
static const GNSSTK_EXPORT std::string numReceiversString
"# OF SOLN STA / TRF"
Definition: Rinex3ClockHeader.hpp:104
gnsstk::Rinex3ClockHeader::pcvsMap
std::map< std::string, stringPair > pcvsMap
Definition: Rinex3ClockHeader.hpp:194
gnsstk::Rinex3ClockHeader::allRequiredValid
@ allRequiredValid
this mask if for all required fields
Definition: Rinex3ClockHeader.hpp:144
gnsstk::TimeSystem
TimeSystem
Definition of various time systems.
Definition: TimeSystem.hpp:51
gnsstk::Rinex3ClockHeader::solnStateString
static const GNSSTK_EXPORT std::string solnStateString
"SOLN STA NAME / NUM"
Definition: Rinex3ClockHeader.hpp:106
gnsstk::Rinex3ClockHeader::fileSys
std::string fileSys
GNSS system OR Mixed.
Definition: Rinex3ClockHeader.hpp:174
gnsstk::Rinex3ClockHeader::allValid
@ allValid
all the bits
Definition: Rinex3ClockHeader.hpp:145
gnsstk::Rinex3ClockHeader::versionString
static const GNSSTK_EXPORT std::string versionString
"RINEX VERSION / TYPE"
Definition: Rinex3ClockHeader.hpp:76
Rinex3ClockBase.hpp
gnsstk::Rinex3ClockHeader::leapSecondsString
static const GNSSTK_EXPORT std::string leapSecondsString
"LEAP SECONDS"
Definition: Rinex3ClockHeader.hpp:86
gnsstk::Rinex3ClockHeader::endOfHeaderValid
@ endOfHeaderValid
"END OF HEADER"
Definition: Rinex3ClockHeader.hpp:140
gnsstk::Rinex3ClockHeader::analysisClkRefrString
static const GNSSTK_EXPORT std::string analysisClkRefrString
"ANALYSIS CLK REF"
Definition: Rinex3ClockHeader.hpp:102
gnsstk::Rinex3ClockHeader::clear
void clear(void)
clear out the member data
Definition: Rinex3ClockHeader.hpp:213
gnsstk::Rinex3ClockHeader::numClockRefString
static const GNSSTK_EXPORT std::string numClockRefString
"# OF CLK REF"
Definition: Rinex3ClockHeader.hpp:100
gnsstk::Rinex3ClockHeader::satSysPrev
std::string satSysPrev
recall the prev sat. sys for continuation lines.
Definition: Rinex3ClockHeader.hpp:178
gnsstk::Rinex3ClockHeader::prnListValid
@ prnListValid
"PRN LIST"
Definition: Rinex3ClockHeader.hpp:139
gnsstk::Rinex3ClockHeader::numDataString
static const GNSSTK_EXPORT std::string numDataString
"# / TYPES OF DATA"
Definition: Rinex3ClockHeader.hpp:92
gnsstk::Rinex3ClockHeader::numSolnSatellites
int numSolnSatellites
Number of satellites in the soln.
Definition: Rinex3ClockHeader.hpp:204
gnsstk::Rinex3ClockHeader::leapSecondsValid
@ leapSecondsValid
"LEAP SECONDS" **
Definition: Rinex3ClockHeader.hpp:124
gnsstk::Rinex3ClockHeader::timeSystem
TimeSystem timeSystem
Time system.
Definition: Rinex3ClockHeader.hpp:185
gnsstk::Rinex3ClockBase
This class is here to make readable inheritance diagrams.
Definition: Rinex3ClockBase.hpp:56
gnsstk::Rinex3ClockHeader::timeSystemValid
@ timeSystemValid
"TIME SYSTEM ID" **
Definition: Rinex3ClockHeader.hpp:123
gnsstk::Rinex3ClockHeader::sysPCVString
static const GNSSTK_EXPORT std::string sysPCVString
"SYS / PCVS APPLIED"
Definition: Rinex3ClockHeader.hpp:90
RinexSatID.hpp
gnsstk::Rinex3ClockHeader::sysObsTypes
RinexObsMap sysObsTypes
list of obs types used for each GNSS
Definition: Rinex3ClockHeader.hpp:182
gnsstk::Rinex3ClockHeader::reallyGetRecord
virtual void reallyGetRecord(FFStream &s)
Definition: Rinex3ClockHeader.cpp:80
gnsstk::Rinex3ClockHeader::stringPair
std::pair< std::string, std::string > stringPair
Definition: Rinex3ClockHeader.hpp:191
gnsstk::Rinex3ClockHeader::numSolnStations
int numSolnStations
Number of stations in the solution.
Definition: Rinex3ClockHeader.hpp:197
gnsstk::Rinex3ClockHeader::analysisCenterValid
@ analysisCenterValid
"ANALYSIS CENTER"
Definition: Rinex3ClockHeader.hpp:131
gnsstk::Rinex3ClockHeader::runByValid
@ runByValid
"PGM / RUN BY / DATE"
Definition: Rinex3ClockHeader.hpp:119
gnsstk::Rinex3ClockHeader::versionValid
@ versionValid
"RINEX VERSION / TYPE"
Definition: Rinex3ClockHeader.hpp:118
gnsstk::Rinex3ClockHeader::analysisClkRefrValid
@ analysisClkRefrValid
"ANALYSIS CLK REF" **
Definition: Rinex3ClockHeader.hpp:134
gnsstk::Rinex3ClockHeader::isHeader
virtual bool isHeader() const
Rinex3ClockHeader is a "header" so this function always returns true.
Definition: Rinex3ClockHeader.hpp:153
gnsstk::Rinex3ClockHeader::terrRefFrame
std::string terrRefFrame
Terr Ref Frame or SINEX solution.
Definition: Rinex3ClockHeader.hpp:189
gnsstk::Rinex3ClockHeader::analCenterDesignator
std::string analCenterDesignator
Analysis center designator (3 char)
Definition: Rinex3ClockHeader.hpp:187
gnsstk::Rinex3ClockHeader::numSolnSatsValid
@ numSolnSatsValid
"# OF SOLN SATS"
Definition: Rinex3ClockHeader.hpp:138
gnsstk::Rinex3ClockHeader::stationNameString
static const GNSSTK_EXPORT std::string stationNameString
"STATION NAME / NUM"
Definition: Rinex3ClockHeader.hpp:94
gnsstk::Rinex3ClockHeader::endOfHeaderString
static const GNSSTK_EXPORT std::string endOfHeaderString
"END OF HEADER"
Definition: Rinex3ClockHeader.hpp:112
gnsstk::Rinex3ClockHeader::stationX
std::map< std::string, std::string > stationX
name, station X coord in mm
Definition: Rinex3ClockHeader.hpp:200
gnsstk::Rinex3ClockHeader::RinexObsMap
std::map< std::string, std::vector< RinexObsID > > RinexObsMap
Definition: Rinex3ClockHeader.hpp:181
gnsstk::Rinex3ClockHeader::commentValid
@ commentValid
"COMMENT" **
Definition: Rinex3ClockHeader.hpp:120


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