Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Static Private Attributes | List of all members
gnsstk::RinexObsData Class Reference

Detailed Description

This class models a RINEX Observation Data Record.

See also
gnsstk::RinexObsStream and gnsstk::RinexObsHeader.
rinex_obs_test.cpp and rinex_obs_read_write.cpp for examples.

Definition at line 68 of file RinexObsData.hpp.

#include <RinexObsData.hpp>

Inheritance diagram for gnsstk::RinexObsData:
Inheritance graph
[legend]

Public Types

typedef std::map< RinexObsType, gnsstk::RinexDatumRinexObsTypeMap
 map from RinexObsType to RinexDatum. More...
 
typedef std::map< gnsstk::SatID, RinexObsTypeMapRinexSatMap
 map from SatID to RinexObsTypeMap. More...
 

Public Member Functions

virtual void dump (std::ostream &s) const
 
virtual bool isData () const
 RinexObsData is a "data", so this function always returns true. More...
 
 RinexObsData ()
 Constructor. More...
 
virtual ~RinexObsData ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::RinexObsBase
virtual ~RinexObsBase ()
 Destructor per the coding standards. More...
 
- Public Member Functions inherited from gnsstk::FFData
void getRecord (FFStream &s)
 
virtual bool isHeader () const
 
void putRecord (FFStream &s) const
 
virtual ~FFData (void)
 virtual desctuctor More...
 

Public Attributes

RinexObsHeader auxHeader
 auxiliary header records (epochFlag 2-5) More...
 
double clockOffset
 optional clock offset More...
 
short epochFlag
 
short numSvs
 
RinexSatMap obs
 the map of observations More...
 
gnsstk::CommonTime time
 the time corresponding to the observations More...
 

Protected Member Functions

virtual void reallyGetRecord (FFStream &s)
 
virtual void reallyPutRecord (FFStream &s) const
 

Private Member Functions

CommonTime parseTime (const std::string &line, const RinexObsHeader &hdr) const
 
std::string writeTime (const CommonTime &dt) const
 

Static Private Attributes

static gnsstk::CommonTime previousTime
 

Member Typedef Documentation

◆ RinexObsTypeMap

map from RinexObsType to RinexDatum.

Definition at line 73 of file RinexObsData.hpp.

◆ RinexSatMap

map from SatID to RinexObsTypeMap.

Definition at line 75 of file RinexObsData.hpp.

Constructor & Destructor Documentation

◆ RinexObsData()

gnsstk::RinexObsData::RinexObsData ( )
inline

Constructor.

Definition at line 99 of file RinexObsData.hpp.

◆ ~RinexObsData()

virtual gnsstk::RinexObsData::~RinexObsData ( )
inlinevirtual

Destructor.

Definition at line 102 of file RinexObsData.hpp.

Member Function Documentation

◆ dump()

void gnsstk::RinexObsData::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 gnsstk::FFData.

Definition at line 443 of file RinexObsData.cpp.

◆ isData()

virtual bool gnsstk::RinexObsData::isData ( ) const
inlinevirtual

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

Reimplemented from gnsstk::FFData.

Definition at line 106 of file RinexObsData.hpp.

◆ parseTime()

CommonTime gnsstk::RinexObsData::parseTime ( const std::string &  line,
const RinexObsHeader hdr 
) const
private

This function constructs a CommonTime object from the given parameters.

Parameters
linethe encoded time string found in the RINEX record.
hdrthe RINEX Observation Header object for the current RINEX file.
Exceptions
FFStreamError

Definition at line 358 of file RinexObsData.cpp.

◆ reallyGetRecord()

void gnsstk::RinexObsData::reallyGetRecord ( FFStream s)
protectedvirtual

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

Implements gnsstk::FFData.

Definition at line 182 of file RinexObsData.cpp.

◆ reallyPutRecord()

void gnsstk::RinexObsData::reallyPutRecord ( FFStream s) const
protectedvirtual

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.

Exceptions
std::exception
FFStreamError
StringUtils::StringException

Implements gnsstk::FFData.

Definition at line 58 of file RinexObsData.cpp.

◆ writeTime()

string gnsstk::RinexObsData::writeTime ( const CommonTime dt) const
private

Writes the CommonTime object into RINEX format. If it's a bad time, it will return blanks.

Definition at line 418 of file RinexObsData.cpp.

Member Data Documentation

◆ auxHeader

RinexObsHeader gnsstk::RinexObsData::auxHeader

auxiliary header records (epochFlag 2-5)

Definition at line 96 of file RinexObsData.hpp.

◆ clockOffset

double gnsstk::RinexObsData::clockOffset

optional clock offset

Definition at line 94 of file RinexObsData.hpp.

◆ epochFlag

short gnsstk::RinexObsData::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 89 of file RinexObsData.hpp.

◆ numSvs

short gnsstk::RinexObsData::numSvs

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

Definition at line 93 of file RinexObsData.hpp.

◆ obs

RinexSatMap gnsstk::RinexObsData::obs

the map of observations

Definition at line 95 of file RinexObsData.hpp.

◆ previousTime

CommonTime gnsstk::RinexObsData::previousTime
staticprivate

Time corresponding to previous set of oberservations Used in cases where epoch time of a epoch flag==0

Definition at line 148 of file RinexObsData.hpp.

◆ time

gnsstk::CommonTime gnsstk::RinexObsData::time

the time corresponding to the observations

Definition at line 77 of file RinexObsData.hpp.


The documentation for this class was generated from the following files:


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45