Public Member Functions | Static Public Member Functions | List of all members
gnsstk::RinexNavData Class Reference

Detailed Description

This class models a RINEX NAV record.

See also
rinex_nav_test.cpp and rinex_nav_read_write.cpp for examples.
gnsstk::RinexNavHeader and gnsstk::RinexNavStream classes.

Definition at line 67 of file RinexNavData.hpp.

#include <RinexNavData.hpp>

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

Public Member Functions

virtual void dump (std::ostream &s) const
 
CommonTime getHOWTime () const
 
GPSWeekSecond getHOWWS () const
 
CommonTime getTocTime () const noexcept
 
GPSWeekSecond getTocWS () const
 
CommonTime getToeTime () const
 
GPSWeekSecond getToeWS () const
 
CommonTime getXmitTime () const
 
GPSWeekSecond getXmitWS () const
 
virtual bool isData () const
 RinexNavData is "data" so this function always returns true. More...
 
 operator EngEphemeris () const noexcept
 
 RinexNavData ()
 
 RinexNavData (const EngEphemeris &ee)
 Initializes the nav data with an EngEphemeris. More...
 
RinexNavDatasetXmitTime (unsigned long sow)
 
RinexNavDatasetXmitTime (unsigned short fullweek, unsigned long sow)
 
RinexNavDatasetXmitWeek (unsigned short fullweek)
 
virtual std::string stableText () const
 
std::list< double > toList () const
 
virtual ~RinexNavData ()
 destructor More...
 
- Public Member Functions inherited from gnsstk::RinexNavBase
virtual ~RinexNavBase ()
 in deference to our coding standards, this is declared virtual 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...
 

Static Public Member Functions

static long fixSF1xmitSOW (unsigned long sow)
 

Public Attributes

Epoch data
CommonTime time
 Clock reference time (toc). More...
 
short PRNID
 SV PRN ID. More...
 
long sf1XmitTime
 Transmit time (seconds of week) of SF 1. More...
 
short toeWeek
 The full GPS week associated with Toe. More...
 
short codeflgs
 L2 codes. More...
 
RNDouble accuracy
 SV accuracy (m). More...
 
short health
 SV health. More...
 
short L2Pdata
 L2 P data flag. More...
 
RNDouble IODC
 Index of data-clock. More...
 
RNDouble IODE
 Index of data-eph. More...
 
Clock Information
RNDouble af0
 SV clock error (sec). More...
 
RNDouble af1
 SV clock drift (sec/sec). More...
 
RNDouble af2
 SV clock drift rate (sec/sec**2). More...
 
RNDouble Tgd
 Group delay differential (sec). More...
 
Harmonic Perturbations
RNDouble Cuc
 Cosine latitude (rad). More...
 
RNDouble Cus
 Sine latitude (rad). More...
 
RNDouble Crc
 Cosine radius (m). More...
 
RNDouble Crs
 Sine radius (m). More...
 
RNDouble Cic
 Cosine inclination (rad). More...
 
RNDouble Cis
 Sine inclination (rad). More...
 

Major Ephemeris Parameters

RNDouble Toe
 Ephemeris epoch (sec of week). More...
 
RNDouble M0
 Mean anomaly (rad). More...
 
RNDouble dn
 Correction to mean motion (rad/sec). More...
 
RNDouble ecc
 Eccentricity. More...
 
RNDouble Ahalf
 SQRT of semi-major axis (m**1/2). More...
 
RNDouble OMEGA0
 Rt ascension of ascending node (rad). More...
 
RNDouble i0
 Inclination (rad). More...
 
RNDouble w
 Argument of perigee (rad). More...
 
RNDouble OMEGAdot
 Rate of Rt ascension (rad/sec). More...
 
RNDouble idot
 Rate of inclination angle (rad/sec). More...
 
RNDouble fitint
 Fit interval. More...
 
void getPRNEpoch (const std::string &currentLine)
 
void getBroadcastOrbit1 (const std::string &currentLine)
 
void getBroadcastOrbit2 (const std::string &currentLine)
 
void getBroadcastOrbit3 (const std::string &currentLine)
 
void getBroadcastOrbit4 (const std::string &currentLine)
 
void getBroadcastOrbit5 (const std::string &currentLine)
 
void getBroadcastOrbit6 (const std::string &currentLine)
 
void getBroadcastOrbit7 (const std::string &currentLine)
 
std::string putBroadcastOrbit2 () const
 
std::string putBroadcastOrbit3 () const
 
std::string putBroadcastOrbit4 () const
 
std::string putBroadcastOrbit5 () const
 
std::string putBroadcastOrbit6 () const
 
std::string putBroadcastOrbit7 (const double ver) const
 
virtual void reallyPutRecord (FFStream &s) const
 
