RinexObsData Class Reference
[RINEX observation files]

#include <RinexObsData.hpp>

Inheritance diagram for RinexObsData:

Inheritance graph
[legend]
Collaboration diagram for RinexObsData:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class models a RINEX Observation Data Record.

See also:
gpstk::RinexObsStream and gpstk::RinexObsHeader.

rinex_obs_test.cpp and rinex_obs_read_write.cpp for examples.

Definition at line 67 of file RinexObsData.hpp.

Public Types

typedef std::map< RinexObsHeader::RinexObsType,
RinexDatum
RinexObsTypeMap
 map from RinexObsType to RinexDatum.
typedef std::map< SatID, RinexObsTypeMapRinexSatMap
 map from SatID to RinexObsTypeMap.

Public Member Functions

 RinexObsData ()
 Constructor.
virtual ~RinexObsData ()
 Destructor.
virtual bool isData () const
 RinexObsData is a "data", so this function always returns true.
virtual void dump (std::ostream &s) const
 A Debug output function.

Public Attributes

gpstk::CommonTime time
 the time corresponding to the observations
short epochFlag
 Epoch flag has the following values 0 ok 1 power failure since previous epoch 2 start moving antenna 3 new site occupation (end moving antenna) at least MARKER NAME header record follows 4 header records follow 5 external event 6 cycle slip record - same format as observation, but slips not data, and LLI and SSI are blank.
short numSvs
 number of satellites in this observation, except when epochFlag = 2-5, then the number of auxiliary header records to follow.
double clockOffset
 optional clock offset
RinexSatMap obs
 the map of observations
RinexObsHeader auxHeader
 auxiliary header records (epochFlag 2-5)

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 functions obtains a RINEX Observation record from the given FFStream.


Member Typedef Documentation

typedef std::map<RinexObsHeader::RinexObsType, RinexDatum> RinexObsTypeMap
 

map from RinexObsType to RinexDatum.

Definition at line 81 of file RinexObsData.hpp.

typedef std::map<SatID, RinexObsTypeMap> RinexSatMap
 

map from SatID to RinexObsTypeMap.

Definition at line 83 of file RinexObsData.hpp.


Constructor & Destructor Documentation

RinexObsData  )  [inline]
 

Constructor.

Definition at line 107 of file RinexObsData.hpp.

References gpstk::BEGINNING_OF_TIME.

virtual ~RinexObsData  )  [inline, virtual]
 

Destructor.

Definition at line 110 of file RinexObsData.hpp.


Member Function Documentation

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

A Debug output function.

Dumps the time of observations and the IDs of the Sats in the map.

Reimplemented from FFData.

Definition at line 448 of file RinexObsData.cpp.

References RinexObsData::auxHeader, RinexObsData::clockOffset, RinexObsHeader::dump(), RinexObsData::epochFlag, RinexObsData::numSvs, RinexObsData::obs, and RinexObsData::time.

virtual bool isData void   )  const [inline, virtual]
 

RinexObsData is a "data", so this function always returns true.

Reimplemented from FFData.

Definition at line 114 of file RinexObsData.hpp.

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

This functions obtains a RINEX Observation record from the given FFStream.

If there is an error in reading from the stream, it is reset to its original position and its fail-bit is set. Because of the Rinex Obs format, a RinexObsData record returned might not have data in it. Check the RinexSatMap for empty() before using any data in it.

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 183 of file RinexObsData.cpp.

References gpstk::StringUtils::asDouble(), gpstk::StringUtils::asInt(), gpstk::StringUtils::asString(), FFTextStream::formattedGetLine(), GPSTK_RETHROW, GPSTK_THROW, RinexObsStream::header, RinexObsStream::headerRead, RinexObsHeader::obsTypeList, 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.

When printing comment records, you'll need to format them correctly yourself. This means making sure that "COMMENT" is at the end of the line and that they're the correct length (<= 80 chrs). Also make sure to correctly set the epochFlag to the correct number for the type of header data you want to write.

Implements FFData.

Definition at line 58 of file RinexObsData.cpp.

References gpstk::StringUtils::asString(), RinexObsData::RinexDatum::data, GPSTK_RETHROW, RinexObsStream::header, FFTextStream::lineNumber, RinexObsData::RinexDatum::lli, RinexObsHeader::obsTypeList, gpstk::StringUtils::rightJustify(), and RinexObsData::RinexDatum::ssi.


Member Data Documentation

RinexObsHeader auxHeader
 

auxiliary header records (epochFlag 2-5)

Definition at line 104 of file RinexObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), and RinexObsData::dump().

double clockOffset
 

optional clock offset

Definition at line 102 of file RinexObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), RinexObsData::dump(), gpstk::makeRinexObsData(), NovatelData::operator RinexObsData(), and RinexObsDataOperatorLessThanFull::operator()().

short epochFlag
 

Epoch flag has the following values 0 ok 1 power failure since previous epoch 2 start moving antenna 3 new site occupation (end moving antenna) at least MARKER NAME header record follows 4 header records follow 5 external event 6 cycle slip record - same format as observation, but slips not data, and LLI and SSI are blank.

Definition at line 97 of file RinexObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), RinexObsData::dump(), gpstk::makeRinexObsData(), NovatelData::operator RinexObsData(), RinexObsDataOperatorLessThanFull::operator()(), gpstk::SatPassFromRinexFiles(), and gpstk::SatPassToRinexFile().

short numSvs
 

number of satellites in this observation, except when epochFlag = 2-5, then the number of auxiliary header records to follow.

Definition at line 101 of file RinexObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), RinexObsData::dump(), gpstk::makeRinexObsData(), and NovatelData::operator RinexObsData().

RinexSatMap obs
 

the map of observations

Definition at line 103 of file RinexObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), RinexObsData::dump(), main(), gpstk::makeRinexObsData(), NovatelData::operator RinexObsData(), RinexObsDataOperatorLessThanFull::operator()(), gpstk::SatPassFromRinexFiles(), and gpstk::SatPassToRinexFile().

gpstk::CommonTime time
 

the time corresponding to the observations

Definition at line 85 of file RinexObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), RinexObsData::dump(), gpstk::makeRinexObsData(), NovatelData::operator RinexObsData(), RinexObsDataOperatorEqualsSimple::operator()(), RinexObsDataOperatorLessThanSimple::operator()(), RinexObsDataOperatorLessThanFull::operator()(), and gpstk::SatPassFromRinexFiles().


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