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

Detailed Description

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>

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

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

- 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

◆ BrcKeplerOrbit() [1/3]

gnsstk::BrcKeplerOrbit::BrcKeplerOrbit ( )
noexcept

Constructors Default constuctor

Definition at line 52 of file BrcKeplerOrbit.cpp.

◆ BrcKeplerOrbit() [2/3]

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.

◆ BrcKeplerOrbit() [3/3]

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.

◆ ~BrcKeplerOrbit()

virtual gnsstk::BrcKeplerOrbit::~BrcKeplerOrbit ( )
inlinevirtual

Destructor.

Definition at line 121 of file BrcKeplerOrbit.hpp.

Member Function Documentation

◆ dump()

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

Output the contents of this orbit data to the given stream.

Definition at line 814 of file BrcKeplerOrbit.cpp.

◆ getA()

double gnsstk::BrcKeplerOrbit::getA ( ) const

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

Exceptions
InvalidRequest

Definition at line 665 of file BrcKeplerOrbit.cpp.

◆ getAccuracy()

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

Exceptions
InvalidRequest

Definition at line 533 of file BrcKeplerOrbit.cpp.

◆ getAdot()

double gnsstk::BrcKeplerOrbit::getAdot ( ) const

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

Exceptions
InvalidRequest

Definition at line 685 of file BrcKeplerOrbit.cpp.

◆ getAhalf()

double gnsstk::BrcKeplerOrbit::getAhalf ( ) const

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

Exceptions
InvalidRequest

Definition at line 675 of file BrcKeplerOrbit.cpp.

◆ getBeginningOfFitInterval()

CommonTime gnsstk::BrcKeplerOrbit::getBeginningOfFitInterval ( ) const

Returns the time at the beginning of the fit interval.

Exceptions
InvalidRequest

Definition at line 482 of file BrcKeplerOrbit.cpp.

◆ getCic()

double gnsstk::BrcKeplerOrbit::getCic ( ) const

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

Exceptions
InvalidRequest

Definition at line 614 of file BrcKeplerOrbit.cpp.

◆ getCis()

double gnsstk::BrcKeplerOrbit::getCis ( ) const

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

Exceptions
InvalidRequest

Definition at line 584 of file BrcKeplerOrbit.cpp.

◆ getCrc()

double gnsstk::BrcKeplerOrbit::getCrc ( ) const

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

Exceptions
InvalidRequest

Definition at line 594 of file BrcKeplerOrbit.cpp.

◆ getCrs()

double gnsstk::BrcKeplerOrbit::getCrs ( ) const

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

Exceptions
InvalidRequest

Definition at line 574 of file BrcKeplerOrbit.cpp.

◆ getCuc()

double gnsstk::BrcKeplerOrbit::getCuc ( ) const

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

Exceptions
InvalidRequest

Definition at line 604 of file BrcKeplerOrbit.cpp.

◆ getCus()

double gnsstk::BrcKeplerOrbit::getCus ( ) const

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

Exceptions
InvalidRequest

Definition at line 564 of file BrcKeplerOrbit.cpp.

◆ getDn()

double gnsstk::BrcKeplerOrbit::getDn ( ) const

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

Exceptions
InvalidRequest

Definition at line 645 of file BrcKeplerOrbit.cpp.

◆ getDnDot()

double gnsstk::BrcKeplerOrbit::getDnDot ( ) const

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

Exceptions
InvalidRequest

Definition at line 695 of file BrcKeplerOrbit.cpp.

◆ getEcc()

double gnsstk::BrcKeplerOrbit::getEcc ( ) const

This function returns the value of the eccentricity.

Exceptions
InvalidRequest

Definition at line 655 of file BrcKeplerOrbit.cpp.

◆ getEndOfFitInterval()

CommonTime gnsstk::BrcKeplerOrbit::getEndOfFitInterval ( ) const

Returns the time at the end of the fit interval.

Exceptions
InvalidRequest

Definition at line 492 of file BrcKeplerOrbit.cpp.

◆ getFullWeek()

short gnsstk::BrcKeplerOrbit::getFullWeek ( ) const

This function return the GPS week number for the orbit. this is the full GPS week (ie > 10 bits).

Exceptions
InvalidRequest

Definition at line 522 of file BrcKeplerOrbit.cpp.

◆ getI0()

double gnsstk::BrcKeplerOrbit::getI0 ( ) const

This function returns the value of the inclination in radians.

Exceptions
InvalidRequest