virtual void reallyGetRecord (FFStream &s)
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ RinexNavData() [1/2]

gnsstk::RinexNavData::RinexNavData ( )

Constructor

Warning
CHECK THE PRNID TO SEE IF THIS DATA IS VALID BEFORE USING!!

Definition at line 60 of file RinexNavData.cpp.

◆ RinexNavData() [2/2]

gnsstk::RinexNavData::RinexNavData ( const EngEphemeris ee)

Initializes the nav data with an EngEphemeris.

Definition at line 71 of file RinexNavData.cpp.

◆ ~RinexNavData()

virtual gnsstk::RinexNavData::~RinexNavData ( )
inlinevirtual

destructor

Definition at line 81 of file RinexNavData.hpp.

Member Function Documentation

◆ dump()

void gnsstk::RinexNavData::dump ( std::ostream &  s) const
virtual

A debug output function. Prints the PRN id and the IODC for this record. Interface stability: Volatile

Reimplemented from gnsstk::FFData.

Definition at line 153 of file RinexNavData.cpp.

◆ fixSF1xmitSOW()

static long gnsstk::RinexNavData::fixSF1xmitSOW ( unsigned long  sow)
inlinestatic

Round a given seconds of week down to the nearest possible subframe 1 transmit time.

Definition at line 107 of file RinexNavData.hpp.

◆ getBroadcastOrbit1()

void gnsstk::RinexNavData::getBroadcastOrbit1 ( const std::string &  currentLine)
private

Reads line 1 of the Nav Data record

Exceptions
StringUtils::StringException
FFStreamError

Definition at line 274 of file RinexNavData.cpp.

◆ getBroadcastOrbit2()

void gnsstk::RinexNavData::getBroadcastOrbit2 ( const std::string &  currentLine)
private

Reads line 2 of the Nav Data record

Exceptions
StringUtils::StringException
FFStreamError

Definition at line 291 of file RinexNavData.cpp.

◆ getBroadcastOrbit3()

void gnsstk::RinexNavData::getBroadcastOrbit3 ( const std::string &  currentLine)
private

Reads line 3 of the Nav Data record

Exceptions
StringUtils::StringException
FFStreamError

Definition at line 308 of file RinexNavData.cpp.

◆ getBroadcastOrbit4()

void gnsstk::RinexNavData::getBroadcastOrbit4 ( const std::string &  currentLine)
private

Reads line 4 of the Nav Data record

Exceptions
StringUtils::StringException
FFStreamError

Definition at line 325 of file RinexNavData.cpp.

◆ getBroadcastOrbit5()

void gnsstk::RinexNavData::getBroadcastOrbit5 ( const std::string &  currentLine)
private

Reads line 5 of the Nav Data record

Exceptions
StringUtils::StringException
FFStreamError

Definition at line 342 of file RinexNavData.cpp.

◆ getBroadcastOrbit6()

void gnsstk::RinexNavData::getBroadcastOrbit6 ( const std::string &  currentLine)
private

Reads line 6 of the Nav Data record

Exceptions
StringUtils::StringException
FFStreamError

Definition at line 365 of file RinexNavData.cpp.

◆ getBroadcastOrbit7()

void gnsstk::RinexNavData::getBroadcastOrbit7 ( const std::string &  currentLine)
private

Reads line 7 of the Nav Data record

Exceptions
StringUtils::StringException
FFStreamError

Definition at line 387 of file RinexNavData.cpp.

◆ getHOWTime()

CommonTime gnsstk::RinexNavData::getHOWTime ( ) const
inline

Get the handover word time as a CommonTime object.

Definition at line 180 of file RinexNavData.hpp.

◆ getHOWWS()

GPSWeekSecond gnsstk::RinexNavData::getHOWWS ( ) const
inline

Get the handover word time as a GPSWeekSecond object.

Definition at line 186 of file RinexNavData.hpp.

◆ getPRNEpoch()

void gnsstk::RinexNavData::getPRNEpoch ( const std::string &  currentLine)
private

Parses string currentLine to obtain PRN id and epoch.

Exceptions
StringUtils::StringException

Definition at line 227 of file RinexNavData.cpp.

◆ getTocTime()

CommonTime gnsstk::RinexNavData::getTocTime ( ) const
inlinenoexcept

Get the clock reference time, which for RINEX NAV is defined to be the epoch time of the record (RINEX 2.11 Table A4).

Definition at line 115 of file RinexNavData.hpp.

◆ getTocWS()

GPSWeekSecond gnsstk::RinexNavData::getTocWS ( ) const
inline

Get the clock reference time, which for RINEX NAV is defined to be the epoch time of the record (RINEX 2.11 Table A4).

Definition at line 123 of file RinexNavData.hpp.

◆ getToeTime()

CommonTime gnsstk::RinexNavData::getToeTime ( ) const
inline

