CNAVClock Class Reference
[Ephemeris calculations]

#include <CNAVClock.hpp>

Inheritance diagram for CNAVClock:

Inheritance graph
[legend]
Collaboration diagram for CNAVClock:

Collaboration graph
[legend]
List of all members.

Detailed Description

Clock information for a single satellite.

This class encapsulates the clock navigation message (message types 30-37) and provides functions to decode the as-broadcast clock corrections.

Definition at line 70 of file CNAVClock.hpp.

Public Member Functions

 CNAVClock () throw ()
 Default constructor.
virtual ~CNAVClock ()
 Destructor.
void loadData (const ObsID obsIDArg, const short PRNIDArg, const short TOWWeekArg, const PackedNavBits message3_) throw (gpstk::InvalidParameter)
 Store a subframe in this object.
void loadData (const std::string satSysArg, const ObsID obsIDArg, const short PRNIDArg, const short AlertMsgArg, const long TOWMsgArg, const short TOWWeekArg, const long TopArg, const long TocArg, const double accuracyArg, const short URAocArg, const short URAoc1Arg, const short URAoc2Arg, const double af0Arg, const double af1Arg, const double af2Arg)
 Store data in the object In this case, the data may come from a file or other source and the navigation message format may no longer be present.
bool hasData ()
 Query presence of message number in this object.
CommonTime getTransmitTime () const throw (gpstk::InvalidRequest)
 Returns the transmit time from the ephemeris.
CommonTime getTimeOfPrediction () const throw (gpstk::InvalidRequest)
 Returns the time of prediction.
CommonTime getClockEpoch () const throw (gpstk::InvalidRequest)
 Returns the epoch time (time of clock) from this ephemeris, correcting for half weeks.
short getPRNID () const throw (gpstk::InvalidRequest)
 This function returns the PRN ID of the SV.
short getAlert () const throw (gpstk::InvalidRequest)
 This function returns the alert flag.
double getAccuracy (const CommonTime &t) const throw (gpstk::InvalidRequest)
 This function returns the value of the SV accuracy (m) computed from the accuracy flag in the nav message, or as set by the setAccuracy() method.
short getURAoc (const short ndx) const throw (gpstk::InvalidRequest,InvalidParameter)
 This function returns the SV accuracy index as it appears in the nav message.
long getTop () const throw (gpstk::InvalidRequest)
 This function returns the time of prediction in GPS seconds of week.
double getToc () const throw (gpstk::InvalidRequest)
 This function returns the clock epoch in GPS seconds of week.
double svClockBias (const CommonTime &t) const throw ( gpstk::InvalidRequest )
 Compute the satellite clock bias (sec) at the given time
Exceptions:
InvalidRequest if a required message type has not been stored.

double svClockDrift (const CommonTime &t) const throw ( gpstk::InvalidRequest )
 Compute the satellite clock drift (sec/sec) at the given time
Exceptions:
InvalidRequest if a required message type has not been stored.

BrcClockCorrection getClock () const throw (gpstk::InvalidRequest)
 Return the clock parameter object.
void dump (std::ostream &s=std::cout) const throw ()
 Output the contents of this ephemeris to the given stream.

Protected Attributes

bool dataLoaded
 True if data is present, False otherwise.
std::string satSys
 System ID (based on RINEX definitins).
ObsID obsID
 Defines carrier and code tracked.
short PRNID
 SV PRN ID.
short Alert
 "alert" flags for each subframe
long TOWCount
 TOW count associated with message 10/11.
long Top
 Time of Preditcion.
double Toc
 Clock epoch (sec of week).
short TOWWeek
 GPS full week number that corresponds to the TOWtime of Message Type 10.
BrcClockCorrection bcClock

Friends

std::ostream & operator<< (std::ostream &s, const CNAVClock &eph)


Constructor & Destructor Documentation

CNAVClock  )  throw ()
 

Default constructor.

Definition at line 56 of file CNAVClock.cpp.

