core
lib
FileHandling
Ionex
IonexHeader.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_IONEXHEADER_HPP
45
#define GNSSTK_IONEXHEADER_HPP
46
47
#include <string>
48
#include <vector>
49
#include <map>
50
51
#include "
CommonTime.hpp
"
52
#include "
SatID.hpp
"
53
#include "
IonexBase.hpp
"
54
#include "gnsstk_export.h"
55
56
namespace
gnsstk
57
{
58
59
61
62
63
70
class
IonexHeader
:
public
IonexBase
71
{
72
public
:
73
75
IonexHeader
();
76
77
79
void
clear
();
80
81
87
GNSSTK_EXPORT
88
static
const
std::string
versionString
;
89
GNSSTK_EXPORT
90
static
const
std::string
runByString
;
91
GNSSTK_EXPORT
92
static
const
std::string
descriptionString
;
93
GNSSTK_EXPORT
94
static
const
std::string
commentString
;
95
GNSSTK_EXPORT
96
static
const
std::string
firstTimeString
;
97
GNSSTK_EXPORT
98
static
const
std::string
lastTimeString
;
99
GNSSTK_EXPORT
100
static
const
std::string
intervalString
;
101
GNSSTK_EXPORT
102
static
const
std::string
numMapsString
;
103
GNSSTK_EXPORT
104
static
const
std::string
mappingFunctionString
;
105
GNSSTK_EXPORT
106
static
const
std::string
elevationString
;
107
GNSSTK_EXPORT
108
static
const
std::string
observablesUsedString
;
109
GNSSTK_EXPORT
110
static
const
std::string
numStationsString
;
111
GNSSTK_EXPORT
112
static
const
std::string
numSatsString
;
113
GNSSTK_EXPORT
114
static
const
std::string
baseRadiusString
;
115
GNSSTK_EXPORT
116
static
const
std::string
mapDimensionString
;
117
GNSSTK_EXPORT
118
static
const
std::string
hgtGridString
;
119
GNSSTK_EXPORT
120
static
const
std::string
latGridString
;
121
GNSSTK_EXPORT
122
static
const
std::string
lonGridString
;
123
GNSSTK_EXPORT
124
static
const
std::string
exponentString
;
125
GNSSTK_EXPORT
126
static
const
std::string
startAuxDataString
;
127
GNSSTK_EXPORT
128
static
const
std::string
endAuxDataString
;
129
GNSSTK_EXPORT
130
static
const
std::string
endOfHeader
;
131
132
133
// Differential Code Bias structure
134
struct
DCB
135
{
136
// If isPRN is true, system and prn are set, otherwise
137
// name and number are set. bias and rms should always be
138
// set.
139
char
system
;
140
int
prn
;
143
double
bias
;
144
double
rms
;
145
bool
isPRN
;
146
std::string
name
;
147
std::string
number
;
148
150
DCB
();
151
160
DCB
(
char
s,
int
p,
double
b,
double
r);
161
169
DCB
(
const
std::string& s,
const
std::string& n,
double
b,
double
r);
170
176
GNSSTK_EXPORT
177
static
const
std::string
svsAuxDataString
;
178
GNSSTK_EXPORT
179
static
const
std::string
stationsAuxDataString
;
180
181
183
std::string
toString
()
const
;
184
};
// End of 'DCB' data structure
185
186
191
double
version
;
192
193
std::string
fileType
;
194
std::string
system
;
195
std::string
fileProgram
;
196
std::string
fileAgency
;
197
std::string
date
;
198
199
std::vector<std::string>
descriptionList
;
200
std::vector<std::string>
commentList
;
201
202
CommonTime
firstEpoch
;
203
CommonTime
lastEpoch
;
204
205
int
interval
;
206
size_t
numMaps
;
207
std::string
mappingFunction
;
208
double
elevation
;
209
std::string
observablesUsed
;
210
211
size_t
numStations
;
212
size_t
numSVs
;
213
214
double
baseRadius
;
215
size_t
mapDims
;
216
217
double
hgt
[3];
218
double
lat
[3];
221
double
lon
[3];
223
225
int
exponent
;
226
std::string
auxData
;
227
229
typedef
std::map<SatID,DCB>
SatDCBMap
;
231
typedef
std::map<std::string,DCB>
StaDCBMap
;
232
233
SatDCBMap
svsmap
;
234
StaDCBMap
stamap
;
235
bool
auxDataFlag
;
236
238
bool
valid
;
240
242
virtual
~IonexHeader
();
243
244
245
// IonexHeader is a "header" so this function always returns true.
246
virtual
bool
isHeader
()
const
247
{
return
true
; }
248
249
255
virtual
void
dump
(std::ostream& s = std::cout)
const
;
256
257
263
void
parseDcbRecord
(
const
std::string& line);
264
265
271
void
parseHeaderRecord
(
const
std::string& line);
272
273
280
void
writeHeaderRecords
(
FFStream
& s)
const
;
281
282
283
284
protected
:
285
286
293
void
reallyPutRecord
(
FFStream
& s)
const override
;
294
295
307
void
reallyGetRecord
(
FFStream
& s)
override
;
308
309
private
:
313
std::string
writeTime
(
const
CommonTime
& dt)
const
;
314
315
320
CommonTime
parseTime
(
const
std::string& line)
const
;
321
};
// End of class 'IonexHeader'
322
324
325
}
// End of namespace gnsstk
326
#endif // GNSSTK_IONEXHEADER_HPP
gnsstk::IonexHeader::latGridString
static const GNSSTK_EXPORT std::string latGridString
"LAT1 / LAT2 / DLAT"
Definition:
IonexHeader.hpp:120
gnsstk::IonexHeader::stamap
StaDCBMap stamap
Map of stations' DCBs (in nanoseconds)
Definition:
IonexHeader.hpp:234
gnsstk::IonexHeader::lon
double lon[3]
Definition:
IonexHeader.hpp:222
gnsstk::IonexHeader::interval
int interval
Time interval between maps (seconds)
Definition:
IonexHeader.hpp:205
gnsstk::IonexHeader::intervalString
static const GNSSTK_EXPORT std::string intervalString
"INTERVAL"
Definition:
IonexHeader.hpp:100
gnsstk::IonexHeader
Definition:
IonexHeader.hpp:70
gnsstk::IonexHeader::observablesUsed
std::string observablesUsed
One-line specification of used obs.
Definition:
IonexHeader.hpp:209
gnsstk::IonexHeader::observablesUsedString
static const GNSSTK_EXPORT std::string observablesUsedString
"OBSERVABLES USED"
Definition:
IonexHeader.hpp:108
gnsstk::IonexHeader::lastEpoch
CommonTime lastEpoch
Epoch of last map.
Definition:
IonexHeader.hpp:203
gnsstk::IonexHeader::reallyGetRecord
void reallyGetRecord(FFStream &s) override
Definition:
IonexHeader.cpp:356
gnsstk::IonexHeader::system
std::string system
Satellite system or theoretical model.
Definition:
IonexHeader.hpp:194
gnsstk::IonexHeader::exponentString
static const GNSSTK_EXPORT std::string exponentString
"EXPONENT"
Definition:
IonexHeader.hpp:124
gnsstk::IonexHeader::mappingFunctionString
static const GNSSTK_EXPORT std::string mappingFunctionString
"MAPPING FUNCTION"
Definition:
IonexHeader.hpp:104
gnsstk::FFStream
Definition:
FFStream.hpp:119
gnsstk::IonexHeader::descriptionString
static const GNSSTK_EXPORT std::string descriptionString
"DESCRIPTION"
Definition:
IonexHeader.hpp:92
IonexBase.hpp
gnsstk::IonexHeader::commentString
static const GNSSTK_EXPORT std::string commentString
"COMMENT"
Definition:
IonexHeader.hpp:94
gnsstk::IonexHeader::elevation
double elevation
Minimum elevation angle, in degrees.
Definition:
IonexHeader.hpp:208
gnsstk::IonexHeader::DCB::svsAuxDataString
static const GNSSTK_EXPORT std::string svsAuxDataString
"PRN / BIAS / RMS"
Definition:
IonexHeader.hpp:177
gnsstk::IonexHeader::writeTime
std::string writeTime(const CommonTime &dt) const
Definition:
IonexHeader.cpp:779
gnsstk::IonexHeader::DCB::DCB
DCB()
Default constructor. Defines and invalid structure.
Definition:
IonexHeader.cpp:798
gnsstk::IonexHeader::date
std::string date
Date and time of file creation.
Definition:
IonexHeader.hpp:197
SatID.hpp
gnsstk::IonexHeader::svsmap
SatDCBMap svsmap
Map of satellites' DCBs (in nanoseconds)
Definition:
IonexHeader.hpp:233
gnsstk::IonexHeader::version
double version
IONEX version.
Definition:
IonexHeader.hpp:191
gnsstk::IonexHeader::baseRadiusString
static const GNSSTK_EXPORT std::string baseRadiusString
"BASE RADIUS"
Definition:
IonexHeader.hpp:114
gnsstk::IonexHeader::dump
virtual void dump(std::ostream &s=std::cout) const
Definition:
IonexHeader.cpp:127
gnsstk::IonexHeader::auxData
std::string auxData
Type of auxiliar data (optional)
Definition:
IonexHeader.hpp:226
gnsstk::IonexHeader::startAuxDataString
static const GNSSTK_EXPORT std::string startAuxDataString
"START OF AUX DATA"
Definition:
IonexHeader.hpp:126
gnsstk
For Sinex::InputHistory.
Definition:
BasicFramework.cpp:50
gnsstk::IonexHeader::IonexHeader
IonexHeader()
Default constructor.
Definition:
IonexHeader.cpp:86
gnsstk::IonexHeader::~IonexHeader
virtual ~IonexHeader()
Destructor.
Definition:
IonexHeader.cpp:93
gnsstk::IonexHeader::fileAgency
std::string fileAgency
Name of agency creating this file.
Definition:
IonexHeader.hpp:196
gnsstk::IonexHeader::isHeader
virtual bool isHeader() const
Definition:
IonexHeader.hpp:246
gnsstk::IonexHeader::mapDimensionString
static const GNSSTK_EXPORT std::string mapDimensionString
"MAP DIMENSION"
Definition:
IonexHeader.hpp:116
gnsstk::IonexHeader::firstTimeString
static const GNSSTK_EXPORT std::string firstTimeString
"EPOCH OF FIRST MAP"
Definition:
IonexHeader.hpp:96
gnsstk::IonexHeader::StaDCBMap
std::map< std::string, DCB > StaDCBMap
The key to this map is the marker name of the station.
Definition:
IonexHeader.hpp:231
gnsstk::IonexHeader::parseDcbRecord
void parseDcbRecord(const std::string &line)
Definition:
IonexHeader.cpp:166
gnsstk::IonexHeader::auxDataFlag
bool auxDataFlag
Flag to monitor the sequence of auxiliar data.
Definition:
IonexHeader.hpp:235
gnsstk::IonexHeader::numMaps
size_t numMaps
Total number of TEC/RMS/HGT maps.
Definition:
IonexHeader.hpp:206
gnsstk::CommonTime
Definition:
CommonTime.hpp:84
gnsstk::IonexHeader::firstEpoch
CommonTime firstEpoch
Epoch of first map.
Definition:
IonexHeader.hpp:202
gnsstk::IonexHeader::lonGridString
static const GNSSTK_EXPORT std::string lonGridString
"LON1 / LON2 / DLON"
Definition:
IonexHeader.hpp:122
gnsstk::IonexHeader::DCB::system
char system
Definition:
IonexHeader.hpp:139
gnsstk::IonexHeader::hgt
double hgt[3]
Definition:
IonexHeader.hpp:217
gnsstk::IonexHeader::numSVs
size_t numSVs
Number of contributing satellites (opt)
Definition:
IonexHeader.hpp:212
gnsstk::IonexHeader::baseRadius
double baseRadius
Mean earth radius, or bottom of height grid (km)
Definition:
IonexHeader.hpp:214
gnsstk::IonexHeader::lat
double lat[3]
Definition:
IonexHeader.hpp:220
gnsstk::IonexHeader::writeHeaderRecords
void writeHeaderRecords(FFStream &s) const
Definition:
IonexHeader.cpp:515
gnsstk::IonexHeader::numMapsString
static const GNSSTK_EXPORT std::string numMapsString
"# OF MAPS IN FILE"
Definition:
IonexHeader.hpp:102
gnsstk::IonexHeader::versionString
static const GNSSTK_EXPORT std::string versionString
"IONEXVERSION / TYPE"
Definition:
IonexHeader.hpp:88
gnsstk::IonexHeader::elevationString
static const GNSSTK_EXPORT std::string elevationString
"ELEVATION CUTOFF"
Definition:
IonexHeader.hpp:106
gnsstk::IonexHeader::commentList
std::vector< std::string > commentList
Comments in header(optional)
Definition:
IonexHeader.hpp:200
gnsstk::IonexHeader::DCB::name
std::string name
Marker name (4 characters)
Definition:
IonexHeader.hpp:146
gnsstk::IonexHeader::fileType
std::string fileType
IONEX filetype ('I' for Ionoshere Maps)
Definition:
IonexHeader.hpp:193
gnsstk::IonexHeader::runByString
static const GNSSTK_EXPORT std::string runByString
"PGM / RUN BY / DATE"
Definition:
IonexHeader.hpp:90
gnsstk::IonexHeader::valid
bool valid
return code, Am I valid?
Definition:
IonexHeader.hpp:238
gnsstk::IonexHeader::numStations
size_t numStations
Number of contributing stations (optional)
Definition:
IonexHeader.hpp:211
gnsstk::IonexHeader::numStationsString
static const GNSSTK_EXPORT std::string numStationsString
"# OF STATIONS"
Definition:
IonexHeader.hpp:110
CommonTime.hpp
gnsstk::IonexHeader::SatDCBMap
std::map< SatID, DCB > SatDCBMap
The key to this map is the svid of the satellite (usually the prn)
Definition:
IonexHeader.hpp:229
gnsstk::IonexHeader::DCB::rms
double rms
RMS error of DCB in nanoseconds.
Definition:
IonexHeader.hpp:144
gnsstk::IonexHeader::DCB
Definition:
IonexHeader.hpp:134
gnsstk::IonexHeader::DCB::bias
double bias
differential (L1-L2) code bias in nanoseconds
Definition:
IonexHeader.hpp:143
gnsstk::IonexHeader::parseTime
CommonTime parseTime(const std::string &line) const
Definition:
IonexHeader.cpp:760
gnsstk::IonexHeader::DCB::stationsAuxDataString
static const GNSSTK_EXPORT std::string stationsAuxDataString
"STATION/BIAS/RMS"
Definition:
IonexHeader.hpp:179
gnsstk::IonexHeader::parseHeaderRecord
void parseHeaderRecord(const std::string &line)
Definition:
IonexHeader.cpp:243
gnsstk::IonexHeader::exponent
int exponent
Exponent defining the unit of the values (optional)
Definition:
IonexHeader.hpp:225
gnsstk::IonexHeader::DCB::prn
int prn
2-digit satellite identifier (pseudo random number)
Definition:
IonexHeader.hpp:142
gnsstk::IonexHeader::lastTimeString
static const GNSSTK_EXPORT std::string lastTimeString
"EPOCH OF LAST MAP"
Definition:
IonexHeader.hpp:98
gnsstk::IonexHeader::DCB::number
std::string number
Marker number (15 characters)
Definition:
IonexHeader.hpp:147
gnsstk::IonexHeader::reallyPutRecord
void reallyPutRecord(FFStream &s) const override
Definition:
IonexHeader.cpp:487
gnsstk::IonexHeader::clear
void clear()
Clear (empty out) header.
Definition:
IonexHeader.cpp:100
gnsstk::IonexHeader::descriptionList
std::vector< std::string > descriptionList
Descriptions in header (opt)
Definition:
IonexHeader.hpp:199
gnsstk::IonexHeader::mapDims
size_t mapDims
Dimension of maps (2 or 3)
Definition:
IonexHeader.hpp:215
gnsstk::IonexHeader::endAuxDataString
static const GNSSTK_EXPORT std::string endAuxDataString
"END OF AUX DATA"
Definition:
IonexHeader.hpp:128
gnsstk::IonexHeader::endOfHeader
static const GNSSTK_EXPORT std::string endOfHeader
"END OF HEADER"
Definition:
IonexHeader.hpp:130
gnsstk::IonexHeader::DCB::toString
std::string toString() const
convert DCB structure to a string
Definition:
IonexHeader.cpp:820
gnsstk::IonexHeader::numSatsString
static const GNSSTK_EXPORT std::string numSatsString
"# OF SATELLITES"
Definition:
IonexHeader.hpp:112
gnsstk::IonexHeader::mappingFunction
std::string mappingFunction
Mapping function adopted.
Definition:
IonexHeader.hpp:207
gnsstk::IonexHeader::DCB::isPRN
bool isPRN
True if a PRN / BIAS / RMS block, false if STATION.
Definition:
IonexHeader.hpp:145
gnsstk::IonexHeader::fileProgram
std::string fileProgram
Name of program creating this file.
Definition:
IonexHeader.hpp:195
gnsstk::IonexHeader::hgtGridString
static const GNSSTK_EXPORT std::string hgtGridString
"HGT1 / HGT2 / DHGT"
Definition:
IonexHeader.hpp:118
gnsstk::IonexBase
Definition:
IonexBase.hpp:59
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39