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

Detailed Description

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>

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

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...
 
- Public Member Functions inherited from gnsstk::EngNav
 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

- Public Types inherited from gnsstk::EngNav
enum  BitConvertType { BITS8 = 0, BITS10 = 1 }
 This enumeration is used by the convertXBit() method. More...
 
- Static Public Member Functions inherited from gnsstk::EngNav
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
 

Constructor & Destructor Documentation

◆ BrcClockCorrection() [1/3]

gnsstk::BrcClockCorrection::BrcClockCorrection ( )
noexcept

Default constructor.

Definition at line 54 of file BrcClockCorrection.cpp.

◆ BrcClockCorrection() [2/3]

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.

◆ BrcClockCorrection() [3/3]

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.

◆ ~BrcClockCorrection()

virtual gnsstk::BrcClockCorrection::~BrcClockCorrection ( )
inlinevirtual

Destructor.

Definition at line 97 of file BrcClockCorrection.hpp.

Member Function Documentation

◆ dump()

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.

◆ getAccuracy()

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.

Exceptions
InvalidRequest

Definition at line 280 of file BrcClockCorrection.cpp.

◆ getAf0()

double gnsstk::BrcClockCorrection::getAf0 ( ) const

This function returns the SV clock error in seconds.

Exceptions
InvalidRequest

Definition at line 322 of file BrcClockCorrection.cpp.

◆ getAf1()

double gnsstk::BrcClockCorrection::getAf1 ( ) const

This function returns the SV clock drift in seconds/seconds.

Exceptions
InvalidRequest

Definition at line 332 of file BrcClockCorrection.cpp.

◆ getAf2()

double gnsstk::BrcClockCorrection::getAf2 ( ) const

This function returns the SV clock rate of change of the drift in seconds/(seconds*seconds).

Exceptions
InvalidRequest

Definition at line 342 of file BrcClockCorrection.cpp.

◆ getEpochTime()

CommonTime gnsstk::BrcClockCorrection::getEpochTime ( ) const

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

Exceptions
InvalidRequest

Definition at line 221 of file BrcClockCorrection.cpp.

◆ getFullWeek()

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).

Exceptions
InvalidRequest

Definition at line 269 of file BrcClockCorrection.cpp.

◆ getObsID()

ObsID gnsstk::BrcClockCorrection::getObsID ( ) const

This function returns the OBS ID of the clock correction.

Exceptions
InvalidRequest

Definition at line 259 of file BrcClockCorrection.cpp.

◆ getPRNID()

short gnsstk::BrcClockCorrection::getPRNID ( ) const

This function returns the PRN ID of the SV.

Exceptions
InvalidRequest

Definition at line 249 of file BrcClockCorrection.cpp.

◆ getToc()

double gnsstk::BrcClockCorrection::getToc ( ) const

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

Exceptions
InvalidRequest

Definition at line 311 of file BrcClockCorrection.cpp.

◆ getURAoc()

short gnsstk::BrcClockCorrection::getURAoc ( const short &  ndx) const
Exceptions
InvalidRequest

Definition at line 298 of file BrcClockCorrection.cpp.

◆ hasData()

bool gnsstk::BrcClockCorrection::hasData ( ) const

Query presence of data in this object.

Returns
true if data has been loaded in this object.

Definition at line 216 of file BrcClockCorrection.cpp.

◆ loadData() [1/3]

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.

Exceptions
InvalidParameter

Definition at line 163 of file BrcClockCorrection.cpp.

◆ loadData() [2/3]

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.

◆ loadData() [3/3]

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.

◆ operator!=()

bool gnsstk::BrcClockCorrection::operator!= ( const BrcClockCorrection right) const
inlinenoexcept

Definition at line 100 of file BrcClockCorrection.hpp.

◆ operator==()

bool gnsstk::BrcClockCorrection::operator== ( const BrcClockCorrection right) const
noexcept

Definition at line 97 of file BrcClockCorrection.cpp.

◆ svClockBias()

double gnsstk::BrcClockCorrection::svClockBias ( const CommonTime t) const

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

Exceptions
InvalidRequestif a required subframe has not been stored.

Definition at line 226 of file BrcClockCorrection.cpp.

◆ svClockBiasM()

double gnsstk::BrcClockCorrection::svClockBiasM ( const CommonTime t) const

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

Exceptions
InvalidRequestif a required subframe has not been stored.

Definition at line 234 of file BrcClockCorrection.cpp.

◆ svClockDrift()

double gnsstk::BrcClockCorrection::svClockDrift ( const CommonTime t) const

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

Exceptions
InvalidRequestif a required subframe has not been stored.

Definition at line 241 of file BrcClockCorrection.cpp.

Friends And Related Function Documentation

◆ ::BrcClockCorrection_T

friend class ::BrcClockCorrection_T
friend

Definition at line 236 of file BrcClockCorrection.hpp.

◆ operator<<

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

Member Data Documentation

◆ af0

double gnsstk::BrcClockCorrection::af0
protected

SV clock error (sec)

Definition at line 231 of file BrcClockCorrection.hpp.

◆ af1

double gnsstk::BrcClockCorrection::af1
protected

SV clock drift (sec/sec)

Definition at line 232 of file BrcClockCorrection.hpp.

◆ af2

double gnsstk::BrcClockCorrection::af2
protected

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

Definition at line 233 of file BrcClockCorrection.hpp.

◆ dataLoaded

bool gnsstk::BrcClockCorrection::dataLoaded
protected

True if data is present, false otherwise

Definition at line 216 of file BrcClockCorrection.hpp.

◆ healthy

bool gnsstk::BrcClockCorrection::healthy
protected

SV health

Definition at line 225 of file BrcClockCorrection.hpp.

◆ obsID

ObsID gnsstk::BrcClockCorrection::obsID
protected

Defines carrier and tracking code

Definition at line 218 of file BrcClockCorrection.hpp.

◆ PRNID

short gnsstk::BrcClockCorrection::PRNID
protected

SV PRN ID

Definition at line 219 of file BrcClockCorrection.hpp.

◆ satSys

std::string gnsstk::BrcClockCorrection::satSys
protected

Rinex satellite system ID

Definition at line 217 of file BrcClockCorrection.hpp.

◆ Toc

CommonTime gnsstk::BrcClockCorrection::Toc
protected

Definition at line 220 of file BrcClockCorrection.hpp.

◆ Top

CommonTime gnsstk::BrcClockCorrection::Top
protected

Definition at line 221 of file BrcClockCorrection.hpp.

◆ URAoc

short gnsstk::BrcClockCorrection::URAoc
protected

Definition at line 222 of file BrcClockCorrection.hpp.

◆ URAoc1

short gnsstk::BrcClockCorrection::URAoc1
protected

Definition at line 223 of file BrcClockCorrection.hpp.

◆ URAoc2

short gnsstk::BrcClockCorrection::URAoc2
protected

Definition at line 224 of file BrcClockCorrection.hpp.


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


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