References CNAVClock::Alert, CNAVClock::dataLoaded, CNAVClock::PRNID, CNAVClock::satSys, CNAVClock::Toc, CNAVClock::Top, CNAVClock::TOWCount, and CNAVClock::TOWWeek.

virtual ~CNAVClock  )  [inline, virtual]
 

Destructor.

Definition at line 77 of file CNAVClock.hpp.


Member Function Documentation

void dump std::ostream &  s = std::cout  )  const throw ()
 

Output the contents of this ephemeris to the given stream.

Reimplemented from PackedNavBits.

Definition at line 356 of file CNAVClock.cpp.

Referenced by gpstk::operator<<().

double getAccuracy const CommonTime t  )  const throw (gpstk::InvalidRequest)
 

This function returns the value of the SV accuracy (m) computed from the accuracy flag in the nav message, or as set by the setAccuracy() method.

Definition at line 241 of file CNAVClock.cpp.

References GPSTK_THROW.

short getAlert  )  const throw (gpstk::InvalidRequest)
 

This function returns the alert flag.

Definition at line 230 of file CNAVClock.cpp.

References GPSTK_THROW.

BrcClockCorrection getClock  )  const throw (gpstk::InvalidRequest)
 

Return the clock parameter object.

Definition at line 285 of file CNAVClock.cpp.

References CNAVClock::bcClock, GPSTK_THROW, and BrcClockCorrection::hasData().

CommonTime getClockEpoch  )  const throw (gpstk::InvalidRequest)
 

Returns the epoch time (time of clock) from this ephemeris, correcting for half weeks.

Definition at line 169 of file CNAVClock.cpp.

References GPSTK_THROW, CNAVClock::satSys, and CNAVClock::Toc.

short getPRNID  )  const throw (gpstk::InvalidRequest)
 

This function returns the PRN ID of the SV.

Definition at line 219 of file CNAVClock.cpp.

References GPSTK_THROW.

CommonTime getTimeOfPrediction  )  const throw (gpstk::InvalidRequest)
 

Returns the time of prediction.

Definition at line 201 of file CNAVClock.cpp.

References GPSTK_THROW, CNAVClock::Top, CNAVClock::TOWCount, and CNAVClock::TOWWeek.

double getToc  )  const throw (gpstk::InvalidRequest)
 

This function returns the clock epoch in GPS seconds of week.

Definition at line 274 of file CNAVClock.cpp.

References GPSTK_THROW.

long getTop  )  const throw (gpstk::InvalidRequest)
 

This function returns the time of prediction in GPS seconds of week.

Definition at line 263 of file CNAVClock.cpp.

References GPSTK_THROW.

CommonTime getTransmitTime  )  const throw (gpstk::InvalidRequest)
 

Returns the transmit time from the ephemeris.

Reimplemented from PackedNavBits.

Definition at line 189 of file CNAVClock.cpp.

References GPSWeekSecond::convertToCommonTime(), GPSTK_THROW, CNAVClock::TOWCount, and CNAVClock::TOWWeek.

short getURAoc const short  ndx  )  const throw (gpstk::InvalidRequest,InvalidParameter)
 

This function returns the SV accuracy index as it appears in the nav message.

Definition at line 252 of file CNAVClock.cpp.

References GPSTK_THROW.

bool hasData  ) 
 

Query presence of message number in this object.

Returns:
true if the necessary data is present in this object.

Definition at line 142 of file CNAVClock.cpp.

void loadData const std::string  satSysArg,
const ObsID  obsIDArg,
const short  PRNIDArg,
const short  AlertMsgArg,
const long  TOWMsgArg,
const short  TOWWeekArg,
const long  TopArg,
const long  TocArg,
const double  accuracyArg,
const short  URAocArg,
const short  URAoc1Arg,
const short  URAoc2Arg,
const double  af0Arg,
const double  af1Arg,
const double  af2Arg
 

Store data in the object In this case, the data may come from a file or other source and the navigation message format may no longer be present.

Definition at line 68 of file CNAVClock.cpp.

