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

Detailed Description

Ephemeris information for a single satellite. This class encapsulates the ephemeris navigation message (subframes 1-3) and provides functions to decode the as-broadcast ephemerides.

Definition at line 86 of file EngEphemeris.hpp.

#include <EngEphemeris.hpp>

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

Public Member Functions

bool addIncompleteSF1Thru3 (const uint32_t sf1[8], const uint32_t sf2[8], const uint32_t sf3[8], const long sf1TransmitSOW, const int gpsWeek, const short PRN, const short track)
 
bool addSubframe (const uint32_t subframe[10], const int gpsWeek, const short PRN, const short track)
 
bool addSubframeNoParity (const uint32_t subframe[10], const int gpsWeek, const short PRN, const short track)
 
void dump (std::ostream &s=std::cout) const
 
void dumpTerse (std::ostream &s=std::cout) const
 
 EngEphemeris () noexcept
 Default constructor. More...
 
double getA () const
 
short getAccFlag () const
 
double getAccuracy () const
 
double getAf0 () const
 
double getAf1 () const
 
double getAf2 () const
 
double getAhalf () const
 
long getAODO () const
 
short getASAlert (short subframe) const
 
double getCic () const
 
double getCis () const
 
BrcClockCorrection getClock () const
 
short getCodeFlags () const
 
double getCrc () const
 
double getCrs () const
 
double getCuc () const
 
double getCus () const
 
double getDn () const
 
double getEcc () const
 
CommonTime getEphemerisEpoch () const
 
CommonTime getEpochTime () const
 
short getFitInt () const
 
short getFitInterval () const
 
short getFullWeek () const
 
short getHealth () const
 
double getHOWTime (short subframe) const
 
double getI0 () const
 
double getIDot () const
 
short getIODC () const
 
short getIODE () const
 
short getL2Pdata () const
 
double getM0 () const
 
double getOmega0 () const
 
double getOmegaDot () const
 
BrcKeplerOrbit getOrbit () const
 
short getPRNID () const
 
std::string getSatSys () const noexcept
 
double getTgd () const
 
CommonTime getTimestamp () const noexcept
 used for template functions More...
 
unsigned getTLMMessage (short subframe) const
 
unsigned char getTLMPreamble () const noexcept
 Return 0x8b, the upper 5 bits of the 22-bit TLM word. More...
 
double getToc () const
 
double getToe () const
 
long getTot () const
 
short getTracker () const
 
CommonTime getTransmitTime () const
 
double getW () const
 
bool isData (short subframe) const
 
bool isDataSet () const
 
bool isValid () const noexcept
 
EngEphemerisloadData (const std::string satSysArg, const unsigned short tlm[3], const long how[3], const short asalert[3], const short Tracker, const short prn, const short fullweek, const short cflags, const short acc, const short svhealth, const short iodc, const short l2pdata, const long Aodo, const double tgd, const double toc, const double Af2, const double Af1, const double Af0, const short iode, const double crs, const double Dn, const double m0, const double cuc, const double Ecc, const double cus, const double ahalf, const double toe, const short fitInt, const double cic, const double Omega0, const double cis, const double I0, const double crc, const double W, const double OmegaDot, const double IDot)
 
bool operator!= (const EngEphemeris &right) const noexcept
 
bool operator== (const EngEphemeris &right) const noexcept
 
void setAccuracy (double acc)
 
void setFIC (const bool arg)
 
EngEphemerissetSF1 (unsigned tlm, double how, short asalert, short fullweek, short cflags, short acc, short svhealth, short iodc, short l2pdata, double tgd, double toc, double Af2, double Af1, double Af0, short Tracker, short prn)
 
EngEphemerissetSF2 (unsigned tlm, double how, short asalert, short iode, double crs, double Dn, double m0, double cuc, double Ecc, double cus, double ahalf, double toe, short fitInt)
 
EngEphemerissetSF3 (unsigned tlm, double how, short asalert, double cic, double Omega0, double cis, double I0, double crc, double W, double OmegaDot, double IDot)
 
