Rinex3ObsData Class Reference
[RINEX 3 observation files]

#include <Rinex3ObsData.hpp>

Inheritance diagram for Rinex3ObsData:

Inheritance graph
[legend]
Collaboration diagram for Rinex3ObsData:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class models a RINEX Observation Data Record.

See also:
gpstk::Rinex3ObsStream and gpstk::Rinex3ObsHeader.

rinex_obs_test.cpp and rinex_obs_read_write.cpp for examples.

Definition at line 65 of file Rinex3ObsData.hpp.

Public Types

typedef std::map< RinexSatID,
std::vector< RinexDatum > > 
DataMap
 Map from RinexSatID to RinexDatum; order of the data matches the order of RinexObsIDs in the header.

Public Member Functions

 Rinex3ObsData ()
 Constructor.
virtual ~Rinex3ObsData ()
 Destructor.
virtual RinexDatum getObs (const SatID &sat, int index) const throw (InvalidRequest)
 This method returns the RinexDatum of a given observation.
virtual RinexDatum getObs (const SatID &sat, std::string type, const Rinex3ObsHeader &hdr) const throw (InvalidRequest)
 This method returns the RinexDatum of a given observation.
virtual void dump (std::ostream &s) const
 A Debug output function.
void dump (std::ostream &s, Rinex3ObsHeader &head) const
 Another dump, using information from the header.

Public Attributes

CommonTime time
 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 number of auxiliary header records to follow.
double clockOffset
 optional clock offset in seconds
DataMap obs
 the map of observations
Rinex3ObsHeader 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 3 Observation record from the given FFStream.


Member Typedef Documentation

typedef std::map<RinexSatID, std::vector<RinexDatum> > DataMap
 

Map from RinexSatID to RinexDatum; order of the data matches the order of RinexObsIDs in the header.

Definition at line 91 of file Rinex3ObsData.hpp.


Constructor & Destructor Documentation

Rinex3ObsData  )  [inline]
 

Constructor.

Definition at line 71 of file Rinex3ObsData.hpp.

References gpstk::BEGINNING_OF_TIME.

virtual ~Rinex3ObsData  )  [inline, virtual]
 

Destructor.

Definition at line 76 of file Rinex3ObsData.hpp.


Member Function Documentation

void dump std::ostream &  s,
Rinex3ObsHeader head
const
 

Another dump, using information from the header.

Definition at line 769 of file Rinex3ObsData.cpp.

References gpstk::StringUtils::asString(), Rinex3ObsData::auxHeader, Rinex3ObsHeader::dump(), Rinex3ObsData::epochFlag, Rinex3ObsHeader::mapObsTypes, Rinex3ObsData::numSVs, Rinex3ObsData::obs, gpstk::printTime(), and Rinex3ObsData::time.

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 740 of file Rinex3ObsData.cpp.

References Rinex3ObsData::auxHeader, Rinex3ObsData::clockOffset, Rinex3ObsHeader::dump(), Rinex3ObsData::epochFlag, Rinex3ObsData::numSVs, Rinex3ObsData::obs, and Rinex3ObsData::time.

Rinex3ObsData::RinexDatum getObs const SatID sat,
std::string  type,
const Rinex3ObsHeader hdr
const throw (InvalidRequest) [virtual]
 

This method returns the RinexDatum of a given observation.

Parameters:
sat Satellite whose observation we want to fetch.
type String representing the observation type.
hdr RINEX Observation Header for current RINEX file.

Definition at line 259 of file Rinex3ObsData.cpp.

References index(), and RinexSatID::systemChar().

Rinex3ObsData::RinexDatum getObs const SatID sat,
int  index
const throw (InvalidRequest) [virtual]
 

This method returns the RinexDatum of a given observation.

Parameters:
sat Satellite whose observation we want to fetch.
index Index representing the observation type. It is obtained from corresponding RINEX Observation Header using method 'Rinex3ObsHeader::getObsIndex()'.

Definition at line 226 of file Rinex3ObsData.cpp.

References GPSTK_THROW, and RinexSatID::toString().

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

This functions obtains a RINEX 3 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 3 Obs format, a Rinex3ObsData record returned might not have data. Check the Rinex3SatMap 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. Also resets the stream to its pre-read position.

Implements FFData.

Definition at line 551 of file Rinex3ObsData.cpp.

References gpstk::StringUtils::asDouble(), gpstk::StringUtils::asInt(), gpstk::StringUtils::asString(), Rinex3ObsData::RinexDatum::data, FFTextStream::formattedGetLine(), GPSTK_RETHROW, GPSTK_THROW, Rinex3ObsStream::header, Rinex3ObsStream::headerRead, Rinex3ObsData::RinexDatum::lli, Rinex3ObsHeader::mapObsTypes, gpstk::reallyGetRecordVer2(), Rinex3ObsData::RinexDatum::ssi, gpstk::StringUtils::stripTrailing(), and Rinex3ObsHeader::version.

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 284 of file Rinex3ObsData.cpp.

References gpstk::StringUtils::asString(), Rinex3ObsData::RinexDatum::data, GPSTK_RETHROW, Rinex3ObsStream::header, FFTextStream::lineNumber, Rinex3ObsData::RinexDatum::lli, gpstk::reallyPutRecordVer2(), gpstk::StringUtils::rightJustify(), Rinex3ObsData::RinexDatum::ssi, and Rinex3ObsHeader::version.


Member Data Documentation

Rinex3ObsHeader auxHeader
 

auxiliary header records (epochFlag 2-5)

Definition at line 120 of file Rinex3ObsData.hpp.

Referenced by RinexConverter::convertToRinex3(), and Rinex3ObsData::dump().

double clockOffset
 

optional clock offset in seconds

Definition at line 116 of file Rinex3ObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), Rinex3ObsData::dump(), and Rinex3ObsDataOperatorLessThanFull::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 108 of file Rinex3ObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), Rinex3ObsData::dump(), and Rinex3ObsDataOperatorLessThanFull::operator()().

short numSVs
 

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

Definition at line 113 of file Rinex3ObsData.hpp.

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

DataMap obs
 

the map of observations

Definition at line 118 of file Rinex3ObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), Rinex3ObsData::dump(), and Rinex3ObsDataOperatorLessThanFull::operator()().

CommonTime time
 

Time corresponding to the observations.

Definition at line 95 of file Rinex3ObsData.hpp.

Referenced by RinexConverter::convertFromRinex3(), RinexConverter::convertToRinex3(), Rinex3ObsData::dump(), Rinex3ObsDataOperatorEqualsSimple::operator()(), Rinex3ObsDataOperatorLessThanSimple::operator()(), and Rinex3ObsDataOperatorLessThanFull::operator()().


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