Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
gnsstk::RinexMetHeader Class Reference

Detailed Description

This class models the RINEX MET header for a RINEX MET file. When writing data, this class determines what data gets written from a RinexMetData object to the RinexMetStream.

See also
rinex_met_read_write.cpp for an example.
rinex_met_test.cpp for an example.
RinexMetHeader::obsTypeList for writing files.
RinexMetData and RinexMetStream.

Definition at line 70 of file RinexMetHeader.hpp.

#include <RinexMetHeader.hpp>

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

Classes

struct  sensorPosType
 Struct for holding info about a sensor position. More...
 
struct  sensorType
 Struct for holding information about a sensor. More...
 

Public Types

enum  RinexMetType {
  PR, TD, HR, ZW,
  ZD, ZT, WD, WS,
  RI, HI
}
 Enum for the different types of data in this file. More...
 
enum  validBits {
  validVersion = 0x01, validRunBy = 0x02, validComment = 0x04, validMarkerName = 0x08,
  validMarkerNumber = 0x010, validObsType = 0x020, validSensorType = 0x040, validSensorPos = 0x080,
  validEoH = 0x080000000, allValid20 = 0x0800000EB, allValid21 = 0x0800000EB, allValid211 = 0x0800000EB
}
 These are validity bits used in checking the RINEX MET header. More...
 

Public Member Functions

bool compare (const RinexMetHeader &right, std::vector< std::string > &diffs, const std::vector< std::string > &inclExclList, bool incl=false)
 
virtual void dump (std::ostream &s) const
 A debug function that outputs the header to s. More...
 
virtual bool isHeader (void) const
 RinexMetHeader is a "header" so this function always returns true. More...
 
 RinexMetHeader ()
 Constructor. More...
 
virtual ~RinexMetHeader ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::RinexMetBase
virtual ~RinexMetBase ()
 Destructor. 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 Member Functions

static std::string bitsAsString (validBits b)
 
static std::string bitString (unsigned long vb, char quote='\"', std::string sep=", ")
 
static std::string convertObsType (const RinexMetType &oneObs)
 
static RinexMetType convertObsType (const std::string &oneObs)
 

Public Attributes

std::vector< std::string > commentList
 A list of comments. More...
 
std::string date
 When the file was written. More...
 
std::string fileAgency
 The group who generated it. More...
 
std::string fileProgram
 The program that generated it. More...
 
std::string fileType
 The type of file it is. More...
 
std::string markerName
 The name of the location. More...
 
std::string markerNumber
 The number of the location. More...
 
std::vector< RinexMetTypeobsTypeList
 
std::vector< sensorPosTypesensorPosList
 A list of sensor positions used in the file. More...
 
std::vector< sensorTypesensorTypeList
 A list of sensors used in the file. More...
 
unsigned long valid
 Tell me, Am I valid? More...
 
double version
 RINEX Version. More...
 

Static Public Attributes

static const GNSSTK_EXPORT int maxObsPerLine = 9
 Holds the max records per line. More...
 
static const GNSSTK_EXPORT std::string stringComment = "COMMENT"
 "COMMENT" More...
 
static const GNSSTK_EXPORT std::string stringEoH = "END OF HEADER"
 "END OF HEADER" More...
 
static const GNSSTK_EXPORT std::string stringMarkerName = "MARKER NAME"
 "MARKER NAME" More...
 
static const GNSSTK_EXPORT std::string stringMarkerNumber = "MARKER NUMBER"
 "MARKER NUMBER" More...
 
static const GNSSTK_EXPORT std::string stringObsType = "# / TYPES OF OBSERV"
 "# / TYPES OF OBSERV" More...
 
static const GNSSTK_EXPORT std::string stringRunBy = "PGM / RUN BY / DATE"
 "PGM / RUN BY / DATE" More...
 
static const GNSSTK_EXPORT std::string stringSensorPos = "SENSOR POS XYZ/H"
 "SENSOR POS XYZ/H" More...
 
static const GNSSTK_EXPORT std::string stringSensorType = "SENSOR MOD/TYPE/ACC"
 "SENSOR MOD/TYPE/ACC" More...
 
static const GNSSTK_EXPORT std::string stringVersion = "RINEX VERSION / TYPE"
 "RINEX VERSION / TYPE" More...
 

Protected Member Functions

virtual void reallyGetRecord (FFStream &s)
 
virtual void reallyPutRecord (FFStream &s) const
 

Member Enumeration Documentation

◆ RinexMetType

Enum for the different types of data in this file.

Enumerator
PR 