Get the ephemeris reference time as a CommonTime object.

Definition at line 129 of file RinexNavData.hpp.

◆ getToeWS()

GPSWeekSecond gnsstk::RinexNavData::getToeWS ( ) const
inline

Get the ephemeris reference time as a GPSWeekSecond object.

Definition at line 135 of file RinexNavData.hpp.

◆ getXmitTime()

CommonTime gnsstk::RinexNavData::getXmitTime ( ) const
inline

Get the transmit time of subframe 1 as a CommonTime object.

Definition at line 141 of file RinexNavData.hpp.

◆ getXmitWS()

GPSWeekSecond gnsstk::RinexNavData::getXmitWS ( ) const

Get the transmit time of subframe 1 as a GPSWeekSecond object.

Definition at line 411 of file RinexNavData.cpp.

◆ isData()

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

RinexNavData is "data" so this function always returns true.

Reimplemented from gnsstk::FFData.

Definition at line 85 of file RinexNavData.hpp.

◆ operator EngEphemeris()

gnsstk::RinexNavData::operator EngEphemeris ( ) const
noexcept

Converts this RinexNavData to an EngEphemeris object.

Definition at line 163 of file RinexNavData.cpp.

◆ putBroadcastOrbit2()

std::string gnsstk::RinexNavData::putBroadcastOrbit2 ( ) const
private

Writes line 7 of the Nav Data record

Exceptions
StringUtils::StringException

◆ putBroadcastOrbit3()

std::string gnsstk::RinexNavData::putBroadcastOrbit3 ( ) const
private

Writes line 7 of the Nav Data record

Exceptions
StringUtils::StringException

◆ putBroadcastOrbit4()

std::string gnsstk::RinexNavData::putBroadcastOrbit4 ( ) const
private

Writes line 7 of the Nav Data record

Exceptions
StringUtils::StringException

◆ putBroadcastOrbit5()

std::string gnsstk::RinexNavData::putBroadcastOrbit5 ( ) const
private

Writes line 7 of the Nav Data record

Exceptions
StringUtils::StringException

◆ putBroadcastOrbit6()

std::string gnsstk::RinexNavData::putBroadcastOrbit6 ( ) const
private

Writes line 7 of the Nav Data record

Exceptions
StringUtils::StringException

◆ putBroadcastOrbit7()

std::string gnsstk::RinexNavData::putBroadcastOrbit7 ( const double  ver) const
private

Writes line 7 of the Nav Data record

Warning
Pass in version to decide wheter or not to write fit interval
Exceptions
StringUtils::StringException

◆ reallyGetRecord()

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

This function retrieves a RINEX NAV record from the given FFStream. If an error is encountered in reading from the stream, the stream is returned to its original position and its fail-bit is set.

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 107 of file RinexNavData.cpp.

◆ reallyPutRecord()

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

Outputs the record to the FFStream s.

Exceptions
std::exception
FFStreamError
StringUtils::StringException

Implements gnsstk::FFData.

Definition at line 87 of file RinexNavData.cpp.

◆ setXmitTime() [1/2]

RinexNavData& gnsstk::RinexNavData::setXmitTime ( unsigned long  sow)
inline

Set the sf1XmitTime field using a seconds-of-week value. The value may be a HOW time or perhaps even wildly inaccurate. This method will adjust the sf1XmitTime such that it actually corresponds to the (rounded down) seconds of week that would be correct for a subframe 1. If the specified value is a seconds of week that would already correspond to a sf1 transmit time, it is unaltered.

Definition at line 158 of file RinexNavData.hpp.

◆ setXmitTime() [2/2]

RinexNavData & gnsstk::RinexNavData::setXmitTime ( unsigned short  fullweek,
unsigned long  sow 
)

Set the transmit time, including week and second of week.

Precondition
Toe must be set.

Definition at line 478 of file RinexNavData.cpp.

◆ setXmitWeek()

RinexNavData & gnsstk::RinexNavData::setXmitWeek ( unsigned short  fullweek)

Set the transmit week. Internally, sets the Toe week using half-week tests based on the transmit time and toe.

Precondition
Toe and sf1XmitTime must be set.

Definition at line 442 of file RinexNavData.cpp.

◆ stableText()

std::string gnsstk::RinexNavData::stableText ( ) const
virtual

Returns a string representation of the data in this record. Interface stability: Committed

Definition at line 142 of file RinexNavData.cpp.

◆ toList()

list< double > gnsstk::RinexNavData::toList ( ) const

Converts the (non-CommonTime) data to a list for easy comparison operators.

Definition at line 187 of file RinexNavData.cpp.

Member Data Documentation

◆ accuracy

RNDouble gnsstk::RinexNavData::accuracy

SV accuracy (m).

Definition at line 207 of file RinexNavData.hpp.