Definition at line 715 of file BrcKeplerOrbit.cpp.

◆ getIDot()

double gnsstk::BrcKeplerOrbit::getIDot ( ) const

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

Exceptions
InvalidRequest

Definition at line 745 of file BrcKeplerOrbit.cpp.

◆ getM0()

double gnsstk::BrcKeplerOrbit::getM0 ( ) const

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

Exceptions
InvalidRequest

Definition at line 635 of file BrcKeplerOrbit.cpp.

◆ getObsID()

ObsID gnsstk::BrcKeplerOrbit::getObsID ( ) const

This function returns the OBS ID of the orbit.

Exceptions
InvalidRequest

Definition at line 512 of file BrcKeplerOrbit.cpp.

◆ getOmega0()

double gnsstk::BrcKeplerOrbit::getOmega0 ( ) const

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

Exceptions
InvalidRequest

Definition at line 705 of file BrcKeplerOrbit.cpp.

◆ getOmegaDot()

double gnsstk::BrcKeplerOrbit::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 735 of file BrcKeplerOrbit.cpp.

◆ getOrbitEpoch()

CommonTime gnsstk::BrcKeplerOrbit::getOrbitEpoch ( ) const

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

Exceptions
InvalidRequest

Definition at line 477 of file BrcKeplerOrbit.cpp.

◆ getPRNID()

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.

Exceptions
InvalidRequest

Definition at line 502 of file BrcKeplerOrbit.cpp.

◆ getToe()

double gnsstk::BrcKeplerOrbit::getToe ( ) const

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

Exceptions
InvalidRequest

Definition at line 624 of file BrcKeplerOrbit.cpp.

◆ getURAoe()

short gnsstk::BrcKeplerOrbit::getURAoe ( ) const
Exceptions
InvalidRequest

Definition at line 554 of file BrcKeplerOrbit.cpp.

◆ getW()

double gnsstk::BrcKeplerOrbit::getW ( ) const

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

Exceptions
InvalidRequest

Definition at line 725 of file BrcKeplerOrbit.cpp.

◆ hasData()

bool gnsstk::BrcKeplerOrbit::hasData ( ) const

Return true if orbit data has been loaded

Definition at line 279 of file BrcKeplerOrbit.cpp.

◆ isHealthy()

bool gnsstk::BrcKeplerOrbit::isHealthy ( ) const

This function returns the health status of the SV.

Exceptions
InvalidRequest

Definition at line 284 of file BrcKeplerOrbit.cpp.

◆ loadData() [1/2]

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

Exceptions
InvalidParameter

Definition at line 182 of file BrcKeplerOrbit.cpp.

◆ loadData() [2/2]

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.

◆ operator!=()

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

Definition at line 124 of file BrcKeplerOrbit.hpp.

◆ operator==()

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

Definition at line 104 of file BrcKeplerOrbit.cpp.

◆ setAccuracy()

void gnsstk::BrcKeplerOrbit::setAccuracy ( const double &  acc)
Exceptions
InvalidRequest

Definition at line 544 of file BrcKeplerOrbit.cpp.

◆ svRelativity()

double gnsstk::BrcKeplerOrbit::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 452 of file BrcKeplerOrbit.cpp.

◆ svXvt()

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

Compute satellite position at the given time using this orbit data.

Exceptions
InvalidRequestif a required subframe has not been stored.

Definition at line 305 of file BrcKeplerOrbit.cpp.

◆ withinFitInterval()

bool gnsstk::BrcKeplerOrbit::withinFitInterval ( const CommonTime  ct) const

Return true if fit interval is valid.

Exceptions
InvalidRequest

Definition at line 294 of file BrcKeplerOrbit.cpp.

Friends And Related Function Documentation

◆ ::BrcKeplerOrbit_T

friend class ::BrcKeplerOrbit_T
friend

Definition at line 396 of file BrcKeplerOrbit.hpp.

◆ operator<<

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

Member Data Documentation

◆ A

double gnsstk::BrcKeplerOrbit::A
protected

Semi-major axis (m)

Definition at line 380 of file BrcKeplerOrbit.hpp.

◆ Adot

double gnsstk::BrcKeplerOrbit::Adot
protected

Rate of semi-major axis (m/sec)

Definition at line 382 of file BrcKeplerOrbit.hpp.

◆ Ahalf

double gnsstk::BrcKeplerOrbit::Ahalf
protected

Square Root of semi-major axis (m**.5)

Definition at line 381 of file BrcKeplerOrbit.hpp.

