Classes | Public Member Functions | List of all members
gnsstk::IonexHeader Class Reference

Detailed Description

This class models the header for a IONEX file

See also
gnsstk::IonexData and IonexStream
main_ionex_test.cpp for an example

Definition at line 70 of file IonexHeader.hpp.

#include <IonexHeader.hpp>

Inheritance diagram for gnsstk::IonexHeader:
Inheritance graph
[legend]

Classes

struct  DCB
 

Public Member Functions

void clear ()
 Clear (empty out) header. More...
 
 IonexHeader ()
 Default constructor. More...
 
- Public Member Functions inherited from gnsstk::IonexBase
virtual ~IonexBase ()
 Destructor per the coding standards. More...
 
- Public Member Functions inherited from gnsstk::FFData
void getRecord (FFStream &s)
 
virtual bool isData () const
 
void putRecord (FFStream &s) const
 
virtual ~FFData (void)
 virtual desctuctor More...
 

Static Public Attributes

IonexHeaderFormatStrings

IONEX Header Formatting Strings

static const GNSSTK_EXPORT std::string versionString = "IONEX VERSION / TYPE"
 "IONEXVERSION / TYPE" More...
 
static const GNSSTK_EXPORT std::string runByString = "PGM / RUN BY / DATE"
 "PGM / RUN BY / DATE" More...
 
static const GNSSTK_EXPORT std::string descriptionString = "DESCRIPTION"
 "DESCRIPTION" More...
 
static const GNSSTK_EXPORT std::string commentString = "COMMENT"
 "COMMENT" More...
 
static const GNSSTK_EXPORT std::string firstTimeString = "EPOCH OF FIRST MAP"
 "EPOCH OF FIRST MAP" More...
 
static const GNSSTK_EXPORT std::string lastTimeString = "EPOCH OF LAST MAP"
 "EPOCH OF LAST MAP" More...
 
static const GNSSTK_EXPORT std::string intervalString = "INTERVAL"
 "INTERVAL" More...
 
static const GNSSTK_EXPORT std::string numMapsString = "# OF MAPS IN FILE"
 "# OF MAPS IN FILE" More...
 
static const GNSSTK_EXPORT std::string mappingFunctionString = "MAPPING FUNCTION"
 "MAPPING FUNCTION" More...
 
static const GNSSTK_EXPORT std::string elevationString = "ELEVATION CUTOFF"
 "ELEVATION CUTOFF" More...
 
static const GNSSTK_EXPORT std::string observablesUsedString = "OBSERVABLES USED"
 "OBSERVABLES USED" More...
 
static const GNSSTK_EXPORT std::string numStationsString = "# OF STATIONS"
 "# OF STATIONS" More...
 
static const GNSSTK_EXPORT std::string numSatsString = "# OF SATELLITES"
 "# OF SATELLITES" More...
 
static const GNSSTK_EXPORT std::string baseRadiusString = "BASE RADIUS"
 "BASE RADIUS" More...
 
static const GNSSTK_EXPORT std::string mapDimensionString = "MAP DIMENSION"
 "MAP DIMENSION" More...
 
static const GNSSTK_EXPORT std::string hgtGridString = "HGT1 / HGT2 / DHGT"
 "HGT1 / HGT2 / DHGT" More...
 
static const GNSSTK_EXPORT std::string latGridString = "LAT1 / LAT2 / DLAT"
 "LAT1 / LAT2 / DLAT" More...
 
static const GNSSTK_EXPORT std::string lonGridString = "LON1 / LON2 / DLON"
 "LON1 / LON2 / DLON" More...
 
static const GNSSTK_EXPORT std::string exponentString = "EXPONENT"
 "EXPONENT" More...
 
static const GNSSTK_EXPORT std::string startAuxDataString = "START OF AUX DATA"
 "START OF AUX DATA" More...
 
static const GNSSTK_EXPORT std::string endAuxDataString = "END OF AUX DATA"
 "END OF AUX DATA" More...
 
