RinexMetHeader Class Reference
[RINEX meteorological files]

#include <RinexMetHeader.hpp>

Inheritance diagram for RinexMetHeader:

Inheritance graph
[legend]
Collaboration diagram for RinexMetHeader:

Collaboration graph
[legend]
List of all members.

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 69 of file RinexMetHeader.hpp.

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

 RinexMetHeader ()
 Constructor.
virtual ~RinexMetHeader ()
 Destructor.
virtual bool isHeader (void) const
 RinexMetHeader is a "header" so this function always returns true.
virtual void dump (std::ostream &s) const
 A debug function that outputs the header to s.

Static Public Member Functions

RinexMetType convertObsType (const std::string &oneObs) throw (FFStreamError)
 sets the obs type array given an obs type line
std::string convertObsType (const RinexMetType &oneObs) throw (FFStreamError)
 Converts a RinexMetType to its string equivalent.
std::string bitsAsString (validBits b)
std::string bitString (unsigned long vb, char quote='\"', std::string sep=",")

Public Attributes

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

Static Public Attributes

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

Protected Member Functions

virtual void reallyPutRecord (FFStream &s) const throw (std::exception, FFStreamError, gpstk::StringUtils::StringException)
 Writes the RINEX Met header to the stream s.
virtual void reallyGetRecord (FFStream &s) throw (std::exception, FFStreamError, gpstk::StringUtils::StringException)
 This function reads the RINEX MET header from the given FFStream.


Member Enumeration Documentation

enum RinexMetType
 

Enum for the different types of data in this file.

Enumeration values:
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 75 of file RinexMetHeader.hpp.

enum validBits
 

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

Enumeration values:
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 114 of file RinexMetHeader.hpp.

Referenced by RinexMetHeader::bitString().


Constructor & Destructor Documentation

RinexMetHeader  )  [inline]
 

Constructor.

Definition at line 90 of file RinexMetHeader.hpp.

virtual ~RinexMetHeader  )  [inline, virtual]
 

Destructor.

Definition at line 93 of file RinexMetHeader.hpp.


Member Function Documentation

std::string bitsAsString validBits  b  )  [inline, static]
 

Definition at line 138 of file RinexMetHeader.hpp.

Referenced by RinexMetHeader::bitString().

std::string bitString unsigned long  vb,
char  quote = '\"',
std::string  sep = ","
[static]
 

Definition at line 69 of file RinexMetHeader.cpp.

References RinexMetHeader::bitsAsString(), and RinexMetHeader::validBits.

string convertObsType const RinexMetType oneObs  )  throw (FFStreamError) [static]
 

Converts a RinexMetType to its string equivalent.

Definition at line 469 of file RinexMetHeader.cpp.

References gpstk::StringUtils::asString(), and GPSTK_THROW.

RinexMetHeader::RinexMetType convertObsType const std::string &  oneObs  )  throw (FFStreamError) [static]
 

sets the obs type array given an obs type line

Definition at line 449 of file RinexMetHeader.cpp.

References GPSTK_THROW.

Referenced by RinexMetHeader::dump().

void dump std::ostream &  s  )  const [virtual]
 

A debug function that outputs the header to s.

Reimplemented from FFData.

Definition at line 431 of file RinexMetHeader.cpp.

References RinexMetHeader::convertObsType(), RinexMetHeader::markerName, and RinexMetHeader::obsTypeList.

virtual bool isHeader void   )  const [inline, virtual]
 

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

Reimplemented from FFData.

Definition at line 97 of file RinexMetHeader.hpp.

void reallyGetRecord FFStream s  )  throw (std::exception, FFStreamError, gpstk::StringUtils::StringException) [protected, virtual]
 

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:
StringException when a StringUtils function fails
FFStreamError when exceptions(failbit) is set and a read or formatting error occurs. This also resets the stream to its pre-read position.

Implements FFData.

Definition at line 249 of file RinexMetHeader.cpp.