◆ beginFit

CommonTime gnsstk::BrcKeplerOrbit::beginFit
protected

Time at beginning of fit interval

Definition at line 392 of file BrcKeplerOrbit.hpp.

◆ Cic

double gnsstk::BrcKeplerOrbit::Cic
protected

Cosine inclination (rad)

Definition at line 370 of file BrcKeplerOrbit.hpp.

◆ Cis

double gnsstk::BrcKeplerOrbit::Cis
protected

Sine inclination (rad)

Definition at line 371 of file BrcKeplerOrbit.hpp.

◆ Crc

double gnsstk::BrcKeplerOrbit::Crc
protected

Cosine radius (m)

Definition at line 368 of file BrcKeplerOrbit.hpp.

◆ Crs

double gnsstk::BrcKeplerOrbit::Crs
protected

Sine radius (m)

Definition at line 369 of file BrcKeplerOrbit.hpp.

◆ Cuc

double gnsstk::BrcKeplerOrbit::Cuc
protected

Cosine latitude (rad)

Definition at line 366 of file BrcKeplerOrbit.hpp.

◆ Cus

double gnsstk::BrcKeplerOrbit::Cus
protected

Sine latitude (rad)

Definition at line 367 of file BrcKeplerOrbit.hpp.

◆ dataLoaded

bool gnsstk::BrcKeplerOrbit::dataLoaded
protected

True if data is present, False otherwise

Definition at line 355 of file BrcKeplerOrbit.hpp.

◆ dn

double gnsstk::BrcKeplerOrbit::dn
protected

Correction to mean motion (rad/sec)

Definition at line 377 of file BrcKeplerOrbit.hpp.

◆ dndot

double gnsstk::BrcKeplerOrbit::dndot
protected

Rate of correction to mean motion (rad/sec/sec)

Definition at line 378 of file BrcKeplerOrbit.hpp.

◆ ecc

double gnsstk::BrcKeplerOrbit::ecc
protected

Eccentricity

Definition at line 379 of file BrcKeplerOrbit.hpp.

◆ endFit

CommonTime gnsstk::BrcKeplerOrbit::endFit
protected

Time at end of fit interval

Definition at line 393 of file BrcKeplerOrbit.hpp.

◆ healthy

bool gnsstk::BrcKeplerOrbit::healthy
protected

SV health (healthy=true, other=false

Definition at line 361 of file BrcKeplerOrbit.hpp.

◆ i0

double gnsstk::BrcKeplerOrbit::i0
protected

Inclination (rad)

Definition at line 384 of file BrcKeplerOrbit.hpp.

◆ idot

double gnsstk::BrcKeplerOrbit::idot
protected

Rate of inclination angle (rad/sec)

Definition at line 387 of file BrcKeplerOrbit.hpp.

◆ M0

double gnsstk::BrcKeplerOrbit::M0
protected

Mean anomaly (rad)

Definition at line 376 of file BrcKeplerOrbit.hpp.

◆ obsID

ObsID gnsstk::BrcKeplerOrbit::obsID
protected

Defines carrier and tracking code

Definition at line 357 of file BrcKeplerOrbit.hpp.

◆ OMEGA0

double gnsstk::BrcKeplerOrbit::OMEGA0
protected

Rt ascension of ascending node (rad)

Definition at line 383 of file BrcKeplerOrbit.hpp.

◆ OMEGAdot

double gnsstk::BrcKeplerOrbit::OMEGAdot
protected

Rate of Rt ascension (rad/sec)

Definition at line 386 of file BrcKeplerOrbit.hpp.

◆ PRNID

short gnsstk::BrcKeplerOrbit::PRNID
protected

SV PRN ID

Definition at line 358 of file BrcKeplerOrbit.hpp.

◆ satSys

std::string gnsstk::BrcKeplerOrbit::satSys
protected

Satellite system ID (as per Rinex)

Definition at line 356 of file BrcKeplerOrbit.hpp.

◆ Toe

CommonTime gnsstk::BrcKeplerOrbit::Toe
protected

Orbit epoch

Definition at line 359 of file BrcKeplerOrbit.hpp.

◆ URAoe

short gnsstk::BrcKeplerOrbit::URAoe
protected

SV accuracy Index

Definition at line 360 of file BrcKeplerOrbit.hpp.

◆ w

double gnsstk::BrcKeplerOrbit::w
protected

Argument of perigee (rad)

Definition at line 385 of file BrcKeplerOrbit.hpp.


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


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