static const GNSSTK_EXPORT std::string endOfHeader = "END OF HEADER"
 "END OF HEADER" More...
 

IonexHeaderValues

typedef std::map< SatID, DCBSatDCBMap
 The key to this map is the svid of the satellite (usually the prn) More...
 
typedef std::map< std::string, DCBStaDCBMap
 The key to this map is the marker name of the station. More...
 
double version
 IONEX version. More...
 
std::string fileType
 IONEX filetype ('I' for Ionoshere Maps) More...
 
std::string system
 Satellite system or theoretical model. More...
 
std::string fileProgram
 Name of program creating this file. More...
 
std::string fileAgency
 Name of agency creating this file. More...
 
std::string date
 Date and time of file creation. More...
 
std::vector< std::string > descriptionList
 Descriptions in header (opt) More...
 
std::vector< std::string > commentList
 Comments in header(optional) More...
 
CommonTime firstEpoch
 Epoch of first map. More...
 
CommonTime lastEpoch
 Epoch of last map. More...
 
int interval
 Time interval between maps (seconds) More...
 
size_t numMaps
 Total number of TEC/RMS/HGT maps. More...
 
std::string mappingFunction
 Mapping function adopted. More...
 
double elevation
 Minimum elevation angle, in degrees. More...
 
std::string observablesUsed
 One-line specification of used obs. More...
 
size_t numStations
 Number of contributing stations (optional) More...
 
size_t numSVs
 Number of contributing satellites (opt) More...
 
double baseRadius
 Mean earth radius, or bottom of height grid (km) More...
 
size_t mapDims
 Dimension of maps (2 or 3) More...
 
double hgt [3]
 
double lat [3]
 
double lon [3]
 
int exponent
 Exponent defining the unit of the values (optional) More...
 
std::string auxData
 Type of auxiliar data (optional) More...
 
SatDCBMap svsmap
 Map of satellites' DCBs (in nanoseconds) More...
 
StaDCBMap stamap
 Map of stations' DCBs (in nanoseconds) More...
 
bool auxDataFlag
 Flag to monitor the sequence of auxiliar data. More...
 
bool valid
 return code, Am I valid? More...
 
virtual ~IonexHeader ()
 Destructor. More...
 
virtual bool isHeader () const
 
virtual void dump (std::ostream &s=std::cout) const
 
void parseDcbRecord (const std::string &line)
 
void parseHeaderRecord (const std::string &line)
 
void writeHeaderRecords (FFStream &s) const
 
void reallyPutRecord (FFStream &s) const override
 
void reallyGetRecord (FFStream &s) override
 
std::string writeTime (const CommonTime &dt) const
 
CommonTime parseTime (const std::string &line) const
 

Additional Inherited Members

Member Typedef Documentation

◆ SatDCBMap

The key to this map is the svid of the satellite (usually the prn)

Definition at line 229 of file IonexHeader.hpp.

◆ StaDCBMap

typedef std::map<std::string,DCB> gnsstk::IonexHeader::StaDCBMap

The key to this map is the marker name of the station.

Definition at line 231 of file IonexHeader.hpp.

Constructor & Destructor Documentation

◆ IonexHeader()

gnsstk::IonexHeader::IonexHeader ( )

Default constructor.

Definition at line 86 of file IonexHeader.cpp.

◆ ~IonexHeader()

gnsstk::IonexHeader::~IonexHeader ( )
virtual

Destructor.

Definition at line 93 of file IonexHeader.cpp.

Member Function Documentation

◆ clear()

void gnsstk::IonexHeader::clear ( )

Clear (empty out) header.

Definition at line 100 of file IonexHeader.cpp.

◆ dump()

void gnsstk::IonexHeader::dump ( std::ostream &  s = std::cout) const
virtual

Simple debug output function.

It simply outputs the version, name and number of maps contained in this Ionex header.

Reimplemented from gnsstk::FFData.

Definition at line 127 of file IonexHeader.cpp.

◆ isHeader()

virtual bool gnsstk::IonexHeader::isHeader ( ) const
inlinevirtual

