Orbit information for a single satellite. This class encapsulates the orbit parameters in any of several navigation message formats (basically those that use Keplerian elements), provides functions to decode the as-broadcast bit-encodings, and generate SV positions as a function of time.
Definition at line 81 of file BrcKeplerOrbit.hpp.
#include <BrcKeplerOrbit.hpp>
Public Member Functions | |
BrcKeplerOrbit () noexcept | |
BrcKeplerOrbit (const ObsID obsIDArg, const short PRNID, const short fullweeknum, const long subframe1[10], const long subframe2[10], const long subframe3[10]) | |
Legacy GPS Subframe 1-3. More... | |
BrcKeplerOrbit (const std::string satSysArg, const ObsID obsIDArg, const short PRNIDArg, const CommonTime beginFitArg, const CommonTime endFitArg, const CommonTime ToeArg, const short URAoeArg, const bool healthyArg, const double CucArg, const double CusArg, const double CrcArg, const double CrsArg, const double CicArg, const double CisArg, const double M0Arg, const double dnArg, const double dndotArg, const double eccArg, const double AArg, const double AhalfArg, const double AdotArg, const double OMEGA0Arg, const double i0Arg, const double wArg, const double OMEGAdotARg, const double idotArg) | |
General purpose constructor. More... | |
void | dump (std::ostream &s=std::cout) const noexcept |
double | getA () const |
double | getAccuracy () const |
double | getAdot () const |
double | getAhalf () const |
CommonTime | getBeginningOfFitInterval () const |
double | getCic () const |
double | getCis () const |
double | getCrc () const |
double | getCrs () const |
double | getCuc () const |
double | getCus () const |
double | getDn () const |
double | getDnDot () const |
double | getEcc () const |
CommonTime | getEndOfFitInterval () const |
short | getFullWeek () const |
double | getI0 () const |
double | getIDot () const |
double | getM0 () const |
ObsID | getObsID () const |
double | getOmega0 () const |
double | getOmegaDot () const |
CommonTime | getOrbitEpoch () const |
short | getPRNID () const |
double | getToe () const |
short | getURAoe () const |
double | getW () const |
bool | hasData () const |
bool | isHealthy () const |
void | loadData (const ObsID obsIDArg, const short PRNID, const short fullweeknum, const long subframe1[10], const long subframe2[10], const long subframe3[10]) |
void | loadData (const std::string satSysArg, const ObsID obsIDArg, const short PRNIDArg, const CommonTime beginFitArg, const CommonTime endFitArg, const CommonTime ToeArg, const short URAoeArg, const bool healthyArg, const double CucArg, const double CusArg, const double CrcArg, const double CrsArg, const double CicArg, const double CisArg, const double M0Arg, const double dnArg, const double dndotArg, const double eccArg, const double AArg, const double AhalfArg, const double AdotArg, const double OMEGA0Arg, const double i0Arg, const double wArg, const double OMEGAdotARg, const double idotArg) |
General purpose means to load data into object. More... | |
bool | operator!= (const BrcKeplerOrbit &right) const noexcept |
bool | operator== (const BrcKeplerOrbit &right) const noexcept |
void | setAccuracy (const double &acc) |
double | svRelativity (const CommonTime &t) const |
Xvt | svXvt (const CommonTime &t) const |
bool | withinFitInterval (const CommonTime) const |
virtual | ~BrcKeplerOrbit () |
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 | Toe |
short | URAoe |
bool | healthy |
Harmonic perturbations | |
double | Cuc |
double | Cus |
double | Crc |
double | Crs |
double | Cic |
double | Cis |
Major orbit parameters | |
double | M0 |
double | dn |
double | dndot |
double | ecc |
double | A |
double | Ahalf |
double | Adot |
double | OMEGA0 |
double | i0 |
double | w |
double | OMEGAdot |
double | idot |
Fit Interval Definition | |
CommonTime | beginFit |
CommonTime | endFit |
class | ::BrcKeplerOrbit_T |
std::ostream & | operator<< (std::ostream &s, const BrcKeplerOrbit &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 |
Constructors Default constuctor
Definition at line 52 of file BrcKeplerOrbit.cpp.
gnsstk::BrcKeplerOrbit::BrcKeplerOrbit | ( | const std::string | satSysArg, |
const ObsID | obsIDArg, | ||
const short | PRNIDArg, | ||
const CommonTime | beginFitArg, | ||
const CommonTime | endFitArg, | ||
const CommonTime | ToeArg, | ||
const short | URAoeArg, | ||
const bool | healthyArg, | ||
const double | CucArg, | ||
const double | CusArg, | ||
const double | CrcArg, | ||
const double | CrsArg, | ||
const double | CicArg, | ||
const double | CisArg, | ||
const double | M0Arg, | ||
const double | dnArg, | ||
const double | dndotArg, | ||
const double | eccArg, | ||
const double | AArg, | ||
const double | AhalfArg, | ||
const double | AdotArg, | ||
const double | OMEGA0Arg, | ||
const double | i0Arg, | ||
const double | wArg, | ||
const double | OMEGAdotARg, | ||
const double | idotArg | ||
) |
General purpose constructor.
All constructors and loadData methods assume weeknumArg is the full GPS week number associated with the epoch time.
Definition at line 69 of file BrcKeplerOrbit.cpp.
gnsstk::BrcKeplerOrbit::BrcKeplerOrbit | ( | const ObsID | obsIDArg, |
const short | PRNID, | ||
const short | fullweeknum, | ||
const long | subframe1[10], | ||
const long | subframe2[10], | ||
const long | subframe3[10] | ||
) |
Legacy GPS Subframe 1-3.
Definition at line 94 of file BrcKeplerOrbit.cpp.
|
inlinevirtual |
Destructor.
Definition at line 121 of file BrcKeplerOrbit.hpp.
|
noexcept |
Output the contents of this orbit data to the given stream.
Definition at line 814 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getA | ( | ) | const |
This function returns the value of the semi-major axis in meters.
InvalidRequest |
Definition at line 665 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getAccuracy | ( | ) | const |
This function returns the value of the SV accuracy (m) computed from the accuracy information contained in the nav message
InvalidRequest |
Definition at line 533 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getAdot | ( | ) | const |
This function returns the value of the rate of the semi-major axis in meters/sec.
InvalidRequest |
Definition at line 685 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getAhalf | ( | ) | const |
This function returns the value of the square root of the semi-major axis in meters**.5.
InvalidRequest |
Definition at line 675 of file BrcKeplerOrbit.cpp.
CommonTime gnsstk::BrcKeplerOrbit::getBeginningOfFitInterval | ( | ) | const |
Returns the time at the beginning of the fit interval.
InvalidRequest |
Definition at line 482 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getCic | ( | ) | const |
This function returns the value of the cosine inclination harmonic perturbation in radians.
InvalidRequest |
Definition at line 614 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getCis | ( | ) | const |
This function returns the value of the sine inclination harmonic perturbation in radians.
InvalidRequest |
Definition at line 584 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getCrc | ( | ) | const |
This function returns the value of the cosine radius harmonic perturbation in meters.
InvalidRequest |
Definition at line 594 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getCrs | ( | ) | const |
This function returns the value of the sine radius harmonic perturbation in meters.
InvalidRequest |
Definition at line 574 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getCuc | ( | ) | const |
This function returns the value of the cosine latitude harmonic perturbation in radians.
InvalidRequest |
Definition at line 604 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getCus | ( | ) | const |
This function returns the value of the sine latitude harmonic perturbation in radians.
InvalidRequest |
Definition at line 564 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getDn | ( | ) | const |
This function returns the value of the correction to the mean motion in radians/second.
InvalidRequest |
Definition at line 645 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getDnDot | ( | ) | const |
This function returns the value of the rate correction to the mean motion in radians/second**2.
InvalidRequest |
Definition at line 695 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getEcc | ( | ) | const |
This function returns the value of the eccentricity.
InvalidRequest |
Definition at line 655 of file BrcKeplerOrbit.cpp.
CommonTime gnsstk::BrcKeplerOrbit::getEndOfFitInterval | ( | ) | const |
Returns the time at the end of the fit interval.
InvalidRequest |
Definition at line 492 of file BrcKeplerOrbit.cpp.
short gnsstk::BrcKeplerOrbit::getFullWeek | ( | ) | const |
This function return the GPS week number for the orbit. this is the full GPS week (ie > 10 bits).
InvalidRequest |
Definition at line 522 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getI0 | ( | ) | const |
This function returns the value of the inclination in radians.
InvalidRequest |
Definition at line 715 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getIDot | ( | ) | const |
This function returns the value of the rate of the inclination in radians/second.
InvalidRequest |
Definition at line 745 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getM0 | ( | ) | const |
This function returns the value of the mean anomaly in radians.
InvalidRequest |
Definition at line 635 of file BrcKeplerOrbit.cpp.
ObsID gnsstk::BrcKeplerOrbit::getObsID | ( | ) | const |
This function returns the OBS ID of the orbit.
InvalidRequest |
Definition at line 512 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getOmega0 | ( | ) | const |
This function returns the value of the right ascension of the ascending node in radians.
InvalidRequest |
Definition at line 705 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getOmegaDot | ( | ) | const |
This function returns the value of the rate of the right ascension of the ascending node in radians/second.
InvalidRequest |
Definition at line 735 of file BrcKeplerOrbit.cpp.
CommonTime gnsstk::BrcKeplerOrbit::getOrbitEpoch | ( | ) | const |
Returns the epoch time (time of ephemeris) from this ephemeris, correcting for half weeks and HOW time.
InvalidRequest |
Definition at line 477 of file BrcKeplerOrbit.cpp.
short gnsstk::BrcKeplerOrbit::getPRNID | ( | ) | const |
Return satellite system ID Return signal type associated with this orbit This function returns the PRN ID of the SV.
InvalidRequest |
Definition at line 502 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getToe | ( | ) | const |
This function returns the value of the time of orbit in GPS seconds of week.
InvalidRequest |
Definition at line 624 of file BrcKeplerOrbit.cpp.
short gnsstk::BrcKeplerOrbit::getURAoe | ( | ) | const |
InvalidRequest |
Definition at line 554 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::getW | ( | ) | const |
This function returns the value of the argument of perigee in radians.
InvalidRequest |
Definition at line 725 of file BrcKeplerOrbit.cpp.
bool gnsstk::BrcKeplerOrbit::hasData | ( | ) | const |
Return true if orbit data has been loaded
Definition at line 279 of file BrcKeplerOrbit.cpp.
bool gnsstk::BrcKeplerOrbit::isHealthy | ( | ) | const |
This function returns the health status of the SV.
InvalidRequest |
Definition at line 284 of file BrcKeplerOrbit.cpp.
void gnsstk::BrcKeplerOrbit::loadData | ( | const ObsID | obsIDArg, |
const short | PRNID, | ||
const short | fullweeknum, | ||
const long | subframe1[10], | ||
const long | subframe2[10], | ||
const long | subframe3[10] | ||
) |
Load data based on the GPS Legacy message
InvalidParameter |
Definition at line 182 of file BrcKeplerOrbit.cpp.
void gnsstk::BrcKeplerOrbit::loadData | ( | const std::string | satSysArg, |
const ObsID | obsIDArg, | ||
const short | PRNIDArg, | ||
const CommonTime | beginFitArg, | ||
const CommonTime | endFitArg, | ||
const CommonTime | ToeArg, | ||
const short | URAoeArg, | ||
const bool | healthyArg, | ||
const double | CucArg, | ||
const double | CusArg, | ||
const double | CrcArg, | ||
const double | CrsArg, | ||
const double | CicArg, | ||
const double | CisArg, | ||
const double | M0Arg, | ||
const double | dnArg, | ||
const double | dndotArg, | ||
const double | eccArg, | ||
const double | AArg, | ||
const double | AhalfArg, | ||
const double | AdotArg, | ||
const double | OMEGA0Arg, | ||
const double | i0Arg, | ||
const double | wArg, | ||
const double | OMEGAdotARg, | ||
const double | idotArg | ||
) |
General purpose means to load data into object.
Definition at line 136 of file BrcKeplerOrbit.cpp.
|
inlinenoexcept |
Definition at line 124 of file BrcKeplerOrbit.hpp.
|
noexcept |
Definition at line 104 of file BrcKeplerOrbit.cpp.
void gnsstk::BrcKeplerOrbit::setAccuracy | ( | const double & | acc | ) |
InvalidRequest |
Definition at line 544 of file BrcKeplerOrbit.cpp.
double gnsstk::BrcKeplerOrbit::svRelativity | ( | const CommonTime & | t | ) | const |
Compute satellite relativity correction (sec) at the given time
InvalidRequest | if a required subframe has not been stored. |
Definition at line 452 of file BrcKeplerOrbit.cpp.
Xvt gnsstk::BrcKeplerOrbit::svXvt | ( | const CommonTime & | t | ) | const |
Compute satellite position at the given time using this orbit data.
InvalidRequest | if a required subframe has not been stored. |
Definition at line 305 of file BrcKeplerOrbit.cpp.
bool gnsstk::BrcKeplerOrbit::withinFitInterval | ( | const CommonTime | ct | ) | const |
Return true if fit interval is valid.
InvalidRequest |
Definition at line 294 of file BrcKeplerOrbit.cpp.
|
friend |
Definition at line 396 of file BrcKeplerOrbit.hpp.
|
friend |
|
protected |
Semi-major axis (m)
Definition at line 380 of file BrcKeplerOrbit.hpp.
|
protected |
Rate of semi-major axis (m/sec)
Definition at line 382 of file BrcKeplerOrbit.hpp.
|
protected |
Square Root of semi-major axis (m**.5)
Definition at line 381 of file BrcKeplerOrbit.hpp.
|
protected |
Time at beginning of fit interval
Definition at line 392 of file BrcKeplerOrbit.hpp.
|
protected |
Cosine inclination (rad)
Definition at line 370 of file BrcKeplerOrbit.hpp.
|
protected |
Sine inclination (rad)
Definition at line 371 of file BrcKeplerOrbit.hpp.
|
protected |
Cosine radius (m)
Definition at line 368 of file BrcKeplerOrbit.hpp.
|
protected |
Sine radius (m)
Definition at line 369 of file BrcKeplerOrbit.hpp.
|
protected |
Cosine latitude (rad)
Definition at line 366 of file BrcKeplerOrbit.hpp.
|
protected |
Sine latitude (rad)
Definition at line 367 of file BrcKeplerOrbit.hpp.
|
protected |
True if data is present, False otherwise
Definition at line 355 of file BrcKeplerOrbit.hpp.
|
protected |
Correction to mean motion (rad/sec)
Definition at line 377 of file BrcKeplerOrbit.hpp.
|
protected |
Rate of correction to mean motion (rad/sec/sec)
Definition at line 378 of file BrcKeplerOrbit.hpp.
|
protected |
Eccentricity
Definition at line 379 of file BrcKeplerOrbit.hpp.
|
protected |
Time at end of fit interval
Definition at line 393 of file BrcKeplerOrbit.hpp.
|
protected |
SV health (healthy=true, other=false
Definition at line 361 of file BrcKeplerOrbit.hpp.
|
protected |
Inclination (rad)
Definition at line 384 of file BrcKeplerOrbit.hpp.
|
protected |
Rate of inclination angle (rad/sec)
Definition at line 387 of file BrcKeplerOrbit.hpp.
|
protected |
Mean anomaly (rad)
Definition at line 376 of file BrcKeplerOrbit.hpp.
|
protected |
Defines carrier and tracking code
Definition at line 357 of file BrcKeplerOrbit.hpp.
|
protected |
Rt ascension of ascending node (rad)
Definition at line 383 of file BrcKeplerOrbit.hpp.
|
protected |
Rate of Rt ascension (rad/sec)
Definition at line 386 of file BrcKeplerOrbit.hpp.
|
protected |
SV PRN ID
Definition at line 358 of file BrcKeplerOrbit.hpp.
|
protected |
Satellite system ID (as per Rinex)
Definition at line 356 of file BrcKeplerOrbit.hpp.
|
protected |
Orbit epoch
Definition at line 359 of file BrcKeplerOrbit.hpp.
|
protected |
SV accuracy Index
Definition at line 360 of file BrcKeplerOrbit.hpp.
|
protected |
Argument of perigee (rad)
Definition at line 385 of file BrcKeplerOrbit.hpp.