◆ af0

RNDouble gnsstk::RinexNavData::af0

SV clock error (sec).

Definition at line 217 of file RinexNavData.hpp.

◆ af1

RNDouble gnsstk::RinexNavData::af1

SV clock drift (sec/sec).

Definition at line 218 of file RinexNavData.hpp.

◆ af2

RNDouble gnsstk::RinexNavData::af2

SV clock drift rate (sec/sec**2).

Definition at line 219 of file RinexNavData.hpp.

◆ Ahalf

RNDouble gnsstk::RinexNavData::Ahalf

SQRT of semi-major axis (m**1/2).

Definition at line 241 of file RinexNavData.hpp.

◆ Cic

RNDouble gnsstk::RinexNavData::Cic

Cosine inclination (rad).

Definition at line 230 of file RinexNavData.hpp.

◆ Cis

RNDouble gnsstk::RinexNavData::Cis

Sine inclination (rad).

Definition at line 231 of file RinexNavData.hpp.

◆ codeflgs

short gnsstk::RinexNavData::codeflgs

L2 codes.

Definition at line 206 of file RinexNavData.hpp.

◆ Crc

RNDouble gnsstk::RinexNavData::Crc

Cosine radius (m).

Definition at line 228 of file RinexNavData.hpp.

◆ Crs

RNDouble gnsstk::RinexNavData::Crs

Sine radius (m).

Definition at line 229 of file RinexNavData.hpp.

◆ Cuc

RNDouble gnsstk::RinexNavData::Cuc

Cosine latitude (rad).

Definition at line 226 of file RinexNavData.hpp.

◆ Cus

RNDouble gnsstk::RinexNavData::Cus

Sine latitude (rad).

Definition at line 227 of file RinexNavData.hpp.

◆ dn

RNDouble gnsstk::RinexNavData::dn

Correction to mean motion (rad/sec).

Definition at line 239 of file RinexNavData.hpp.

◆ ecc

RNDouble gnsstk::RinexNavData::ecc

Eccentricity.

Definition at line 240 of file RinexNavData.hpp.

◆ fitint

RNDouble gnsstk::RinexNavData::fitint

Fit interval.

Definition at line 247 of file RinexNavData.hpp.

◆ health

short gnsstk::RinexNavData::health

SV health.

Definition at line 208 of file RinexNavData.hpp.

◆ i0

RNDouble gnsstk::RinexNavData::i0

Inclination (rad).

Definition at line 243 of file RinexNavData.hpp.

◆ idot

RNDouble gnsstk::RinexNavData::idot

Rate of inclination angle (rad/sec).

Definition at line 246 of file RinexNavData.hpp.

◆ IODC

RNDouble gnsstk::RinexNavData::IODC

Index of data-clock.

Definition at line 210 of file RinexNavData.hpp.

◆ IODE

RNDouble gnsstk::RinexNavData::IODE

Index of data-eph.

Definition at line 211 of file RinexNavData.hpp.

◆ L2Pdata

short gnsstk::RinexNavData::L2Pdata

L2 P data flag.

Definition at line 209 of file RinexNavData.hpp.

◆ M0

RNDouble gnsstk::RinexNavData::M0

Mean anomaly (rad).

Definition at line 238 of file RinexNavData.hpp.

◆ OMEGA0

RNDouble gnsstk::RinexNavData::OMEGA0

Rt ascension of ascending node (rad).

Definition at line 242 of file RinexNavData.hpp.

◆ OMEGAdot

RNDouble gnsstk::RinexNavData::OMEGAdot

Rate of Rt ascension (rad/sec).

Definition at line 245 of file RinexNavData.hpp.

◆ PRNID

short gnsstk::RinexNavData::PRNID

SV PRN ID.

Definition at line 199 of file RinexNavData.hpp.

◆ sf1XmitTime

long gnsstk::RinexNavData::sf1XmitTime

Transmit time (seconds of week) of SF 1.

Definition at line 200 of file RinexNavData.hpp.

◆ Tgd

RNDouble gnsstk::RinexNavData::Tgd

Group delay differential (sec).

Definition at line 220 of file RinexNavData.hpp.

◆ time

CommonTime gnsstk::RinexNavData::time

Clock reference time (toc).

Definition at line 198 of file RinexNavData.hpp.

◆ Toe

RNDouble gnsstk::RinexNavData::Toe

Ephemeris epoch (sec of week).

Definition at line 237 of file RinexNavData.hpp.

◆ toeWeek

short gnsstk::RinexNavData::toeWeek

The full GPS week associated with Toe.

Definition at line 205 of file RinexNavData.hpp.

◆ w

RNDouble gnsstk::RinexNavData::w

Argument of perigee (rad).

Definition at line 244 of file RinexNavData.hpp.


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


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