Returns whether or not this class is a header. Have your overriding function return the correct value.

Reimplemented from gnsstk::FFData.

Definition at line 246 of file IonexHeader.hpp.

◆ parseDcbRecord()

void gnsstk::IonexHeader::parseDcbRecord ( const std::string &  line)

Parse a single auxiliary header record that contains "Differential code biases".

Exceptions
FFStreamError
Warning
The length of the number and the start position of the bias is just a guess since I can't find an Ionex 1.0 document and the 1.1 threw out all the DCB information

Definition at line 166 of file IonexHeader.cpp.

◆ parseHeaderRecord()

void gnsstk::IonexHeader::parseHeaderRecord ( const std::string &  line)

Parse a single header record, and modify 'valid' accordingly.

Used by reallyGetRecord for both IonexHeader and IonexData.

Exceptions
FFStreamError

Definition at line 243 of file IonexHeader.cpp.

◆ parseTime()

CommonTime gnsstk::IonexHeader::parseTime ( const std::string &  line) const
private

This function sets the time for this header.

It looks at line to obtain the needed information.

Definition at line 760 of file IonexHeader.cpp.

◆ reallyGetRecord()

void gnsstk::IonexHeader::reallyGetRecord ( FFStream s)
overrideprotectedvirtual

This function retrieves the IONEX header from the given FFStream.

If an stream error is encountered, the stream is reset to its original position and its fail-bit is set.

Exceptions
std::exception
StringExceptionwhen a StringUtilis function fails
FFStreamErrorwhen exceptions (failbit) is set and a read or formatting error occurs. This also resets the stream to its pre-read position.

Implements gnsstk::FFData.

Definition at line 356 of file IonexHeader.cpp.

◆ reallyPutRecord()

void gnsstk::IonexHeader::reallyPutRecord ( FFStream s) const
overrideprotectedvirtual

Writes the record formatted to the FFStream s.

Exceptions
std::exception
FFStreamError
StringExceptionwhen a StringUtils function fails

Implements gnsstk::FFData.

Definition at line 487 of file IonexHeader.cpp.

◆ writeHeaderRecords()

void gnsstk::IonexHeader::writeHeaderRecords ( FFStream s) const

Write all valid header records to the given stream. Used by reallyPutRecord for both IonexHeader and IonexData.

Exceptions
FFStreamError
StringUtils::StringException

Definition at line 515 of file IonexHeader.cpp.

◆ writeTime()

string gnsstk::IonexHeader::writeTime ( const CommonTime dt) const
private

Converts the CommonTime dt into a Ionex Obs time string for the header

Definition at line 779 of file IonexHeader.cpp.

Member Data Documentation

◆ auxData

std::string gnsstk::IonexHeader::auxData

Type of auxiliar data (optional)

Definition at line 226 of file IonexHeader.hpp.

◆ auxDataFlag

bool gnsstk::IonexHeader::auxDataFlag

Flag to monitor the sequence of auxiliar data.

Definition at line 235 of file IonexHeader.hpp.

◆ baseRadius

double gnsstk::IonexHeader::baseRadius

Mean earth radius, or bottom of height grid (km)

Definition at line 214 of file IonexHeader.hpp.

◆ baseRadiusString

const string gnsstk::IonexHeader::baseRadiusString = "BASE RADIUS"
static

"BASE RADIUS"

Definition at line 114 of file IonexHeader.hpp.

◆ commentList

std::vector<std::string> gnsstk::IonexHeader::commentList

Comments in header(optional)

Definition at line 200 of file IonexHeader.hpp.

◆ commentString

const string gnsstk::IonexHeader::commentString = "COMMENT"
static

"COMMENT"

Definition at line 94 of file IonexHeader.hpp.

◆ date

std::string gnsstk::IonexHeader::date

Date and time of file creation.

Definition at line 197 of file IonexHeader.hpp.

◆ descriptionList

std::vector<std::string> gnsstk::IonexHeader::descriptionList

Descriptions in header (opt)

Definition at line 199 of file IonexHeader.hpp.

◆ descriptionString

