RinexNavHeader Class Reference
[RINEX navigation files]

#include <RinexNavHeader.hpp>

Inheritance diagram for RinexNavHeader:

Inheritance graph
[legend]
Collaboration diagram for RinexNavHeader:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class models the RINEX NAV header for a RINEX NAV file.

See also:
rinex_nav_test.cpp and rinex_nav_read_write.cpp for examples.

gpstk::RinexNavData and gpstk::RinexNavStream classes.

Definition at line 68 of file RinexNavHeader.hpp.

Public Types

enum  validBits {
  versionValid = 0x01, runByValid = 0x02, commentValid = 0x04, ionAlphaValid = 0x08,
  ionBetaValid = 0x010, deltaUTCValid = 0x020, leapSecondsValid = 0x040, endValid = 0x080000000,
  allValid20 = 0x080000003, allValid21 = 0x080000003, allValid211 = 0x080000003
}
 These are validity bits used in checking the RINEX NAV header. More...

Public Member Functions

 RinexNavHeader (void)
 Constructor.
virtual ~RinexNavHeader ()
 Destructor.
virtual bool isHeader (void) const
 RinexNavHeader is a "header" so this function always returns true.
virtual void dump (std::ostream &s) const
 This function dumps the contents of the header.

Public Attributes

unsigned long valid
 Tell me, Am I valid?
HeaderValues
double version
 RINEX Version.
std::string fileType
std::string fileProgram
std::string fileAgency
std::string date
std::vector< std::string > commentList
double ionAlpha [4]
double ionBeta [4]
double A0
double A1
long UTCRefTime
long UTCRefWeek
long leapSeconds

Static Public Attributes

FormattingStd::Strings
const std::string versionString = "RINEX VERSION / TYPE"
const std::string runByString = "PGM / RUN BY / DATE"
const std::string commentString = "COMMENT"
const std::string ionAlphaString = "ION ALPHA"
const std::string ionBetaString = "ION BETA"
const std::string deltaUTCString = "DELTA-UTC: A0,A1,T,W"
const std::string leapSecondsString = "LEAP SECONDS"
const std::string endOfHeader = "END OF HEADER"

Protected Member Functions

virtual void reallyPutRecord (FFStream &s) const throw (std::exception, FFStreamError, gpstk::StringUtils::StringException)
 Writes a correctly formatted record from this data to stream s.
virtual void reallyGetRecord (FFStream &s) throw (std::exception, FFStreamError, gpstk::StringUtils::StringException)
 This function reads the RINEX NAV header from the given FFStream.


Member Enumeration Documentation

enum validBits
 

These are validity bits used in checking the RINEX NAV 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.
ionAlphaValid  Set if the Ion Alpha value is valid.
ionBetaValid  Set if the Ion Beta value is valid.
deltaUTCValid  Set if the Delta UTC value is valid.
leapSecondsValid  Set if the Leap Seconds value is valid.
endValid  Set if the end value is valid.
allValid20  This bitset checks that all required header items are available for a Rinex 2.0 version file.
allValid21  This bitset checks that all required header items are available for a Rinex 2.1 version file.
allValid211  This bitset checks that all required header items are available for a Rinex 2.11 version file.

Definition at line 87 of file RinexNavHeader.hpp.


Constructor & Destructor Documentation

RinexNavHeader void   )  [inline]
 

Constructor.

Definition at line 72 of file RinexNavHeader.hpp.

virtual ~RinexNavHeader  )  [inline, virtual]
 

Destructor.

Definition at line 75 of file RinexNavHeader.hpp.


Member Function Documentation

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

This function dumps the contents of the header.

Reimplemented from FFData.

Definition at line 300 of file RinexNavHeader.cpp.

References RinexNavHeader::A0, RinexNavHeader::A1, RinexNavHeader::commentList, RinexNavHeader::date, RinexNavHeader::fileAgency, RinexNavHeader::fileProgram, RinexNavHeader::fileType, RinexNavHeader::ionAlpha, RinexNavHeader::ionBeta, RinexNavHeader::leapSeconds, RinexNavHeader::UTCRefTime, RinexNavHeader::UTCRefWeek, RinexNavHeader::valid, and RinexNavHeader::version.

Referenced by main().

virtual bool isHeader void   )  const [inline, virtual]
 

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

Reimplemented from FFData.

Definition at line 78 of file RinexNavHeader.hpp.

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

This function reads the RINEX NAV 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 189 of file RinexNavHeader.cpp.

References A1, gpstk::StringUtils::asDouble(), gpstk::StringUtils::asInt(), gpstk::StringUtils::asString(), gpstk::StringUtils::for2doub(), FFTextStream::formattedGetLine(), GPSTK_THROW, RinexNavStream::header, RinexNavStream::headerRead, FFTextStream::lineNumber, gpstk::StringUtils::strip(), and gpstk::StringUtils::stripTrailing().

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

Writes a correctly formatted record from this data to stream s.

Implements FFData.

Definition at line 73 of file RinexNavHeader.cpp.

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


Member Data Documentation

double A0
 

Definition at line 121 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

double A1
 

Definition at line 122 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

std::vector<std::string> commentList
 

Definition at line 118 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump(), and RinexNavHeaderTouchHeaderMerge::operator()().

const string commentString = "COMMENT" [static]
 

Definition at line 69 of file RinexNavHeader.cpp.

std::string date
 

Definition at line 117 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

const string deltaUTCString = "DELTA-UTC: A0,A1,T,W" [static]
 

Definition at line 66 of file RinexNavHeader.cpp.

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

Definition at line 64 of file RinexNavHeader.cpp.

std::string fileAgency
 

Definition at line 116 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

std::string fileProgram
 

Definition at line 115 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

std::string fileType
 

Definition at line 114 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

double ionAlpha[4]
 

Definition at line 119 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

const string ionAlphaString = "ION ALPHA" [static]
 

Definition at line 68 of file RinexNavHeader.cpp.

double ionBeta[4]
 

Definition at line 120 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

const string ionBetaString = "ION BETA" [static]
 

Definition at line 67 of file RinexNavHeader.cpp.

long leapSeconds
 

Definition at line 125 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

const string leapSecondsString = "LEAP SECONDS" [static]
 

Definition at line 65 of file RinexNavHeader.cpp.

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

Definition at line 70 of file RinexNavHeader.cpp.

long UTCRefTime
 

Definition at line 123 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

long UTCRefWeek
 

Definition at line 124 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

unsigned long valid
 

Tell me, Am I valid?

Definition at line 84 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump().

double version
 

RINEX Version.

Definition at line 112 of file RinexNavHeader.hpp.

Referenced by RinexNavHeader::dump(), and RinexNavData::reallyPutRecord().

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

Definition at line 71 of file RinexNavHeader.cpp.


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