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

Detailed Description

This class models a RINEX Observation Data Record.

See also
gnsstk::Rinex3ObsStream and gnsstk::Rinex3ObsHeader.
rinex_obs_test.cpp and rinex_obs_read_write.cpp for examples.
Warning
This class makes no attempt to apply or remove any of the phase shifts when converting between RINEX and other observation types. This can lead to invalid RINEX OBS data. Either use RINEX 3.00 which does not require the SYS / PHASE SHIFT header field, or apply the corrections appropriately when performing conversions.

Definition at line 75 of file Rinex3ObsData.hpp.

#include <Rinex3ObsData.hpp>

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

Public Types

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

Public Member Functions

virtual void dump (std::ostream &s) const
 
void dump (std::ostream &s, Rinex3ObsHeader &head) const
 Another dump, using information from the header. More...
 
virtual RinexDatum getObs (const RinexSatID &svID, const RinexObsID &obsID, const Rinex3ObsHeader &hdr) const
 
virtual RinexDatum getObs (const RinexSatID &svID, const std::string &obsID, const Rinex3ObsHeader &hdr) const
 
virtual RinexDatum getObs (const RinexSatID &svID, size_t index) const
 
 Rinex3ObsData ()
 Constructor. More...
 
virtual void setObs (const RinexDatum &data, const RinexSatID &svID, const RinexObsID &obsID, const Rinex3ObsHeader &hdr)
 
std::string timeString () const
 
virtual ~Rinex3ObsData ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::Rinex3ObsBase
virtual ~Rinex3ObsBase ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::FFData
void getRecord (FFStream &s)
 
virtual bool isData () const
 
virtual bool isHeader () const
 
void putRecord (FFStream &s) const
 
virtual ~FFData (void)
 virtual desctuctor More...
 

Public Attributes

Rinex3ObsHeader auxHeader
 auxiliary header records (epochFlag 2-5) More...
 
double clockOffset
 optional clock offset in seconds More...
 
short epochFlag
 
short numSVs
 
DataMap obs
 the map of observations More...
 
CommonTime time
 Time corresponding to the observations. More...
 
XmitAnt xmitAnt
 Non-standard, transmitter ID. 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 Rinex3ObsHeader &hdr, const TimeSystem &ts) const
 
std::string writeTime (const CommonTime &dt) const
 

Additional Inherited Members

- Static Public Attributes inherited from gnsstk::Rinex3ObsBase
static const GNSSTK_EXPORT double currentVersion = 3.04
 

Member Typedef Documentation

◆ DataMap

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

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

Definition at line 88 of file Rinex3ObsData.hpp.

Constructor & Destructor Documentation

◆ Rinex3ObsData()

gnsstk::Rinex3ObsData::Rinex3ObsData ( )

Constructor.

Definition at line 215 of file Rinex3ObsData.cpp.

◆ ~Rinex3ObsData()

virtual gnsstk::Rinex3ObsData::~Rinex3ObsData ( )
inlinevirtual

Destructor.

Definition at line 83 of file Rinex3ObsData.hpp.

Member Function Documentation

◆ dump() [1/2]

void gnsstk::Rinex3ObsData::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 828 of file Rinex3ObsData.cpp.

◆ dump() [2/2]

void gnsstk::Rinex3ObsData::dump ( std::ostream &  s,
Rinex3ObsHeader head 
) const

Another dump, using information from the header.

Definition at line 861 of file Rinex3ObsData.cpp.

◆ getObs() [1/3]

RinexDatum gnsstk::Rinex3ObsData::getObs ( const RinexSatID svID,
const RinexObsID obsID,
const Rinex3ObsHeader hdr 
) const
virtual

This method returns the RinexDatum of a given observation

Parameters
svIDRinexSatID of satellite
obsIDRinexObsID of the observation type.
hdrRinex3ObsHeader for current RINEX file.
Exceptions
InvalidRequest

Definition at line 257 of file Rinex3ObsData.cpp.

◆ getObs() [2/3]

RinexDatum gnsstk::Rinex3ObsData::getObs ( const RinexSatID svID,
const std::string &  obsID,
const Rinex3ObsHeader hdr 
) const
virtual

This method returns the RinexDatum of a given observation

Parameters
[in]svIDSatellite whose observation we want to fetch.
[in]obsIDString representing the observation type.
[in]hdrRinex3ObsHeader for current RINEX file.
Exceptions
InvalidRequest

Definition at line 242 of file Rinex3ObsData.cpp.

◆ getObs() [3/3]

RinexDatum gnsstk::Rinex3ObsData::getObs ( const RinexSatID svID,
size_t  index 
) const
virtual

This method returns the RinexDatum of a given observation

Parameters
svIDSatellite whose observation we want to fetch.
indexIndex representing the observation type. It is obtained from corresponding RINEX Observation Header using method 'Rinex3ObsHeader::getObsIndex()'.
Exceptions
InvalidRequest

Definition at line 224 of file Rinex3ObsData.cpp.

◆ parseTime()

CommonTime gnsstk::Rinex3ObsData::parseTime ( const std::string &  line,
const Rinex3ObsHeader hdr,
const TimeSystem ts 
) 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 742 of file Rinex3ObsData.cpp.

◆ reallyGetRecord()

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

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

Implements gnsstk::FFData.

Definition at line 604 of file Rinex3ObsData.cpp.

◆ reallyPutRecord()

void gnsstk::Rinex3ObsData::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 309 of file Rinex3ObsData.cpp.

◆ setObs()

void gnsstk::Rinex3ObsData::setObs ( const RinexDatum data,
const RinexSatID svID,
const RinexObsID obsID,
const Rinex3ObsHeader hdr 
)
virtual

This sets the RinexDatum for a given observation

Parameters
dataRinexDatum of obs
svIDRinexSatID of satellite
obsIDRinexObsID of the observation type.
hdrRinex3ObsHeader for current RINEX file.
Exceptions
InvalidRequest
Todo:
If the existing channel data is greater than or equal to this number, we have stuffed the maximum number of channels into the field. I don't really know what to do in the event that we exceed this limit.

Definition at line 266 of file Rinex3ObsData.cpp.

◆ timeString()

string gnsstk::Rinex3ObsData::timeString ( ) const
Exceptions
StringUtils::StringException

Definition at line 823 of file Rinex3ObsData.cpp.

◆ writeTime()

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

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

Exceptions
StringUtils::StringException

Definition at line 800 of file Rinex3ObsData.cpp.

Member Data Documentation

◆ auxHeader

Rinex3ObsHeader gnsstk::Rinex3ObsData::auxHeader

auxiliary header records (epochFlag 2-5)

Definition at line 116 of file Rinex3ObsData.hpp.

◆ clockOffset

double gnsstk::Rinex3ObsData::clockOffset

optional clock offset in seconds

Definition at line 112 of file Rinex3ObsData.hpp.

◆ epochFlag

short gnsstk::Rinex3ObsData::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 104 of file Rinex3ObsData.hpp.

◆ numSVs

short gnsstk::Rinex3ObsData::numSVs

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

Definition at line 109 of file Rinex3ObsData.hpp.

◆ obs

DataMap gnsstk::Rinex3ObsData::obs

the map of observations

Definition at line 114 of file Rinex3ObsData.hpp.

◆ time

CommonTime gnsstk::Rinex3ObsData::time

Time corresponding to the observations.

Definition at line 91 of file Rinex3ObsData.hpp.

◆ xmitAnt

XmitAnt gnsstk::Rinex3ObsData::xmitAnt

Non-standard, transmitter ID.

Definition at line 118 of file Rinex3ObsData.hpp.


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


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