const string gnsstk::IonexHeader::descriptionString = "DESCRIPTION"
static

"DESCRIPTION"

Definition at line 92 of file IonexHeader.hpp.

◆ elevation

double gnsstk::IonexHeader::elevation

Minimum elevation angle, in degrees.

Definition at line 208 of file IonexHeader.hpp.

◆ elevationString

const string gnsstk::IonexHeader::elevationString = "ELEVATION CUTOFF"
static

"ELEVATION CUTOFF"

Definition at line 106 of file IonexHeader.hpp.

◆ endAuxDataString

const string gnsstk::IonexHeader::endAuxDataString = "END OF AUX DATA"
static

"END OF AUX DATA"

Definition at line 128 of file IonexHeader.hpp.

◆ endOfHeader

const string gnsstk::IonexHeader::endOfHeader = "END OF HEADER"
static

"END OF HEADER"

Definition at line 130 of file IonexHeader.hpp.

◆ exponent

int gnsstk::IonexHeader::exponent

Exponent defining the unit of the values (optional)

Definition at line 225 of file IonexHeader.hpp.

◆ exponentString

const string gnsstk::IonexHeader::exponentString = "EXPONENT"
static

"EXPONENT"

Definition at line 124 of file IonexHeader.hpp.

◆ fileAgency

std::string gnsstk::IonexHeader::fileAgency

Name of agency creating this file.

Definition at line 196 of file IonexHeader.hpp.

◆ fileProgram

std::string gnsstk::IonexHeader::fileProgram

Name of program creating this file.

Definition at line 195 of file IonexHeader.hpp.

◆ fileType

std::string gnsstk::IonexHeader::fileType

IONEX filetype ('I' for Ionoshere Maps)

Definition at line 193 of file IonexHeader.hpp.

◆ firstEpoch

CommonTime gnsstk::IonexHeader::firstEpoch

Epoch of first map.

Definition at line 202 of file IonexHeader.hpp.

◆ firstTimeString

const string gnsstk::IonexHeader::firstTimeString = "EPOCH OF FIRST MAP"
static

"EPOCH OF FIRST MAP"

Definition at line 96 of file IonexHeader.hpp.

◆ hgt

double gnsstk::IonexHeader::hgt[3]

Definition of an equidistant grid in height. 'hgt[0]' to 'hgt[1]' with increment 'hgt[2]' in km. For 2-dimensional maps hgt[0]=hgt[1] and hgt[2]=0.

Definition at line 217 of file IonexHeader.hpp.

◆ hgtGridString

const string gnsstk::IonexHeader::hgtGridString = "HGT1 / HGT2 / DHGT"
static

"HGT1 / HGT2 / DHGT"

Definition at line 118 of file IonexHeader.hpp.

◆ interval

int gnsstk::IonexHeader::interval

Time interval between maps (seconds)

Definition at line 205 of file IonexHeader.hpp.

◆ intervalString

const string gnsstk::IonexHeader::intervalString = "INTERVAL"
static

"INTERVAL"

Definition at line 100 of file IonexHeader.hpp.

◆ lastEpoch

CommonTime gnsstk::IonexHeader::lastEpoch

Epoch of last map.

Definition at line 203 of file IonexHeader.hpp.

◆ lastTimeString

const string gnsstk::IonexHeader::lastTimeString = "EPOCH OF LAST MAP"
static

"EPOCH OF LAST MAP"

Definition at line 98 of file IonexHeader.hpp.

◆ lat

double gnsstk::IonexHeader::lat[3]

Definition of the grid in latitude. 'lat[0]' to 'lat[1]' with increment 'hgt[2]' in deg.

Definition at line 220 of file IonexHeader.hpp.

◆ latGridString

const string gnsstk::IonexHeader::latGridString = "LAT1 / LAT2 / DLAT"
static

"LAT1 / LAT2 / DLAT"

Definition at line 120 of file IonexHeader.hpp.

◆ lon

double gnsstk::IonexHeader::lon[3]