References RinexMetHeader::sensorType::accuracy, gpstk::StringUtils::asDouble(), gpstk::StringUtils::asInt(), gpstk::StringUtils::asString(), FFTextStream::formattedGetLine(), GPSTK_THROW, RinexMetStream::header, RinexMetStream::headerRead, RinexMetHeader::sensorPosType::height, RinexMetHeader::sensorType::model, RinexMetHeader::sensorPosType::obsType, RinexMetHeader::sensorType::obsType, RinexMetHeader::sensorPosType::position, gpstk::StringUtils::strip(), and RinexMetHeader::sensorType::type.

void reallyPutRecord FFStream ffs  )  const throw (std::exception, FFStreamError, gpstk::StringUtils::StringException) [protected, virtual]
 

Writes the RINEX Met header to the stream s.

This is the R3.0 version standard.

Implements FFData.

Definition at line 90 of file RinexMetHeader.cpp.

References Exception::addText(), gpstk::StringUtils::asString(), GPSTK_THROW, RinexMetStream::header, gpstk::StringUtils::leftJustify(), FFTextStream::lineNumber, and gpstk::StringUtils::rightJustify().


Member Data Documentation

std::vector<std::string> commentList
 

A list of comments.

Definition at line 206 of file RinexMetHeader.hpp.

Referenced by RinexMetHeaderTouchHeaderMerge::operator()().

std::string date
 

When the file was written.

Definition at line 205 of file RinexMetHeader.hpp.

std::string fileAgency
 

The group who generated it.

Definition at line 204 of file RinexMetHeader.hpp.

std::string fileProgram
 

The program that generated it.

Definition at line 203 of file RinexMetHeader.hpp.

std::string fileType
 

The type of file it is.

Definition at line 202 of file RinexMetHeader.hpp.

std::string markerName
 

The name of the location.

Definition at line 207 of file RinexMetHeader.hpp.

Referenced by RinexMetHeader::dump().

std::string markerNumber
 

The number of the location.

Definition at line 208 of file RinexMetHeader.hpp.

const int maxObsPerLine = 9 [static]
 

Holds the max records per line.

Definition at line 57 of file RinexMetHeader.cpp.

std::vector<RinexMetType> 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 216 of file RinexMetHeader.hpp.

Referenced by RinexMetHeader::dump(), RinexMetHeaderTouchHeaderMerge::operator()(), RinexMetData::reallyGetRecord(), and RinexMetData::reallyPutRecord().

std::vector<sensorPosType> sensorPosList
 

A list of sensor positions used in the file.

Definition at line 218 of file RinexMetHeader.hpp.

std::vector<sensorType> sensorTypeList
 

A list of sensors used in the file.

Definition at line 217 of file RinexMetHeader.hpp.

const string stringComment = "COMMENT" [static]
 

"COMMENT"

Definition at line 61 of file RinexMetHeader.cpp.

const string stringEoH = "END OF HEADER" [static]
 

"END OF HEADER"

Definition at line 67 of file RinexMetHeader.cpp.

const string stringMarkerName = "MARKER NAME" [static]
 

"MARKER NAME"

Definition at line 62 of file RinexMetHeader.cpp.

const string stringMarkerNumber = "MARKER NUMBER" [static]
 

"MARKER NUMBER"

Definition at line 63 of file RinexMetHeader.cpp.

const string stringObsType = "# / TYPES OF OBSERV" [static]
 

"# / TYPES OF OBSERV"

Definition at line 64 of file RinexMetHeader.cpp.

const string stringRunBy = "PGM / RUN BY / DATE" [static]
 

"PGM / RUN BY / DATE"

Definition at line 60 of file RinexMetHeader.cpp.

const string stringSensorPos = "SENSOR POS XYZ/H" [static]
 

"SENSOR POS XYZ/H"

Definition at line 66 of file RinexMetHeader.cpp.

const string stringSensorType = "SENSOR MOD/TYPE/ACC" [static]
 

"SENSOR MOD/TYPE/ACC"

Definition at line 65 of file RinexMetHeader.cpp.

const string stringVersion = "RINEX VERSION / TYPE" [static]
 

"RINEX VERSION / TYPE"

Definition at line 59 of file RinexMetHeader.cpp.

unsigned long valid
 

Tell me, Am I valid?

Definition at line 111 of file RinexMetHeader.hpp.

double version
 

RINEX Version.

Definition at line 200 of file RinexMetHeader.hpp.


The documentation for this class was generated from the following files:
Generated on Sat May 18 03:31:50 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1