Clock correction information for a single satellite. This class encapsulates the clock correction parameters in any of several navigation message formats (basically those that use Keplerian elements for the orbits), provides functions to decode the as-broadcast bit-encodings, and generate SV clock corrections as a function of time.
Note: Relativistic correction is NOT included, see BrcKeplerOrbit.
Definition at line 76 of file BrcClockCorrection.hpp.
#include <BrcClockCorrection.hpp>
Public Member Functions | |
BrcClockCorrection () noexcept | |
Default constructor. More... | |
BrcClockCorrection (const ObsID obsIDArg, const short PRNID, const short fullweeknum, const long subframe1[10]) | |
Legacy GPS Subframe 1. More... | |
BrcClockCorrection (const std::string satSysArg, const ObsID obsIDArg, const short PRNIDArg, const CommonTime TocArg, const CommonTime TopArg, const short URAocArg, const short URAoc1Arg, const short URAoc2Arg, const bool healthyArg, const double af0Arg, const double af1Arg, const double af2Arg) | |
General purpose constructor. More... | |
void | dump (std::ostream &s=std::cout) const |
double | getAccuracy (const CommonTime &t) const |
double | getAf0 () const |
double | getAf1 () const |
double | getAf2 () const |
CommonTime | getEpochTime () const |
short | getFullWeek () const |
ObsID | getObsID () const |
short | getPRNID () const |
double | getToc () const |
short | getURAoc (const short &ndx) const |
bool | hasData () const |
void | loadData (const ObsID obsIDArg, const short PRNID, const short fullweeknum, const long subframe1[10]) |
void | loadData (const std::string satSysArg, const ObsID obsIDArg, const short PRNIDArg, const CommonTime TocArg, const CommonTime TopArg, const short URAocArg, const short URAoc1Arg, const short URAoc2Arg, const bool healthyArg, const double af0Arg, const double af1Arg, const double af2Arg) |
void | loadData (const std::string satSysArg, const ObsID obsIDArg, const short PRNIDArg, const CommonTime TocArg, const short URAocArg, const bool healthyArg, const double af0Arg, const double af1Arg, const double af2Arg) |
bool | operator!= (const BrcClockCorrection &right) const noexcept |
bool | operator== (const BrcClockCorrection &right) const noexcept |
double | svClockBias (const CommonTime &t) const |
double | svClockBiasM (const CommonTime &t) const |
double | svClockDrift (const CommonTime &t) const |
virtual | ~BrcClockCorrection () |
Destructor. More... | |
![]() | |
EngNav () noexcept | |
default constructor More... | |
virtual | ~EngNav () |
destructor More... | |
Protected Attributes | |
Overhead information | |
bool | dataLoaded |
std::string | satSys |
ObsID | obsID |
short | PRNID |
CommonTime | Toc |
CommonTime | Top |
short | URAoc |
short | URAoc1 |
short | URAoc2 |
bool | healthy |
Clock information | |
double | af0 |
double | af1 |
double | af2 |
class | ::BrcClockCorrection_T |
std::ostream & | operator<< (std::ostream &s, const BrcClockCorrection &eph) |
Additional Inherited Members | |
![]() | |
enum | BitConvertType { BITS8 = 0, BITS10 = 1 } |
This enumeration is used by the convertXBit() method. More... | |
![]() | |
static bool | checkParity (const std::vector< uint32_t > &v, bool knownUpright=true) |
static bool | checkParity (const uint32_t input[10], bool knownUpright=true) |
static uint32_t | computeParity (uint32_t sfword, uint32_t psfword, bool knownUpright=true) |
static bool | convert10bit (int gpsWeek, double *out) noexcept |
static bool | convert8bit (int gpsWeek, double *out) noexcept |
static short | convertXBit (short fullGPSWeek, short incompleteGPSWeek, BitConvertType type) |
static void | dump (std::ostream &s=std::cout) |
static uint32_t | fixParity (uint32_t sfword, uint32_t psfword, bool nib, bool knownUpright=true) |
static uint32_t | getd29 (uint32_t sfword) |
Get bit 29 from the given subframe word. More... | |
static uint32_t | getd30 (uint32_t sfword) |
static unsigned long | getHOWTime (uint32_t word2) |
Get the HOW time from the provided HOW. More... | |
static bool | getNMCTValidity (const uint32_t sf2[10], unsigned howWeek, NMCTMeta &meta) |
static bool | getNMCTValidity (const uint32_t sf2[10], unsigned howWeek, uint32_t &aodo, CommonTime &tnmct, CommonTime &toe, CommonTime &tot) |
static short | getSFID (uint32_t word2) |
Get the subframe ID from the provided HOW. More... | |
static short | getSubframePattern (const long input[10]) noexcept |
static short | getSubframePattern (const uint32_t input[10]) noexcept |
static unsigned long | getTOW (uint32_t word2) |
Get the TOW count from the provided HOW. More... | |
static bool | sfpage2svid (short subframe, short page, short &svpgid) noexcept |
static bool | subframeConvert (const long input[10], int gpsWeek, double output[60]) noexcept |
static bool | subframeConvert (const uint32_t input[10], short gpsWeek, double output[60]) noexcept |
static bool | subframeParity (const long input[10]) |
This is the old routine only left around for compatibility. More... | |
static bool | sv2page (short svpgid, short &subframe, short &page) noexcept |
static bool | zcount2page (unsigned long zcount, short &subframe, short &page) noexcept |
|
noexcept |
Default constructor.
Definition at line 54 of file BrcClockCorrection.cpp.
gnsstk::BrcClockCorrection::BrcClockCorrection | ( | const std::string | satSysArg, |
const ObsID | obsIDArg, | ||
const short | PRNIDArg, | ||
const CommonTime | TocArg, | ||
const CommonTime | TopArg, | ||
const short | URAocArg, | ||
const short | URAoc1Arg, | ||
const short | URAoc2Arg, | ||
const bool | healthyArg, | ||
const double | af0Arg, | ||
const double | af1Arg, | ||
const double | af2Arg | ||
) |
General purpose constructor.
Definition at line 70 of file BrcClockCorrection.cpp.
gnsstk::BrcClockCorrection::BrcClockCorrection | ( | const ObsID | obsIDArg, |
const short | PRNID, | ||
const short | fullweeknum, | ||
const long | subframe1[10] | ||
) |
Legacy GPS Subframe 1.
Legacy GPS Subframe 1-3.
Definition at line 88 of file BrcClockCorrection.cpp.
|
inlinevirtual |
Destructor.
Definition at line 97 of file BrcClockCorrection.hpp.
void gnsstk::BrcClockCorrection::dump | ( | std::ostream & | s = std::cout | ) | const |
Output the contents of this ephemeris to the given stream.
Definition at line 411 of file BrcClockCorrection.cpp.
double gnsstk::BrcClockCorrection::getAccuracy | ( | const CommonTime & | t | ) | const |
This function returns the value of the SV accuracy (m) computed from the accuracy flag in the nav message.
InvalidRequest |
Definition at line 280 of file BrcClockCorrection.cpp.
double gnsstk::BrcClockCorrection::getAf0 | ( | ) | const |
This function returns the SV clock error in seconds.
InvalidRequest |
Definition at line 322 of file BrcClockCorrection.cpp.
double gnsstk::BrcClockCorrection::getAf1 | ( | ) | const |
This function returns the SV clock drift in seconds/seconds.
InvalidRequest |
Definition at line 332 of file BrcClockCorrection.cpp.
double gnsstk::BrcClockCorrection::getAf2 | ( | ) | const |
This function returns the SV clock rate of change of the drift in seconds/(seconds*seconds).
InvalidRequest |
Definition at line 342 of file BrcClockCorrection.cpp.
CommonTime gnsstk::BrcClockCorrection::getEpochTime | ( | ) | const |
Returns the epoch time (time of clock) from this ephemeris, correcting for half weeks and HOW time.
InvalidRequest |
Definition at line 221 of file BrcClockCorrection.cpp.
short gnsstk::BrcClockCorrection::getFullWeek | ( | ) | const |
Returns SV health status. This function return the GPS week number for the orbit. This is the full GPS week (ie > 10 bits).
InvalidRequest |
Definition at line 269 of file BrcClockCorrection.cpp.
ObsID gnsstk::BrcClockCorrection::getObsID | ( | ) | const |
This function returns the OBS ID of the clock correction.
InvalidRequest |
Definition at line 259 of file BrcClockCorrection.cpp.
short gnsstk::BrcClockCorrection::getPRNID | ( | ) | const |
This function returns the PRN ID of the SV.
InvalidRequest |
Definition at line 249 of file BrcClockCorrection.cpp.
double gnsstk::BrcClockCorrection::getToc | ( | ) | const |
This function returns the clock epoch in GPS seconds of week.
InvalidRequest |
Definition at line 311 of file BrcClockCorrection.cpp.
short gnsstk::BrcClockCorrection::getURAoc | ( | const short & | ndx | ) | const |
InvalidRequest |
Definition at line 298 of file BrcClockCorrection.cpp.
bool gnsstk::BrcClockCorrection::hasData | ( | ) | const |
Query presence of data in this object.
Definition at line 216 of file BrcClockCorrection.cpp.
void gnsstk::BrcClockCorrection::loadData | ( | const ObsID | obsIDArg, |
const short | PRNID, | ||
const short | fullweeknum, | ||
const long | subframe1[10] | ||
) |
Load data based on the GPS Legacy message.
InvalidParameter |
Definition at line 163 of file BrcClockCorrection.cpp.
void gnsstk::BrcClockCorrection::loadData | ( | const std::string | satSysArg, |
const ObsID | obsIDArg, | ||
const short | PRNIDArg, | ||
const CommonTime | TocArg, | ||
const CommonTime | TopArg, | ||
const short | URAocArg, | ||
const short | URAoc1Arg, | ||
const short | URAoc2Arg, | ||
const bool | healthyArg, | ||
const double | af0Arg, | ||
const double | af1Arg, | ||
const double | af2Arg | ||
) |
General purpose means to load data into object.
Definition at line 135 of file BrcClockCorrection.cpp.
void gnsstk::BrcClockCorrection::loadData | ( | const std::string | satSysArg, |
const ObsID | obsIDArg, | ||
const short | PRNIDArg, | ||
const CommonTime | TocArg, | ||
const short | URAocArg, | ||
const bool | healthyArg, | ||
const double | af0Arg, | ||
const double | af1Arg, | ||
const double | af2Arg | ||
) |
Load data based on the GPS Legacy message.
Definition at line 117 of file BrcClockCorrection.cpp.
|
inlinenoexcept |
Definition at line 100 of file BrcClockCorrection.hpp.
|
noexcept |
Definition at line 97 of file BrcClockCorrection.cpp.
double gnsstk::BrcClockCorrection::svClockBias | ( | const CommonTime & | t | ) | const |
Compute the satellite clock bias (sec) at the given time
InvalidRequest | if a required subframe has not been stored. |
Definition at line 226 of file BrcClockCorrection.cpp.
double gnsstk::BrcClockCorrection::svClockBiasM | ( | const CommonTime & | t | ) | const |
Compute the satellite clock bias (meters) at the given time
InvalidRequest | if a required subframe has not been stored. |
Definition at line 234 of file BrcClockCorrection.cpp.
double gnsstk::BrcClockCorrection::svClockDrift | ( | const CommonTime & | t | ) | const |
Compute the satellite clock drift (sec/sec) at the given time
InvalidRequest | if a required subframe has not been stored. |
Definition at line 241 of file BrcClockCorrection.cpp.
|
friend |
Definition at line 236 of file BrcClockCorrection.hpp.
|
friend |
|
protected |
SV clock error (sec)
Definition at line 231 of file BrcClockCorrection.hpp.
|
protected |
SV clock drift (sec/sec)
Definition at line 232 of file BrcClockCorrection.hpp.
|
protected |
SV clock drift rate (sec/sec**2)
Definition at line 233 of file BrcClockCorrection.hpp.
|
protected |
True if data is present, false otherwise
Definition at line 216 of file BrcClockCorrection.hpp.
|
protected |
SV health
Definition at line 225 of file BrcClockCorrection.hpp.
|
protected |
Defines carrier and tracking code
Definition at line 218 of file BrcClockCorrection.hpp.
|
protected |
SV PRN ID
Definition at line 219 of file BrcClockCorrection.hpp.
|
protected |
Rinex satellite system ID
Definition at line 217 of file BrcClockCorrection.hpp.
|
protected |
Definition at line 220 of file BrcClockCorrection.hpp.
|
protected |
Definition at line 221 of file BrcClockCorrection.hpp.
|
protected |
Definition at line 222 of file BrcClockCorrection.hpp.
|
protected |
Definition at line 223 of file BrcClockCorrection.hpp.
|
protected |
Definition at line 224 of file BrcClockCorrection.hpp.