double svClockBias (const CommonTime &t) const
 
double svClockDrift (const CommonTime &t) const
 
double svRelativity (const CommonTime &t) const
 
Xvt svXvt (const CommonTime &t) const
 
bool unifiedConvert (const int gpsWeek, const short PRN, const short track)
 
virtual ~EngEphemeris ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::EngNav
 EngNav () noexcept
 default constructor More...
 
virtual ~EngNav ()
 destructor More...
 

Static Public Member Functions

static short getFitInterval (short iodc, short fiti)
 
- 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
 

Public Attributes

bool haveSubframe [3]
 
bool isFIC
 
uint32_t subframeStore [3][10]
 

Ephemeris overhead information

unsigned short tlm_message [3]
 
std::string satSys
 
short PRNID
 
short tracker
 
long HOWtime [3]
 
short ASalert [3]
 
short weeknum
 
short codeflags
 
short health
 
short L2Pdata
 
short IODC
 
short IODE
 
long AODO
 
short fitint
 
double Tgd
 
short accFlagTmp
 
BrcClockCorrection bcClock
 Clock information. More...
 
BrcKeplerOrbit orbit
 Orbit parameters. More...
 
std::ostream & operator<< (std::ostream &s, const EngEphemeris &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...
 

Constructor & Destructor Documentation

◆ EngEphemeris()

gnsstk::EngEphemeris::EngEphemeris ( )
noexcept

Default constructor.

Definition at line 62 of file EngEphemeris.cpp.

◆ ~EngEphemeris()

virtual gnsstk::EngEphemeris::~EngEphemeris ( )
inlinevirtual

Destructor.

Definition at line 94 of file EngEphemeris.hpp.

Member Function Documentation

◆ addIncompleteSF1Thru3()

bool gnsstk::EngEphemeris::addIncompleteSF1Thru3 ( const uint32_t  sf1[8],
const uint32_t  sf2[8],
const uint32_t  sf3[8],
const long  sf1TransmitSOW,
const int  gpsWeek,
const short  PRN,
const short  track 
)

Store a subframe in this object. This method is provided in order to provide a path to a EngEphemeris object for cases where a receiver only provides words 3-10 of subframes 1-3.

Note
: It is important to appropriately determine the transmit time of the data. The parameters sf1TransmitSOW and gpsWeek should be consistent and should represent the time when the data in sf1, sf2, and sf3 were received. As a general rule, the transmit time should be somewhere in the range of 0-2 hours BEFORE the epoch time of the ephemeris.
: EngEphemeris objects built via this method will not contain valid TLM message data, A-S flags, and "Alert" bits. Methods getTLMMesage() and getASAlert() should not be used.
Parameters
sf1words 3-10 of navigation subframe1 stored in the 30 least-significant bits of each array index.
sf2words 3-10 of navigation subframe 2
sf3words 3-10 of navigation subframe 3
sf1TransmitSOWtime (in GPS seconds of week) corresponding to leading edge of first bit of subframe 1
gpsWeekfull GPS week number.
PRNPRN ID of source satellite.
tracktracker number (typically receiver channel number).
Returns
true if successful.

Definition at line 201 of file EngEphemeris.cpp.

◆ addSubframe()

bool gnsstk::EngEphemeris::addSubframe ( const uint32_t  subframe[10],
const int  gpsWeek,
const short  PRN,
const short  track 
)

Store a subframe in this object.

Parameters
subframeten word navigation subframe stored in the 30 least-significant bits of each array index.
gpsWeekfull GPS week number.
PRNPRN ID of source satellite.
tracktracking number (typically receiver channel number).
Returns
true if successful.
Exceptions
InvalidParameterif subframe is valid but not subframe 1-3.

Historically, EngEphemeris allowed calling programs to add data one subframe at a time. This functionality does not exist in KeplerOrbit and BroadcastClockCorrection. Therefore, EngEphemeris must handle the subframe collection overhead before calling BrcKeplerOrbit.loadData() and BrcClockCorrection.loadData().

Note: Historically, the gpsWeek in the calling parameters to addSubframe is the full week number associated with the TRANSMIT time (not the epoch times).

Definition at line 146 of file EngEphemeris.cpp.

◆ addSubframeNoParity()

bool gnsstk::EngEphemeris::addSubframeNoParity ( const uint32_t  subframe[10],
const int  gpsWeek,
const short  PRN,
const short  track 
)

Store a subframe in this object. This method is provided in order to allow construction of an EngEphemeris object for cases where a receiver only provides the 24 msb of each word and strips the parity.

Parameters
subframeten word navigation subframe (minus the six parity bits) stored in the 24 least-significant bits of each array index.
gpsWeekfull GPS week number.
PRNPRN ID of source satellite.
tracktracking number (typically receiver channel number).
Returns
true if successful.
Exceptions
InvalidParameterif subframe is valid but not subframe 1-3.

Definition at line 181 of file EngEphemeris.cpp.

◆ dump()

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

Output the contents of this ephemeris to the given stream.

Exceptions
InvalidRequest

Definition at line 1438 of file EngEphemeris.cpp.

◆ dumpTerse()

void gnsstk::EngEphemeris::dumpTerse ( std::ostream &  s = std::cout) const
Exceptions
InvalidRequest

Definition at line 1398 of file EngEphemeris.cpp.

◆ getA()

double gnsstk::EngEphemeris::getA ( ) const

This function returns the value of the semi-major axis in meters.

Exceptions
InvalidRequest

Definition at line 915 of file EngEphemeris.cpp.

◆ getAccFlag()

short gnsstk::EngEphemeris::getAccFlag ( ) const

This function returns the flag based on the SV accuracy flag as it appears in the nav message.

Exceptions
InvalidRequest

Definition at line 695 of file EngEphemeris.cpp.

◆ getAccuracy()

double gnsstk::EngEphemeris::getAccuracy ( ) const

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.

Exceptions
InvalidRequest

Definition at line 685 of file EngEphemeris.cpp.

◆ getAf0()

double gnsstk::EngEphemeris::getAf0 ( ) const

This function returns the SV clock error in seconds.

Exceptions
InvalidRequest

Definition at line 765 of file EngEphemeris.cpp.

◆ getAf1()

double gnsstk::EngEphemeris::getAf1 ( ) const

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

Exceptions
InvalidRequest

Definition at line 775 of file EngEphemeris.cpp.

◆ getAf2()

double gnsstk::EngEphemeris::getAf2 ( ) const

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

Exceptions
InvalidRequest

Definition at line 785 of file EngEphemeris.cpp.

◆ getAhalf()

double gnsstk::EngEphemeris::getAhalf ( ) const

This function returns the value of the square root of the semi-major axis in square root of meters.

Exceptions
InvalidRequest

Definition at line 905 of file EngEphemeris.cpp.

◆ getAODO()

long gnsstk::EngEphemeris::getAODO ( ) const

This function return the AODO for the ephemeris.

Exceptions
InvalidRequest

Definition at line 745 of file EngEphemeris.cpp.

◆ getASAlert()

short gnsstk::EngEphemeris::getASAlert ( short  subframe) const

This function returns the A-S alert flag for either subframe 1 or 2 or 3.

Exceptions
InvalidRequest

Definition at line 654 of file EngEphemeris.cpp.

◆ getCic()

double gnsstk::EngEphemeris::getCic ( ) const

This function returns the value of the cosine inclination harmonic perturbation in radians.

Exceptions
InvalidRequest

Definition at line 855 of file EngEphemeris.cpp.

◆ getCis()

double gnsstk::EngEphemeris::getCis ( ) const

This function returns the value of the sine inclination harmonic perturbation in radians.

Exceptions
InvalidRequest

Definition at line 825 of file EngEphemeris.cpp.

◆ getClock()

BrcClockCorrection gnsstk::EngEphemeris::getClock ( ) const
Exceptions
InvalidRequest

Definition at line 608 of file EngEphemeris.cpp.

◆ getCodeFlags()

short gnsstk::EngEphemeris::getCodeFlags ( ) const

This function returns the values of the L2 codes.

Exceptions
InvalidRequest

Definition at line 675 of file EngEphemeris.cpp.

◆ getCrc()

double gnsstk::EngEphemeris::getCrc ( ) const

This function returns the value of the cosine radius harmonic perturbation in meters.

Exceptions
InvalidRequest

Definition at line 835 of file EngEphemeris.cpp.

◆ getCrs()

double gnsstk::EngEphemeris::getCrs ( ) const

This function returns the value of the sine radius harmonic perturbation in meters.

Exceptions
InvalidRequest

Definition at line 815 of file EngEphemeris.cpp.

◆ getCuc()

double gnsstk::EngEphemeris::getCuc ( ) const

This function returns the value of the cosine latitude harmonic perturbation in radians.

Exceptions
InvalidRequest

Definition at line 845 of file EngEphemeris.cpp.

◆ getCus()

double gnsstk::EngEphemeris::getCus ( ) const

This function returns the value of the sine latitude harmonic perturbation in radians.

Exceptions
InvalidRequest

Definition at line 805 of file EngEphemeris.cpp.

◆ getDn()

double gnsstk::EngEphemeris::getDn ( ) const

This function returns the value of the correction to the mean motion in radians/second.

Exceptions
InvalidRequest

Definition at line 885 of file EngEphemeris.cpp.

◆ getEcc()

double gnsstk::EngEphemeris::getEcc ( ) const

This function returns the value of the eccentricity.

Exceptions
InvalidRequest

Definition at line 895 of file EngEphemeris.cpp.

◆ getEphemerisEpoch()

CommonTime gnsstk::EngEphemeris::getEphemerisEpoch ( ) const

Extracts the epoch time from this ephemeris, correcting for half weeks and HOW time

Exceptions
InvalidRequest

Definition at line 593 of file EngEphemeris.cpp.

◆ getEpochTime()

CommonTime gnsstk::EngEphemeris::getEpochTime ( ) const

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

Exceptions
InvalidRequest

Definition at line 588 of file EngEphemeris.cpp.

◆ getFitInt()

short gnsstk::EngEphemeris::getFitInt ( ) const

This function returns the value of the fit interval flag.

Exceptions
InvalidRequest

Definition at line 975 of file EngEphemeris.cpp.

◆ getFitInterval() [1/2]

short gnsstk::EngEphemeris::getFitInterval ( ) const

This computes and returns the fit interval for the satellite ephemeris from the IODC and the fit interval flag. This fit interval is (typically) centered around the Toe (time of ephemeris) for the ephemeris. See IS-GPS-200 section 20.3.4.4, Table 20-XIA and section 20.3.3.4.3.1 for more information.

Returns
the fit interval in hours (0 = failure).
Exceptions
InvalidRequestif data is missing.

Definition at line 428 of file EngEphemeris.cpp.

◆ getFitInterval() [2/2]

short gnsstk::EngEphemeris::getFitInterval ( short  iodc,
short  fiti 
)
static

Static version of the above.

Parameters
iodcthe IODC of the ephemeris.
fitithe fit interval flag of same ephemeris.
Returns
the fit interval in hours (0 = failure).
Exceptions
InvalidRequestif data is missing.

This is for Block II/IIA Need update for Block IIR and IIF

Definition at line 437 of file EngEphemeris.cpp.

◆ getFullWeek()

short gnsstk::EngEphemeris::getFullWeek ( ) const

This function returns the GPS week number contained in subframe 1. this is the full GPS week (ie > 10 bits).

Exceptions
InvalidRequest

Definition at line 665 of file EngEphemeris.cpp.

◆ getHealth()

short gnsstk::EngEphemeris::getHealth ( ) const

This function returns the value of the SV health flag.

Exceptions
InvalidRequest

Definition at line 705 of file EngEphemeris.cpp.

◆ getHOWTime()

double gnsstk::EngEphemeris::getHOWTime ( short  subframe) const

This function returns the time of the HOW in subframe 1 or 2 or 3 in seconds of week.

Exceptions
InvalidRequest

Definition at line 639 of file EngEphemeris.cpp.

◆ getI0()

double gnsstk::EngEphemeris::getI0 ( ) const

This function returns the value of the inclination in radians.

Exceptions
InvalidRequest

Definition at line 935 of file EngEphemeris.cpp.

◆ getIDot()

double gnsstk::EngEphemeris::getIDot ( ) const

This function returns the value of the rate of the inclination in radians/second.

Exceptions
InvalidRequest

Definition at line 965 of file EngEphemeris.cpp.

◆ getIODC()

short gnsstk::EngEphemeris::getIODC ( ) const

This function returns the IODC for the given PRN.

Exceptions
InvalidRequest

Definition at line 725 of file EngEphemeris.cpp.

◆ getIODE()

short gnsstk::EngEphemeris::getIODE ( ) const

This function return the IODE for the ephemeris.

Exceptions
InvalidRequest

Definition at line 735 of file EngEphemeris.cpp.

◆ getL2Pdata()

short gnsstk::EngEphemeris::getL2Pdata ( ) const

This function returns the value of the L2 P-code data flag.

Exceptions
InvalidRequest

Definition at line 715 of file EngEphemeris.cpp.

◆ getM0()

double gnsstk::EngEphemeris::getM0 ( ) const

This function returns the value of the mean anomaly in radians.

Exceptions
InvalidRequest

Definition at line 875 of file EngEphemeris.cpp.

◆ getOmega0()

double gnsstk::EngEphemeris::getOmega0 ( ) const

This function returns the value of the right ascension of the ascending node in radians.

Exceptions
InvalidRequest

Definition at line 925 of file EngEphemeris.cpp.

◆ getOmegaDot()

double gnsstk::EngEphemeris::getOmegaDot ( ) const

This function returns the value of the rate of the right ascension of the ascending node in radians/second.

Exceptions
InvalidRequest

Definition at line 955 of file EngEphemeris.cpp.

◆ getOrbit()

BrcKeplerOrbit gnsstk::EngEphemeris::getOrbit ( ) const
Exceptions
InvalidRequest

Definition at line 598 of file EngEphemeris.cpp.

◆ getPRNID()

short gnsstk::EngEphemeris::getPRNID ( ) const

This function returns the PRN ID of the SV.

Exceptions
InvalidRequest

Definition at line 619 of file EngEphemeris.cpp.

◆ getSatSys()

std::string gnsstk::EngEphemeris::getSatSys ( ) const
inlinenoexcept

This functions returns the GNSS type (satellite system code)

Definition at line 270 of file EngEphemeris.hpp.

◆ getTgd()

double gnsstk::EngEphemeris::getTgd ( ) const

This function returns the value of the group delay differential in seconds.

Exceptions
InvalidRequest

Definition at line 795 of file EngEphemeris.cpp.

◆ getTimestamp()

CommonTime gnsstk::EngEphemeris::getTimestamp ( ) const
inlinenoexcept

used for template functions

Definition at line 265 of file EngEphemeris.hpp.

◆ getTLMMessage()

unsigned gnsstk::EngEphemeris::getTLMMessage ( short  subframe) const

Return the lower 16 bits of the TLM word for the given subframe.

Exceptions
InvalidRequest

Definition at line 557 of file EngEphemeris.cpp.

◆ getTLMPreamble()

unsigned char gnsstk::EngEphemeris::getTLMPreamble ( ) const
inlinenoexcept

Return 0x8b, the upper 5 bits of the 22-bit TLM word.

Definition at line 238 of file EngEphemeris.hpp.

◆ getToc()

double gnsstk::EngEphemeris::getToc ( ) const

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

Exceptions
InvalidRequest

Definition at line 755 of file EngEphemeris.cpp.

◆ getToe()

double gnsstk::EngEphemeris::getToe ( ) const

This function returns the value of the time of ephemeris in GPS seconds of week.

Exceptions
InvalidRequest

Definition at line 865 of file EngEphemeris.cpp.

◆ getTot()

long gnsstk::EngEphemeris::getTot ( ) const

This function returns the value of the ephemeris key that is used to sort the ephemerides when they are stored in the bcetable.

Todo:
Determine if this function is needed, as it is never used

This function returnst the value of the Time of Transmit. Basically just the earliest of the HOWs.

Exceptions
InvalidRequest

Definition at line 985 of file EngEphemeris.cpp.

◆ getTracker()

short gnsstk::EngEphemeris::getTracker ( ) const

This function returns the tracker number.

Exceptions
InvalidRequest

Definition at line 629 of file EngEphemeris.cpp.

◆ getTransmitTime()

CommonTime gnsstk::EngEphemeris::getTransmitTime ( ) const

Extracts the transmit time from the ephemeris using the Tot

Exceptions
InvalidRequest

Definition at line 568 of file EngEphemeris.cpp.

◆ getW()

double gnsstk::EngEphemeris::getW ( ) const

This function returns the value of the argument of perigee in radians.

Exceptions
InvalidRequest

Definition at line 945 of file EngEphemeris.cpp.

◆ isData()

bool gnsstk::EngEphemeris::isData ( short  subframe) const

Query presence of subframe in this object.

Parameters
subframesubframe ID (1-3) to check.
Returns
true if the given subframe is present in this object.
Exceptions
InvalidParameterif subframe is not a valid ephemeris subframe number.

Definition at line 396 of file EngEphemeris.cpp.

◆ isDataSet()

bool gnsstk::EngEphemeris::isDataSet ( ) const

Return whether the ephemeris contains a complete data set, i.e. whether the ephemeris contains subframes 1-3 with matching IODC and IODE values.

Returns
true if the ephemeris is a complete data set, false if a data set cutover has occured

Definition at line 408 of file EngEphemeris.cpp.

◆ isValid()

bool gnsstk::EngEphemeris::isValid ( ) const
noexcept

Checks all quantities (present or not) to determine whether they fall within the effective range as described in the IS-GPS-200.

Returns
true if all values are within their effective range.

Definition at line 377 of file EngEphemeris.cpp.

◆ loadData()

EngEphemeris & gnsstk::EngEphemeris::loadData ( const std::string  satSysArg,
const unsigned short  tlm[3],
const long  how[3],
const short  asalert[3],
const short  Tracker,
const short  prn,
const short  fullweek,
const short  cflags,
const short  acc,
const short  svhealth,
const short  iodc,
const short  l2pdata,
const long  Aodo,
const double  tgd,
const double  toc,
const double  Af2,
const double  Af1,
const double  Af0,
const short  iode,
const double  crs,
const double  Dn,
const double  m0,
const double  cuc,
const double  Ecc,
const double  cus,
const double  ahalf,
const double  toe,
const short  fitInt,
const double  cic,
const double  Omega0,
const double  cis,
const double  I0,
const double  crc,
const double  W,
const double  OmegaDot,
const double  IDot 
)

Set the values contained in SubFrame 1,2 and 3.

Values contained in SubFrame 1.

Parameters
tlmthe new value for the TLM word
howthe new value for the HOW
asalertthe new value for the A-S alert flag
fullweekthe new value for the full GPS week
cflagsthe nve values for the L2 code flags
accthe new value for the SV accuracy flag
svhealththe new value for the SV health
iodcthe new value for the IODC
l2pdatathe new value for the L2 P-code data flag
tgdthe new value for the Tgd
tocthe new value for the clock epoch
Af2the new value for Af2
Af1the new value for Af1
Af0the new value for Af0
Trackerthe new value of the tracker number
prnthe new value of the PRN ID
Returns
a reference to the modified EngEphemeris object

Values contained in SubFrame 2.

Parameters
tlmthe new value for the TLM word
howthe new value for the HOW
asalertthe new falue for the A-S alert flag
iodethe new value for the IODE
crsthe new value for the Crs
m0the new value for M0
Dnthe new value for Dn
cucthe new value for the Cuc
Eccthe new value for the Ecc
custhe new value for the Cus
ahalfthe new value for Ahalf
toethe new value for the Toe
fitIntthe new value for the fit interval flag
Returns
a reference to the modified EngEphemeris object

Values contained in SubFrame 3.

Parameters
tlmthe new value for the TLM word
howthe new value for the HOW
asalertthe new falue for the A-S alert flag
cicthe new value for the Cic
Omega0the enw value for Omega0
cisthe new value for the Cis
I0the new value for I0
crcthe new value for the Crc
Wthe new value for W
OmegaDotthe new value for OmegaDot
IDotthe new value for IDot
Returns
a reference to the modified EngEphemeris object
Exceptions
InvalidRequest

Definition at line 1019 of file EngEphemeris.cpp.

◆ operator!=()

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

Definition at line 97 of file EngEphemeris.hpp.

◆ operator==()

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

Definition at line 101 of file EngEphemeris.cpp.

◆ setAccuracy()

void gnsstk::EngEphemeris::setAccuracy ( double  acc)

Set the value of the SV accuracy (in meters). This is the only "set" method and is provided so that one can set the SV accuracy directly and thereby override the conversion of the SV accuracy flag to meters. This is usually used when entering data from some source other than an SV nav message.

Note
Subsequent use of the addSubframe(), with subframe 1 info, or the setSF1() methods will overwrite any value set using this method.
This function converts the given accuracy to the appropriate SV accuracy flag and stores it in the accFlag data member.
Parameters
accthe new value of SV accuracy in meters.
Exceptions
InvalidParameterif the given accuracy value is invalid.

Definition at line 417 of file EngEphemeris.cpp.

◆ setFIC()

void gnsstk::EngEphemeris::setFIC ( const bool  arg)

Definition at line 1334 of file EngEphemeris.cpp.

◆ setSF1()

EngEphemeris & gnsstk::EngEphemeris::setSF1 ( unsigned  tlm,
double  how,
short  asalert,
short  fullweek,
short  cflags,
short  acc,
short  svhealth,
short  iodc,
short  l2pdata,
double  tgd,
double  toc,
double  Af2,
double  Af1,
double  Af0,
short  Tracker,
short  prn 
)

Definition at line 1108 of file EngEphemeris.cpp.

◆ setSF2()

EngEphemeris & gnsstk::EngEphemeris::setSF2 ( unsigned  tlm,
double  how,
short  asalert,
short  iode,
double  crs,
double  Dn,
double  m0,
double  cuc,
double  Ecc,
double  cus,
double  ahalf,
double  toe,
short  fitInt 
)

Definition at line 1161 of file EngEphemeris.cpp.

◆ setSF3()

EngEphemeris & gnsstk::EngEphemeris::setSF3 ( unsigned  tlm,
double  how,
short  asalert,
double  cic,
double  Omega0,
double  cis,
double  I0,
double  crc,
double  W,
double  OmegaDot,
double  IDot 
)

Definition at line 1247 of file EngEphemeris.cpp.

◆ svClockBias()

double gnsstk::EngEphemeris::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 547 of file EngEphemeris.cpp.

◆ svClockDrift()

double gnsstk::EngEphemeris::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 552 of file EngEphemeris.cpp.

◆ svRelativity()

double gnsstk::EngEphemeris::svRelativity ( const CommonTime t) const

Compute satellite relativity correction (sec) at the given time

Exceptions
InvalidRequestif a required subframe has not been stored.

Definition at line 542 of file EngEphemeris.cpp.

◆ svXvt()

Xvt gnsstk::EngEphemeris::svXvt ( const CommonTime t) const

Compute satellite position & velocity at the given time using this ephemeris.

Exceptions
InvalidRequestif a required subframe has not been stored.

Definition at line 525 of file EngEphemeris.cpp.

◆ unifiedConvert()

bool gnsstk::EngEphemeris::unifiedConvert ( const int  gpsWeek,
const short  PRN,
const short  track 
)

Each of the addSubframe( ) methods eventually calls unifiedConvert( ) in order to crack the raw subframe data into engineering units and load the orbit and clock objects.

Definition at line 254 of file EngEphemeris.cpp.

Friends And Related Function Documentation

◆ operator<<

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

Member Data Documentation

◆ accFlagTmp

short gnsstk::EngEphemeris::accFlagTmp

Definition at line 653 of file EngEphemeris.hpp.

◆ AODO

long gnsstk::EngEphemeris::AODO

Age of Data Offset for NMCT

Definition at line 647 of file EngEphemeris.hpp.

◆ ASalert

short gnsstk::EngEphemeris::ASalert[3]

A-S and "alert" flags for each subframe. 2 bit quantity with alert flag the high order bit and the A-S flag low order bit

Definition at line 636 of file EngEphemeris.hpp.

◆ bcClock

BrcClockCorrection gnsstk::EngEphemeris::bcClock

Clock information.

Definition at line 663 of file EngEphemeris.hpp.

◆ codeflags

short gnsstk::EngEphemeris::codeflags

L2 codes

Definition at line 642 of file EngEphemeris.hpp.

◆ fitint

short gnsstk::EngEphemeris::fitint

Fit interval flag

Definition at line 648 of file EngEphemeris.hpp.

◆ haveSubframe

bool gnsstk::EngEphemeris::haveSubframe[3]

flags indicating presence of a subframe

Definition at line 620 of file EngEphemeris.hpp.

◆ health

short gnsstk::EngEphemeris::health

SV health

Definition at line 643 of file EngEphemeris.hpp.

◆ HOWtime

long gnsstk::EngEphemeris::HOWtime[3]

Time of subframe 1-3 (sec of week)

Definition at line 635 of file EngEphemeris.hpp.

◆ IODC

short gnsstk::EngEphemeris::IODC

Index of data-clock

Definition at line 645 of file EngEphemeris.hpp.

◆ IODE

short gnsstk::EngEphemeris::IODE

Index of data-eph

Definition at line 646 of file EngEphemeris.hpp.

◆ isFIC

bool gnsstk::EngEphemeris::isFIC

Definition at line 627 of file EngEphemeris.hpp.

◆ L2Pdata

short gnsstk::EngEphemeris::L2Pdata

L2 P data flag

Definition at line 644 of file EngEphemeris.hpp.

◆ orbit

BrcKeplerOrbit gnsstk::EngEphemeris::orbit

Orbit parameters.

Definition at line 666 of file EngEphemeris.hpp.

◆ PRNID

short gnsstk::EngEphemeris::PRNID

SV PRN ID

Definition at line 633 of file EngEphemeris.hpp.

◆ satSys

std::string gnsstk::EngEphemeris::satSys

GNSS (satellite system)

Definition at line 632 of file EngEphemeris.hpp.

◆ subframeStore

uint32_t gnsstk::EngEphemeris::subframeStore[3][10]

Definition at line 625 of file EngEphemeris.hpp.

◆ Tgd

double gnsstk::EngEphemeris::Tgd

L1 and L2 correction term

Definition at line 649 of file EngEphemeris.hpp.

◆ tlm_message

unsigned short gnsstk::EngEphemeris::tlm_message[3]

Definition at line 631 of file EngEphemeris.hpp.

◆ tracker

short gnsstk::EngEphemeris::tracker

Tracker number

Definition at line 634 of file EngEphemeris.hpp.

◆ weeknum

short gnsstk::EngEphemeris::weeknum

GPS full week number that corresponds to the HOWtime of SF1

Definition at line 640 of file EngEphemeris.hpp.


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


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