Definition of the grid in longitude. 'lon[0]' to 'lon[1]' with increment 'hon[2]' in deg.

Definition at line 222 of file IonexHeader.hpp.

◆ lonGridString

const string gnsstk::IonexHeader::lonGridString = "LON1 / LON2 / DLON"
static

"LON1 / LON2 / DLON"

Definition at line 122 of file IonexHeader.hpp.

◆ mapDimensionString

const string gnsstk::IonexHeader::mapDimensionString = "MAP DIMENSION"
static

"MAP DIMENSION"

Definition at line 116 of file IonexHeader.hpp.

◆ mapDims

size_t gnsstk::IonexHeader::mapDims

Dimension of maps (2 or 3)

Definition at line 215 of file IonexHeader.hpp.

◆ mappingFunction

std::string gnsstk::IonexHeader::mappingFunction

Mapping function adopted.

Definition at line 207 of file IonexHeader.hpp.

◆ mappingFunctionString

const string gnsstk::IonexHeader::mappingFunctionString = "MAPPING FUNCTION"
static

"MAPPING FUNCTION"

Definition at line 104 of file IonexHeader.hpp.

◆ numMaps

size_t gnsstk::IonexHeader::numMaps

Total number of TEC/RMS/HGT maps.

Definition at line 206 of file IonexHeader.hpp.

◆ numMapsString

const string gnsstk::IonexHeader::numMapsString = "# OF MAPS IN FILE"
static

"# OF MAPS IN FILE"

Definition at line 102 of file IonexHeader.hpp.

◆ numSatsString

const string gnsstk::IonexHeader::numSatsString = "# OF SATELLITES"
static

"# OF SATELLITES"

Definition at line 112 of file IonexHeader.hpp.

◆ numStations

size_t gnsstk::IonexHeader::numStations

Number of contributing stations (optional)

Definition at line 211 of file IonexHeader.hpp.

◆ numStationsString

const string gnsstk::IonexHeader::numStationsString = "# OF STATIONS"
static

"# OF STATIONS"

Definition at line 110 of file IonexHeader.hpp.

◆ numSVs

size_t gnsstk::IonexHeader::numSVs

Number of contributing satellites (opt)

Definition at line 212 of file IonexHeader.hpp.

◆ observablesUsed

std::string gnsstk::IonexHeader::observablesUsed

One-line specification of used obs.

Definition at line 209 of file IonexHeader.hpp.

◆ observablesUsedString

const string gnsstk::IonexHeader::observablesUsedString = "OBSERVABLES USED"
static

"OBSERVABLES USED"

Definition at line 108 of file IonexHeader.hpp.

◆ runByString

const string gnsstk::IonexHeader::runByString = "PGM / RUN BY / DATE"
static

"PGM / RUN BY / DATE"

Definition at line 90 of file IonexHeader.hpp.

◆ stamap

StaDCBMap gnsstk::IonexHeader::stamap

Map of stations' DCBs (in nanoseconds)

Definition at line 234 of file IonexHeader.hpp.

◆ startAuxDataString

const string gnsstk::IonexHeader::startAuxDataString = "START OF AUX DATA"
static

"START OF AUX DATA"

Definition at line 126 of file IonexHeader.hpp.

◆ svsmap

SatDCBMap gnsstk::IonexHeader::svsmap

Map of satellites' DCBs (in nanoseconds)

Definition at line 233 of file IonexHeader.hpp.

◆ system

std::string gnsstk::IonexHeader::system

Satellite system or theoretical model.

Definition at line 194 of file IonexHeader.hpp.

◆ valid

bool gnsstk::IonexHeader::valid

return code, Am I valid?

Definition at line 238 of file IonexHeader.hpp.

◆ version

double gnsstk::IonexHeader::version

IONEX version.

Definition at line 191 of file IonexHeader.hpp.

◆ versionString

const string gnsstk::IonexHeader::versionString = "IONEX VERSION / TYPE"
static

"IONEXVERSION / TYPE"

Definition at line 88 of file IonexHeader.hpp.


The documentation for this class was generated from the following files:


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