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 75 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 {
  versionValid = 0x01, runByValid = 0x02, commentValid = 0x04, markerNameValid = 0x08,
  markerNumberValid = 0x010, obsTypeValid = 0x020, sensorTypeValid = 0x040, sensorPosValid = 0x080,
  endValid = 0x080000000, allValid20 = 0x0800000EB, allValid21 = 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 versionString = "RINEX VERSION / TYPE"
 "RINEX VERSION / TYPE"
const std::string runByString = "PGM / RUN BY / DATE"
 "PGM / RUN BY / DATE"
const std::string commentString = "COMMENT"
 "COMMENT"
const std::string markerNameString = "MARKER NAME"
 "MARKER NAME"
const std::string markerNumberString = "MARKER NUMBER"
 "MARKER NUMBER"
const std::string obsTypeString = "# / TYPES OF OBSERV"
 "# / TYPES OF OBSERV"
const std::string sensorTypeString = "SENSOR MOD/TYPE/ACC"
 "SENSOR MOD/TYPE/ACC"
const std::string sensorPosString = "SENSOR POS XYZ/H"
 "SENSOR POS XYZ/H"
const std::string endOfHeader = "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 79 of file RinexMetHeader.hpp.

enum validBits
 

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

Enumeration values:
versionValid  Set if the RINEX version is valid.
runByValid  Set if the Run-by value is valid.
commentValid  Set if the comments are valid. Very subjective.
markerNameValid  Set if the Marker Name is valid.
markerNumberValid  Set if the Marker Number is valid.
obsTypeValid  Set if Num/Types of Obs is valid.
sensorTypeValid  Set if Sensor Mod/Type/Acc is valid.
sensorPosValid  Set if Sensor position is valid.
endValid  Set if the end value 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.

Definition at line 118 of file RinexMetHeader.hpp.

Referenced by RinexMetHeader::bitString().


Constructor & Destructor Documentation

RinexMetHeader  )  [inline]
 

Constructor.

Definition at line 94 of file RinexMetHeader.hpp.

virtual ~RinexMetHeader  )  [inline, virtual]
 

Destructor.

Definition at line 97 of file RinexMetHeader.hpp.


Member Function Documentation

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

Definition at line 141 of file RinexMetHeader.hpp.

Referenced by RinexMetHeader::bitString().

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

Definition at line 77 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 490 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 470 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 451 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 101 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 263 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 s  )  const throw (std::exception, FFStreamError, gpstk::StringUtils::StringException) [protected, virtual]
 

Writes the RINEX Met header to the stream s.

Implements FFData.

Definition at line 98 of file RinexMetHeader.cpp.

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


Member Data Documentation

std::vector<std::string> commentList
 

A list of comments.

Definition at line 210 of file RinexMetHeader.hpp.

Referenced by RinexMetHeaderTouchHeaderMerge::operator()().

const string commentString = "COMMENT" [static]
 

"COMMENT"

Definition at line 67 of file RinexMetHeader.cpp.

std::string date
 

When the file was written.

Definition at line 209 of file RinexMetHeader.hpp.

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

"END OF HEADER"

Definition at line 73 of file RinexMetHeader.cpp.

std::string fileAgency
 

The group who generated it.

Definition at line 208 of file RinexMetHeader.hpp.

std::string fileProgram
 

The program that generated it.

Definition at line 207 of file RinexMetHeader.hpp.

std::string fileType
 

The type of file it is.

Definition at line 206 of file RinexMetHeader.hpp.

std::string markerName
 

The name of the location.

Definition at line 211 of file RinexMetHeader.hpp.

Referenced by RinexMetHeader::dump().

const string markerNameString = "MARKER NAME" [static]
 

"MARKER NAME"

Definition at line 68 of file RinexMetHeader.cpp.

std::string markerNumber
 

The number of the location.

Definition at line 212 of file RinexMetHeader.hpp.

const string markerNumberString = "MARKER NUMBER" [static]
 

"MARKER NUMBER"

Definition at line 69 of file RinexMetHeader.cpp.

const int maxObsPerLine = 9 [static]
 

Holds the max records per line.

Definition at line 63 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 220 of file RinexMetHeader.hpp.

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

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

"# / TYPES OF OBSERV"

Definition at line 70 of file RinexMetHeader.cpp.

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

"PGM / RUN BY / DATE"

Definition at line 66 of file RinexMetHeader.cpp.

std::vector<sensorPosType> sensorPosList
 

A list of sensor positions used in the file.

Definition at line 222 of file RinexMetHeader.hpp.

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

"SENSOR POS XYZ/H"

Definition at line 72 of file RinexMetHeader.cpp.

std::vector<sensorType> sensorTypeList
 

A list of sensors used in the file.

Definition at line 221 of file RinexMetHeader.hpp.

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

"SENSOR MOD/TYPE/ACC"

Definition at line 71 of file RinexMetHeader.cpp.

unsigned long valid
 

Tell me, Am I valid?

Definition at line 115 of file RinexMetHeader.hpp.

double version
 

RINEX Version.

Definition at line 204 of file RinexMetHeader.hpp.

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

"RINEX VERSION / TYPE"

Definition at line 65 of file RinexMetHeader.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Feb 8 03:31:40 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1