Pressure (mbar)

TD 

Dry temperature (deg C)

HR 

Relative humidity (percent)

ZW 

Wet zenith path delay (mm)

ZD 

Dry component of zenith path delay (mm)

ZT 

Total zenith path delay (mm)

WD 

Wind azmiuth from where the wind blows (deg)

WS 

Wind speed (m/s)

RI 

"Rain increment": Rain accumulation since last measurement (1/10 mm)

HI 

Hail indicator non-zero: Hail detected since last mesaurement.

Definition at line 81 of file RinexMetHeader.hpp.

◆ validBits

These are validity bits used in checking the RINEX MET header.

Enumerator
validVersion 

Set if the RINEX version is valid.

validRunBy 

Set if the Run-by value is valid.

validComment 

Set if the comments are valid. Very subjective...

validMarkerName 

Set if the Marker Name is valid.

validMarkerNumber 

Set if the Marker Number is valid.

validObsType 

Set if Num/Types of Obs is valid.

validSensorType 

Set if Sensor Mod/Type/Acc is valid.

validSensorPos 

Set if Sensor position is valid.

validEoH 

Set if the end of header is valid.

allValid20 

This bitset checks that all required header items are available for a Rinex2.0 file.

allValid21 

This bitset checks that all required header items are available for a Rinex2.1 file.

allValid211 

This bitset checks that all required header items are available for a Rinex2.11 file.

Definition at line 122 of file RinexMetHeader.hpp.

Constructor & Destructor Documentation

◆ RinexMetHeader()

gnsstk::RinexMetHeader::RinexMetHeader ( )
inline

Constructor.

Definition at line 96 of file RinexMetHeader.hpp.

◆ ~RinexMetHeader()

virtual gnsstk::RinexMetHeader::~RinexMetHeader ( )
inlinevirtual

Destructor.

Definition at line 99 of file RinexMetHeader.hpp.

Member Function Documentation

◆ bitsAsString()

static std::string gnsstk::RinexMetHeader::bitsAsString ( validBits  b)
inlinestatic

Definition at line 146 of file RinexMetHeader.hpp.

◆ bitString()

std::string gnsstk::RinexMetHeader::bitString ( unsigned long  vb,
char  quote = '\"',
std::string  sep = ", " 
)
static

Definition at line 71 of file RinexMetHeader.cpp.

◆ compare()

bool gnsstk::RinexMetHeader::compare ( const RinexMetHeader right,
std::vector< std::string > &  diffs,
const std::vector< std::string > &  inclExclList,
bool  incl = false 
)

Compare this header with another.

Parameters
rightthe header to compare this with.
inclExclLista list of header strings to be ignored or used when making the comparison (e.g. "RINEX VERSION / TYPE").
inclWhen true, only header lines listed in inclExclList will be compared. When false, differences in header lines in inclExclList will be ignored.

Definition at line 503 of file RinexMetHeader.cpp.

◆ convertObsType() [1/2]

string gnsstk::RinexMetHeader::convertObsType ( const RinexMetType oneObs)
static

Converts a RinexMetType to its string equivalent.

Exceptions
FFStreamError

Definition at line 483 of file RinexMetHeader.cpp.

◆ convertObsType() [2/2]

RinexMetHeader::RinexMetType gnsstk::RinexMetHeader::convertObsType ( const std::string &  oneObs)
static

sets the obs type array given an obs type line

Exceptions
FFStreamError

Definition at line 464 of file RinexMetHeader.cpp.

◆ dump()

void gnsstk::RinexMetHeader::dump ( std::ostream &  s) const
virtual

A debug function that outputs the header to s.

Reimplemented from gnsstk::FFData.

Definition at line 446 of file RinexMetHeader.cpp.

◆ isHeader()

virtual bool gnsstk::RinexMetHeader::isHeader ( void  ) const
inlinevirtual

RinexMetHeader is a "header" so this function always returns true.

Reimplemented from gnsstk::FFData.

Definition at line 103 of file RinexMetHeader.hpp.

◆ reallyGetRecord()

void gnsstk::RinexMetHeader::reallyGetRecord ( FFStream s)
protectedvirtual

This function reads the RINEX MET header from the given FFStream. If an error is encountered in reading from the stream, the stream is reset to its original position and its fail-bit is set.

Exceptions
std::exception
StringExceptionwhen a StringUtils 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 257 of file RinexMetHeader.cpp.

◆ reallyPutRecord()

void gnsstk::RinexMetHeader::reallyPutRecord ( FFStream s) const
protectedvirtual