References CNAVClock::Alert, ObsID::band, CNAVClock::bcClock, ObsID::code, CNAVClock::dataLoaded, BrcClockCorrection::loadData(), CNAVClock::obsID, CNAVClock::PRNID, CNAVClock::satSys, CNAVClock::Toc, CNAVClock::Top, CNAVClock::TOWCount, and CNAVClock::TOWWeek.

void loadData const ObsID  obsIDArg,
const short  PRNIDArg,
const short  TOWWeekArg,
const PackedNavBits  message3_
throw (gpstk::InvalidParameter)
 

Store a subframe in this object.

Parameters:
OsbID identifies the carrier and code from which the message was obtained.
message3_ ten word navigation message stored in the 30 least-significant bits of each array index.
Returns:
true if successful.
Exceptions:
InvalidParameter if message data is invalid
Note that a couple of items not in the legacy message are included in the message: PRN ID and 13 bit (full) week number.

Definition at line 109 of file CNAVClock.cpp.

References BrcClockCorrection::loadData().

double svClockBias const CommonTime t  )  const throw ( gpstk::InvalidRequest )
 

Compute the satellite clock bias (sec) at the given time

Exceptions:
InvalidRequest if a required message type has not been stored.

Definition at line 147 of file CNAVClock.cpp.

References GPSTK_THROW, and BrcClockCorrection::svClockBias().

double svClockDrift const CommonTime t  )  const throw ( gpstk::InvalidRequest )
 

Compute the satellite clock drift (sec/sec) at the given time

Exceptions:
InvalidRequest if a required message type has not been stored.

Definition at line 158 of file CNAVClock.cpp.

References GPSTK_THROW, and BrcClockCorrection::svClockDrift().


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  s,
const CNAVClock eph
[friend]
 


Member Data Documentation

short Alert [protected]
 

"alert" flags for each subframe

Definition at line 171 of file CNAVClock.hpp.

Referenced by CNAVClock::CNAVClock(), and CNAVClock::loadData().

BrcClockCorrection bcClock [protected]
 

Definition at line 181 of file CNAVClock.hpp.

Referenced by CNAVClock::getClock(), and CNAVClock::loadData().

bool dataLoaded [protected]
 

True if data is present, False otherwise.

Definition at line 167 of file CNAVClock.hpp.

Referenced by CNAVClock::CNAVClock(), and CNAVClock::loadData().

ObsID obsID [protected]
 

Defines carrier and code tracked.

Reimplemented from PackedNavBits.

Definition at line 169 of file CNAVClock.hpp.

Referenced by CNAVClock::loadData().

short PRNID [protected]
 

SV PRN ID.

Definition at line 170 of file CNAVClock.hpp.

Referenced by CNAVClock::CNAVClock(), and CNAVClock::loadData().

std::string satSys [protected]
 

System ID (based on RINEX definitins).

Reimplemented from PackedNavBits.

Definition at line 168 of file CNAVClock.hpp.

Referenced by CNAVClock::CNAVClock(), CNAVClock::getClockEpoch(), and CNAVClock::loadData().

double Toc [protected]
 

Clock epoch (sec of week).

Definition at line 174 of file CNAVClock.hpp.

Referenced by CNAVClock::CNAVClock(), CNAVClock::getClockEpoch(), and CNAVClock::loadData().

long Top [protected]
 

Time of Preditcion.

Definition at line 173 of file CNAVClock.hpp.

Referenced by CNAVClock::CNAVClock(), CNAVClock::getTimeOfPrediction(), and CNAVClock::loadData().

long TOWCount [protected]
 

TOW count associated with message 10/11.

Definition at line 172 of file CNAVClock.hpp.

Referenced by CNAVClock::CNAVClock(), CNAVClock::getTimeOfPrediction(), CNAVClock::getTransmitTime(), and CNAVClock::loadData().

short TOWWeek [protected]
 

GPS full week number that corresponds to the TOWtime of Message Type 10.

Definition at line 175 of file CNAVClock.hpp.

Referenced by CNAVClock::CNAVClock(), CNAVClock::getTimeOfPrediction(), CNAVClock::getTransmitTime(), and CNAVClock::loadData().


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