RinexClockHeader.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_RINEXCLOCKHEADER_HPP
45 #define GNSSTK_RINEXCLOCKHEADER_HPP
46 
47 #include <string>
48 #include <list>
49 #include "gnsstkplatform.h"
50 #include "RinexClockBase.hpp"
51 #include "SatID.hpp"
52 #include "FFStream.hpp"
53 #include "StringUtils.hpp"
54 #include "gnsstk_export.h"
55 
56 
57 namespace gnsstk
58 {
60 
62  {
63 
64  public:
67  {}
68 
70  virtual ~RinexClockHeader() {}
71 
73 
74  GNSSTK_EXPORT
75  static const std::string versionString;
76  GNSSTK_EXPORT
77  static const std::string runByString;
78  GNSSTK_EXPORT
79  static const std::string commentString;
80  GNSSTK_EXPORT
81  static const std::string leapSecondsString;
82  GNSSTK_EXPORT
83  static const std::string dataTypesString;
84  GNSSTK_EXPORT
85  static const std::string stationNameString;
86  GNSSTK_EXPORT
87  static const std::string calibrationClkString;
88  GNSSTK_EXPORT
89  static const std::string acNameString;
90  GNSSTK_EXPORT
91  static const std::string numRefClkString;
92  GNSSTK_EXPORT
93  static const std::string analysisClkRefString;
94  GNSSTK_EXPORT
95  static const std::string numStationsString;
96  GNSSTK_EXPORT
97  static const std::string solnStaNameString;
98  GNSSTK_EXPORT
99  static const std::string numSatsString;
100  GNSSTK_EXPORT
101  static const std::string prnListString;
102  GNSSTK_EXPORT
103  static const std::string endOfHeader;
104 
105 
108  {
109  versionValid = 0x01,
110  runByValid = 0x02,
111  commentValid = 0x04,
113  dataTypesValid = 0x010,
116  acNameValid = 0x080,
117  numRefClkValid = 0x0100,
118  numStationsValid = 0x0200,
119  solnStaNameValid = 0x0400,
120  numSatsValid = 0x00800,
121  prnListValid = 0x01000,
122 
123  endValid = 0x080000000,
124 
125  allValidAR = 0x080000797,
126  allValidAS = 0x080001F97,
127  allValidCR = 0x080000073,
128  allValidDR = 0x080000033,
129  allValidMS = 0x080000093
130  };
131 
133  struct RefClk
134  {
137  : clkConstraint(0)
138  {}
141  std::string name;
144  std::string number;
147  };
148 
149 
153  {
162  std::list<RefClk> clocks;
163  };
164 
165 
168  struct SolnSta
169  {
171  std::string name;
174  std::string number;
177 
178  int64_t posX;
179  int64_t posY;
180  int64_t posZ;
182  };
183 
185  double version;
187  std::string fileType;
189  std::string fileProgram;
191  std::string fileAgency;
193  std::string date;
195  std::list<std::string> commentList;
199  int numType;
201  std::list<RinexClkType> dataTypeList;
203  std::string stationName;
206  std::string stationNumber;
209  std::string stationClkRef;
211  std::string ac;
213  std::string acName;
216  std::list<RefClkRecord> refClkList;
220  int numSta;
223  std::string trf;
227  std::list<SolnSta> solnStaList;
230  int numSats;
232  std::list<SatID> prnList;
234  unsigned long valid;
235 
238  virtual bool isHeader(void) const {return true;}
239 
241  virtual void dump(std::ostream& s) const;
242 
244  bool isValid() const;
245 
246 
247  protected:
253  virtual void reallyPutRecord(FFStream& s) const;
254 
266  virtual void reallyGetRecord(FFStream& s);
267 
269  void clear();
270 
271 
272  private:
278  void ParseHeaderRecord(const std::string& line);
279 
280  }; // RinexClockHeader
281 
283 
284 } // namespace
285 
286 #endif
gnsstk::RinexClockHeader::calibrationClkString
static const GNSSTK_EXPORT std::string calibrationClkString
"STATION CLK REF"
Definition: RinexClockHeader.hpp:87
gnsstk::RinexClockHeader::ParseHeaderRecord
void ParseHeaderRecord(const std::string &line)
Definition: RinexClockHeader.cpp:486
gnsstk::RinexClockHeader::stationName
std::string stationName
4-character reciever name designator
Definition: RinexClockHeader.hpp:203
gnsstk::RinexClockHeader::numSats
int numSats
Definition: RinexClockHeader.hpp:230
gnsstk::RinexClockHeader::SolnSta::posZ
int64_t posZ
Definition: RinexClockHeader.hpp:180
gnsstk::RinexClockHeader::isHeader
virtual bool isHeader(void) const
Definition: RinexClockHeader.hpp:238
gnsstk::RinexClockHeader::date
std::string date
Date of file creation, no specified format.
Definition: RinexClockHeader.hpp:193
gnsstk::RinexClockBase::RCDouble
Definition: RinexClockBase.hpp:65
gnsstk::RinexClockHeader::SolnSta::posX
int64_t posX
Definition: RinexClockHeader.hpp:178
gnsstk::RinexClockHeader::allValidAR
@ allValidAR
Definition: RinexClockHeader.hpp:125
gnsstk::RinexClockHeader::RefClkRecord::numClkRef
int numClkRef
Definition: RinexClockHeader.hpp:156
gnsstk::RinexClockHeader::SolnSta::posY
int64_t posY
Definition: RinexClockHeader.hpp:179
gnsstk::RinexClockHeader::SolnSta::name
std::string name
4-character station/reciever name
Definition: RinexClockHeader.hpp:171
gnsstk::RinexClockHeader::SolnSta
Definition: RinexClockHeader.hpp:168
gnsstk::FFStream
Definition: FFStream.hpp:119
gnsstk::RinexClockHeader::analysisClkRefString
static const GNSSTK_EXPORT std::string analysisClkRefString
"ANALYSIS CLK REF"
Definition: RinexClockHeader.hpp:93
StringUtils.hpp
gnsstk::RinexClockHeader::stationNameString
static const GNSSTK_EXPORT std::string stationNameString
"STATION NAME / NUM"
Definition: RinexClockHeader.hpp:85
gnsstk::RinexClockHeader::versionValid
@ versionValid
"RINEX VERSION / TYPE"
Definition: RinexClockHeader.hpp:109
gnsstk::RinexClockHeader::version
double version
Format version (2.00)
Definition: RinexClockHeader.hpp:185
gnsstk::RinexClockHeader::commentValid
@ commentValid
"COMMENT"
Definition: RinexClockHeader.hpp:111
gnsstkplatform.h
gnsstk::RinexClockHeader::allValidDR
@ allValidDR
Definition: RinexClockHeader.hpp:128
gnsstk::RinexClockHeader::numRefClkValid
@ numRefClkValid
"# OF CLK REF"
Definition: RinexClockHeader.hpp:117
gnsstk::RinexClockHeader::prnListValid
@ prnListValid
"PRN LIST"
Definition: RinexClockHeader.hpp:121
gnsstk::RinexClockHeader::dataTypeList
std::list< RinexClkType > dataTypeList
List of clock data types.
Definition: RinexClockHeader.hpp:201
gnsstk::RinexClockHeader::allValidMS
@ allValidMS
Definition: RinexClockHeader.hpp:129
gnsstk::RinexClockHeader::acNameString
static const GNSSTK_EXPORT std::string acNameString
"ANALYSIS CENTER"
Definition: RinexClockHeader.hpp:89
SatID.hpp
gnsstk::RinexClockHeader::~RinexClockHeader
virtual ~RinexClockHeader()
Destructor.
Definition: RinexClockHeader.hpp:70
gnsstk::RinexClockHeader::dataTypesString
static const GNSSTK_EXPORT std::string dataTypesString
"# / TYPES OF DATA"
Definition: RinexClockHeader.hpp:83
gnsstk::RinexClockHeader::stationNumber
std::string stationNumber
Definition: RinexClockHeader.hpp:206
gnsstk::RinexClockHeader::numType
int numType
Number of different clock data types stored in the file.
Definition: RinexClockHeader.hpp:199
gnsstk::RinexClockHeader::acName
std::string acName
Full name of Analysis Center.
Definition: RinexClockHeader.hpp:213
gnsstk::RinexClockHeader::dump
virtual void dump(std::ostream &s) const
A debug function that outputs the header to s.
Definition: RinexClockHeader.cpp:153
gnsstk::RinexClockHeader::trf
std::string trf
Definition: RinexClockHeader.hpp:223
gnsstk::RinexClockHeader::RefClk::clkConstraint
RCDouble clkConstraint
Optional non-zero value for the apriori clock constraint.
Definition: RinexClockHeader.hpp:146
gnsstk::RinexClockHeader::runByString
static const GNSSTK_EXPORT std::string runByString
"PGM / RUN BY / DATE"
Definition: RinexClockHeader.hpp:77
gnsstk::RinexClockHeader::RefClk::name
std::string name
Definition: RinexClockHeader.hpp:141
RinexClockBase.hpp
gnsstk::RinexClockBase
Provide a base class for RinexClockData and RinexClockHeader.
Definition: RinexClockBase.hpp:60
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::RinexClockHeader::calibrationClkValid
@ calibrationClkValid
"STATION CLK REF"
Definition: RinexClockHeader.hpp:115
gnsstk::RinexClockHeader::numSatsValid
@ numSatsValid
"# OF SOLN SATS"
Definition: RinexClockHeader.hpp:120
gnsstk::RinexClockHeader::allValidAS
@ allValidAS
Definition: RinexClockHeader.hpp:126
gnsstk::RinexClockHeader::fileAgency
std::string fileAgency
Name of agency creating current file.
Definition: RinexClockHeader.hpp:191
gnsstk::RinexClockHeader::leapSecondsString
static const GNSSTK_EXPORT std::string leapSecondsString
"LEAP SECONDS"
Definition: RinexClockHeader.hpp:81
gnsstk::RinexClockHeader::RefClkRecord
Definition: RinexClockHeader.hpp:152
gnsstk::RinexClockHeader::SolnSta::number
std::string number
Definition: RinexClockHeader.hpp:174
gnsstk::RinexClockHeader::RefClkRecord::startEpoch
CivilTime startEpoch
Start epoch (in GPS time)
Definition: RinexClockHeader.hpp:158
gnsstk::RinexClockHeader::reallyPutRecord
virtual void reallyPutRecord(FFStream &s) const
Definition: RinexClockHeader.cpp:290
gnsstk::RinexClockHeader::RefClk::number
std::string number
Definition: RinexClockHeader.hpp:144
gnsstk::RinexClockHeader::endValid
@ endValid
"END OF HEADER"
Definition: RinexClockHeader.hpp:123
gnsstk::RinexClockHeader::prnList
std::list< SatID > prnList
List of PRNs.
Definition: RinexClockHeader.hpp:232
gnsstk::RinexClockHeader::runByValid
@ runByValid
"PGM / RUN BY / DATE"
Definition: RinexClockHeader.hpp:110
gnsstk::RinexClockHeader::dataTypesValid
@ dataTypesValid
"# / TYPES OF DATA"
Definition: RinexClockHeader.hpp:113
gnsstk::RinexClockHeader::RefClkRecord::clocks
std::list< RefClk > clocks
List of RefClks to appear as "ANALYSIS CLK REF".
Definition: RinexClockHeader.hpp:162
gnsstk::RinexClockHeader::commentString
static const GNSSTK_EXPORT std::string commentString
"COMMENT"
Definition: RinexClockHeader.hpp:79
gnsstk::RinexClockHeader::endOfHeader
static const GNSSTK_EXPORT std::string endOfHeader
"END OF HEADER"
Definition: RinexClockHeader.hpp:103
gnsstk::RinexClockHeader::valid
unsigned long valid
Bits set when individual header members are present and valid.
Definition: RinexClockHeader.hpp:234
gnsstk::RinexClockHeader::RinexClockHeader
RinexClockHeader()
A Simple Constructor.
Definition: RinexClockHeader.hpp:66
gnsstk::RinexClockHeader::numStationsString
static const GNSSTK_EXPORT std::string numStationsString
"# OF SOLN STA / TRF"
Definition: RinexClockHeader.hpp:95
gnsstk::RinexClockHeader::allValidCR
@ allValidCR
Definition: RinexClockHeader.hpp:127
gnsstk::RinexClockHeader::clear
void clear()
Clears all header values and lists.
Definition: RinexClockHeader.cpp:127
gnsstk::RinexClockHeader
Definition: RinexClockHeader.hpp:61
gnsstk::RinexClockHeader::prnListString
static const GNSSTK_EXPORT std::string prnListString
"PRN LIST"
Definition: RinexClockHeader.hpp:101
gnsstk::RinexClockHeader::fileType
std::string fileType
File type ("C" for Clock Data)
Definition: RinexClockHeader.hpp:187
gnsstk::RinexClockHeader::solnStaList
std::list< SolnSta > solnStaList
Definition: RinexClockHeader.hpp:227
gnsstk::RinexClockHeader::numStationsValid
@ numStationsValid
"# OF SOLN STA / TRF"
Definition: RinexClockHeader.hpp:118
gnsstk::RinexClockHeader::numSta
int numSta
Definition: RinexClockHeader.hpp:220
gnsstk::RinexClockHeader::stationNameValid
@ stationNameValid
"STATION NAME / NUM"
Definition: RinexClockHeader.hpp:114
gnsstk::RinexClockHeader::commentList
std::list< std::string > commentList
Comments line(s)
Definition: RinexClockHeader.hpp:195
gnsstk::CivilTime
Definition: CivilTime.hpp:55
gnsstk::RinexClockHeader::refClkList
std::list< RefClkRecord > refClkList
Definition: RinexClockHeader.hpp:216
gnsstk::RinexClockHeader::solnStaNameString
static const GNSSTK_EXPORT std::string solnStaNameString
"SOLN STA NAME / NUM"
Definition: RinexClockHeader.hpp:97
gnsstk::RinexClockHeader::RefClk::RefClk
RefClk()
Initialize the clock constraint to 0.
Definition: RinexClockHeader.hpp:136
gnsstk::RinexClockHeader::validBits
validBits
Validity bits for the RINEX Clock Header.
Definition: RinexClockHeader.hpp:107
gnsstk::RinexClockHeader::leapSeconds
int leapSeconds
Leap second (optional)
Definition: RinexClockHeader.hpp:197
gnsstk::RinexClockHeader::acNameValid
@ acNameValid
"ANALYSIS CENTER"
Definition: RinexClockHeader.hpp:116
gnsstk::RinexClockHeader::numSatsString
static const GNSSTK_EXPORT std::string numSatsString
"# OF SOLN SATS"
Definition: RinexClockHeader.hpp:99
gnsstk::RinexClockHeader::stationClkRef
std::string stationClkRef
Definition: RinexClockHeader.hpp:209
gnsstk::RinexClockHeader::RefClkRecord::stopEpoch
CivilTime stopEpoch
Stop epoch (in GPS time)
Definition: RinexClockHeader.hpp:160
gnsstk::RinexClockHeader::leapSecondsValid
@ leapSecondsValid
"LEAP SECONDS"
Definition: RinexClockHeader.hpp:112
gnsstk::RinexClockHeader::numRefClkString
static const GNSSTK_EXPORT std::string numRefClkString
"# OF CLK REF"
Definition: RinexClockHeader.hpp:91
gnsstk::RinexClockHeader::RefClk
Encapsulates a single clock specified in a ANALYSIS CLK REF header.
Definition: RinexClockHeader.hpp:133
gnsstk::RinexClockHeader::isValid
bool isValid() const
Return boolean : is this a valid Rinex clock header?
Definition: RinexClockHeader.cpp:83
FFStream.hpp
gnsstk::RinexClockHeader::fileProgram
std::string fileProgram
Name of program creating current file.
Definition: RinexClockHeader.hpp:189
gnsstk::RinexClockHeader::solnStaNameValid
@ solnStaNameValid
"SOLN STA NAME / NUM"
Definition: RinexClockHeader.hpp:119
gnsstk::RinexClockHeader::ac
std::string ac
3-character IGS AC designator
Definition: RinexClockHeader.hpp:211
gnsstk::RinexClockHeader::versionString
static const GNSSTK_EXPORT std::string versionString
"RINEX VERSION / TYPE"
Definition: RinexClockHeader.hpp:75
gnsstk::RinexClockHeader::reallyGetRecord
virtual void reallyGetRecord(FFStream &s)
Definition: RinexClockHeader.cpp:439


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