Writes the RINEX Met header to the stream s.

Exceptions
std::exception
FFStreamError
StringUtils::StringException

This is the R3.0 version standard.

Implements gnsstk::FFData.

Definition at line 92 of file RinexMetHeader.cpp.

Member Data Documentation

◆ commentList

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

A list of comments.

Definition at line 203 of file RinexMetHeader.hpp.

◆ date

std::string gnsstk::RinexMetHeader::date

When the file was written.

Definition at line 202 of file RinexMetHeader.hpp.

◆ fileAgency

std::string gnsstk::RinexMetHeader::fileAgency

The group who generated it.

Definition at line 201 of file RinexMetHeader.hpp.

◆ fileProgram

std::string gnsstk::RinexMetHeader::fileProgram

The program that generated it.

Definition at line 200 of file RinexMetHeader.hpp.

◆ fileType

std::string gnsstk::RinexMetHeader::fileType

The type of file it is.

Definition at line 199 of file RinexMetHeader.hpp.

◆ markerName

std::string gnsstk::RinexMetHeader::markerName

The name of the location.

Definition at line 204 of file RinexMetHeader.hpp.

◆ markerNumber

std::string gnsstk::RinexMetHeader::markerNumber

The number of the location.

Definition at line 205 of file RinexMetHeader.hpp.

◆ maxObsPerLine

const int gnsstk::RinexMetHeader::maxObsPerLine = 9
static

Holds the max records per line.

Definition at line 218 of file RinexMetHeader.hpp.

◆ obsTypeList

std::vector<RinexMetType> gnsstk::RinexMetHeader::obsTypeList

A list of obs types in the file.

Warning
This variable determines what data gets written to an output RinexObsStream. Set this with the RinexMetTypes that you want written to the file.

Definition at line 213 of file RinexMetHeader.hpp.

◆ sensorPosList

std::vector<sensorPosType> gnsstk::RinexMetHeader::sensorPosList

A list of sensor positions used in the file.

Definition at line 215 of file RinexMetHeader.hpp.

◆ sensorTypeList

std::vector<sensorType> gnsstk::RinexMetHeader::sensorTypeList

A list of sensors used in the file.

Definition at line 214 of file RinexMetHeader.hpp.

◆ stringComment

const string gnsstk::RinexMetHeader::stringComment = "COMMENT"
static

"COMMENT"

Definition at line 225 of file RinexMetHeader.hpp.

◆ stringEoH

const string gnsstk::RinexMetHeader::stringEoH = "END OF HEADER"
static

"END OF HEADER"

Definition at line 237 of file RinexMetHeader.hpp.

◆ stringMarkerName

const string gnsstk::RinexMetHeader::stringMarkerName = "MARKER NAME"
static

"MARKER NAME"

Definition at line 227 of file RinexMetHeader.hpp.

◆ stringMarkerNumber

const string gnsstk::RinexMetHeader::stringMarkerNumber = "MARKER NUMBER"
static

"MARKER NUMBER"

Definition at line 229 of file RinexMetHeader.hpp.

◆ stringObsType

const string gnsstk::RinexMetHeader::stringObsType = "# / TYPES OF OBSERV"
static

"# / TYPES OF OBSERV"

Definition at line 231 of file RinexMetHeader.hpp.

◆ stringRunBy

const string gnsstk::RinexMetHeader::stringRunBy = "PGM / RUN BY / DATE"
static

"PGM / RUN BY / DATE"

Definition at line 223 of file RinexMetHeader.hpp.

◆ stringSensorPos

const string gnsstk::RinexMetHeader::stringSensorPos = "SENSOR POS XYZ/H"
static

"SENSOR POS XYZ/H"

Definition at line 235 of file RinexMetHeader.hpp.

◆ stringSensorType

const string gnsstk::RinexMetHeader::stringSensorType = "SENSOR MOD/TYPE/ACC"
static

"SENSOR MOD/TYPE/ACC"

Definition at line 233 of file RinexMetHeader.hpp.

◆ stringVersion

const string gnsstk::RinexMetHeader::stringVersion = "RINEX VERSION / TYPE"
static

"RINEX VERSION / TYPE"

Definition at line 221 of file RinexMetHeader.hpp.

◆ valid

unsigned long gnsstk::RinexMetHeader::valid

Tell me, Am I valid?

Definition at line 119 of file RinexMetHeader.hpp.

◆ version

double gnsstk::RinexMetHeader::version

RINEX Version.

Definition at line 197 of file RinexMetHeader.hpp.


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


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