Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
gnsstk::SP3NavDataFactory Class Reference

Detailed Description

Factory class for loading SP3 data.

Note
In order to use SP3 data, both ephemeris and clock must be selected via setTypeFilter (by default all data is selected).
SP3 does not contain health information.

Definition at line 58 of file SP3NavDataFactory.hpp.

#include <SP3NavDataFactory.hpp>

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

Public Types

enum  ClkInterpType { ClkInterpType::Linear, ClkInterpType::Lagrange }
 Types of interpolation that can be used on the clock data. More...
 
- Public Types inherited from gnsstk::NavDataFactoryWithStore
typedef std::map< TimeCvtKey, OffsetEpochMapOffsetCvtMap
 Map from the time system conversion pair to the conversion objects. More...
 
typedef std::map< CommonTime, OffsetMapOffsetEpochMap
 
typedef std::map< NavSatelliteID, NavDataPtrOffsetMap
 

Public Member Functions

bool addDataSource (const std::string &source) override
 
void clearClock ()
 
void disableClkDataGapCheck ()
 Disable checking of clock data gaps. More...
 
void disableClockIntervalCheck ()
 Disable checking of maximum interval in clock store. More...
 
void disableDataGapCheck ()
 Disable checking of data gaps in both position and clock. More...
 
void disableIntervalCheck ()
 Disable checking of maximum interval in both position and clock. More...
 
void disablePosDataGapCheck ()
 Disable checking of position data gaps. More...
 
void disablePosIntervalCheck ()
 Disable checking of maximum interval in position store. More...
 
void dumpConfig (std::ostream &s) const
 
bool find (const NavMessageID &nmid, const CommonTime &when, NavDataPtr &navOut, SVHealth xmitHealth, NavValidityType valid, NavSearchOrder order) override
 
double getClkGapInterval () const
 Get current clock gap interval. More...
 
unsigned int getClockInterpOrder () const
 
double getClockMaxInterval () const
 Get current maximum interval in the clock store. More...
 
double getClockTimeStep (const SatID &sat) const
 
std::string getFactoryFormats () const override
 Return a comma-separated list of formats supported by this factory. More...
 
double getPosGapInterval () const
 Get current position gap interval. More...
 
unsigned int getPositionInterpOrder () const
 Get current interpolation order for the position table. More...
 
double getPositionTimeStep (const SatID &sat) const
 
double getPosMaxInterval () const
 Get current maximum interval in the position store. More...
 
TimeSystem getTimeSystem () const
 Return the time system of the loaded data. More...
 
bool isClkDataGapCheck ()
 Is clock gap checking on? More...
 
bool isClkIntervalCheck ()
 Is interval checking for clock on? More...
 
bool isPosDataGapCheck ()
 Is position gap checking on? More...
 
bool isPosIntervalCheck ()
 Is interval checking for position on? More...
 
bool process (const std::string &filename, NavDataFactoryCallback &cb) override
 
void rejectBadClocks (bool flag)
 
void rejectBadPositions (bool flag)
 
void rejectPredClocks (bool flag)
 
void rejectPredPositions (bool flag)
 
void setClkGapInterval (double interval)
 Set clock gap interval and turn on gap checking. More...
 
void setClockInterpOrder (unsigned int order)
 
void setClockLagrangeInterp ()
 
void setClockLinearInterp ()
 
void setClockMaxInterval (double interval)
 
void setPosGapInterval (double interval)
 Set position gap interval and turn on gap checking. More...
 
void setPositionInterpOrder (unsigned int order)
 
void setPosMaxInterval (double interval)
 
 SP3NavDataFactory ()
 
void useRinexClockData (bool useRC=true)
 
virtual ~SP3NavDataFactory ()
 Clean up. More...
 
- Public Member Functions inherited from gnsstk::NavDataFactoryWithStoreFile
 NavDataFactoryWithStoreFile ()
 
virtual ~NavDataFactoryWithStoreFile ()
 Clean up. More...
 
- Public Member Functions inherited from gnsstk::NavDataFactoryWithStore
bool addNavData (const NavDataPtr &nd)
 
bool addNavData (const NavDataPtr &nd, NavMessageMap &navMap, NavNearMessageMap &navNearMap, OffsetCvtMap &ofsMap)
 
void clear () override
 Remove all data from the internal store. More...
 
virtual size_t count (const NavMessageID &nmid) const
 
virtual size_t count (const SatID &satID, NavMessageType nmt=NavMessageType::Unknown) const
 
virtual size_t count (NavMessageType nmt) const
 
virtual size_t count (SatelliteSystem sys, NavMessageType nmt=NavMessageType::Unknown) const
 
void dump (std::ostream &s, DumpDetail dl) const override
 
void edit (const CommonTime &fromTime, const CommonTime &toTime) override
 
void edit (const CommonTime &fromTime, const CommonTime &toTime, const NavSatelliteID &satID) override
 
void edit (const CommonTime &fromTime, const CommonTime &toTime, const NavSignalID &signal) override
 
NavMessageIDSet getAvailableMsgs (const CommonTime &fromTime, const CommonTime &toTime) const override
 
NavSatelliteIDSet getAvailableSats (const CommonTime &fromTime, const CommonTime &toTime) const override
 
NavSatelliteIDSet getAvailableSats (NavMessageType nmt, const CommonTime &fromTime, const CommonTime &toTime) const override
 
CommonTime getFinalTime () const override
 
CommonTime getFirstTime (const SatID &sat) const
 
std::set< SatIDgetIndexSet (const CommonTime &fromTime, const CommonTime &toTime) const
 
std::set< SatIDgetIndexSet (NavMessageType nmt, const CommonTime &fromTime, const CommonTime &toTime) const
 
CommonTime getInitialTime () const override
 
CommonTime getLastTime (const SatID &sat) const
 
const NavMapgetNavMap (const NavMessageID &nmid) const
 
const NavMessageMapgetNavMessageMap () const
 Get read-only access to the nav data map (User priority). More...
 
const NavNearMessageMapgetNavNearMessageMap () const
 Get read-only access to the nav data map (Nearest priority). More...
 
bool getOffset (TimeSystem fromSys, TimeSystem toSys, const CommonTime &when, NavDataPtr &offset, SVHealth xmitHealth=SVHealth::Any, NavValidityType valid=NavValidityType::ValidOnly) override
 
const OffsetCvtMapgetTimeOffsetMap () const
 Get read-only access to the time offset map. More...
 
 NavDataFactoryWithStore ()
 Initialize internal data. More...
 
virtual size_t numSatellites () const
 Return the number of distinct signals including PRN, in the data. More...
 
virtual size_t numSignals () const
 Return the number of distinct signals (ignoring PRN) in the data. More...
 
virtual size_t size () const
 Return the number of nav messages in data. More...
 
virtual ~NavDataFactoryWithStore ()
 Clean up. More...
 
- Public Member Functions inherited from gnsstk::NavDataFactory
virtual void addTypeFilter (NavMessageType nmt)
 
virtual void clearTypeFilter ()
 
virtual std::string getClassName () const
 Returns the fully-qualified class name. Used for debugging. More...
 
std::set< SatIDgetIndexSet (const CommonTime &fromTime, const CommonTime &toTime) const
 
std::set< SatIDgetIndexSet (NavMessageType nmt, const CommonTime &fromTime, const CommonTime &toTime) const
 
NavMessageTypeSet getTypeFilter () const
 
virtual bool isPresent (const NavMessageID &nmid, const CommonTime &fromTime, const CommonTime &toTime)
 
virtual bool isTypePresent (NavMessageType nmt, const NavSatelliteID &satID, const CommonTime &fromTime, const CommonTime &toTime)
 
 NavDataFactory ()
 
virtual void setControl (const FactoryControl &ctrl)
 
virtual void setTypeFilter (const NavMessageTypeSet &nmts)
 
virtual void setValidityFilter (NavValidityType nvt)
 
virtual ~NavDataFactory ()
 Clean up. More...
 

Static Public Member Functions

static bool convertToClock (const SP3Header &head, const SP3Data &navIn, bool isC, NavDataPtr &clkOut)
 
static bool convertToOrbit (const SP3Header &head, const SP3Data &navIn, bool isC, NavDataPtr &navOut)
 
static bool transNavMsgID (const NavMessageID &nmidIn, NavMessageID &nmidOut)
 

Static Public Attributes

static const GNSSTK_EXPORT NavType ntBeiDou
 
static const GNSSTK_EXPORT NavType ntGalileo
 
static const GNSSTK_EXPORT NavType ntGLONASS
 
static const GNSSTK_EXPORT NavType ntGPS
 Generic NavTypes for each GNSS. More...
 
static const GNSSTK_EXPORT NavType ntQZSS
 
static const GNSSTK_EXPORT ObsID oidBeiDou
 
static const GNSSTK_EXPORT ObsID oidGalileo
 
static const GNSSTK_EXPORT ObsID oidGLONASS
 
static const GNSSTK_EXPORT ObsID oidGPS
 Generic ObsIDs for each GNSS. More...
 
static const GNSSTK_EXPORT ObsID oidQZSS
 

Private Member Functions

bool addRinexClock (const std::string &source, NavDataFactoryCallback &cb)
 
bool findGeneric (NavMessageType nmt, const NavSatelliteID &nsid, const CommonTime &when, NavDataPtr &navData)
 
bool findIterator (NavSatMap::iterator &sati, const CommonTime &when, NavDataPtr &navData, unsigned halfOrder, bool findEph, bool checkDataGap, bool checkInterval, double gapInterval, double maxInterval)
 
void interpolateClk (const NavMap::iterator &ti1, const NavMap::iterator &ti3, const CommonTime &when, NavDataPtr &navData)
 
void interpolateEph (const NavMap::iterator &ti1, const NavMap::iterator &ti3, const CommonTime &when, NavDataPtr &navData)
 
bool loadIntoMap (const std::string &filename, NavMessageMap &navMap, NavNearMessageMap &navNearMap, OffsetCvtMap &ofsMap) override
 
double nomTimeStep (const NavMessageID &nmid) const
 
bool store (bool process, NavDataFactoryCallback &cb, NavDataPtr &obj)
 

Static Private Member Functions

static bool setSignal (const SatID &sat, NavMessageID &signal)
 

Private Attributes

bool checkDataGapClk
 
bool checkDataGapPos
 
bool checkIntervalClk
 
bool checkIntervalPos
 
double gapIntervalClk
 
double gapIntervalPos
 
unsigned halfOrderClk
 
unsigned halfOrderPos
 
ClkInterpType interpType
 Clock data interpolation method. More...
 
double maxIntervalClk
 
double maxIntervalPos
 
bool rejectBadClockFlag
 
bool rejectBadPosFlag
 
bool rejectPredClockFlag
 
bool rejectPredPosFlag
 
TimeSystem storeTimeSystem
 
bool useSP3clock
 

Additional Inherited Members

- Public Attributes inherited from gnsstk::NavDataFactory
NavSignalSet supportedSignals
 
- Protected Member Functions inherited from gnsstk::NavDataFactoryWithStore
virtual bool findNearest (const NavMessageID &nmid, const CommonTime &when, NavDataPtr &navData, SVHealth xmitHealth, NavValidityType valid)
 
virtual bool findUser (const NavMessageID &nmid, const CommonTime &when, NavDataPtr &navData, SVHealth xmitHealth, NavValidityType valid)
 
bool matchHealth (NavData *ndp, SVHealth xmitHealth)
 
bool updateInitialFinal (const CommonTime &begin, const CommonTime &end)
 
bool validityCheck (const NavDataPtr &ndp, NavValidityType valid, SVHealth xmitHealth, const CommonTime &when)
 
bool validityCheck (const NavMap::iterator &ti, NavMap &nm, NavValidityType valid, SVHealth xmitHealth, const CommonTime &when)
 
- Protected Attributes inherited from gnsstk::NavDataFactoryWithStore
NavMessageMap data
 Internal storage of navigation data for User searches. More...
 
CommonTime finalTime
 Store the latest applicable orbit time here, by addNavData. More...
 
std::map< SatID, std::pair< CommonTime, CommonTime > > firstLastMap
 Map subject satellite ID to time stamp pair (oldest,newest). More...
 
CommonTime initialTime
 Store the earliest applicable orbit time here, by addNavData. More...
 
NavNearMessageMap nearestData
 Internal storage of navigation data for Nearest searches. More...
 
OffsetCvtMap offsetData
 
- Protected Attributes inherited from gnsstk::NavDataFactory
FactoryControl factControl
 Configuration for the behavior of this factory. More...
 
NavValidityType navValidity
 
NavMessageTypeSet procNavTypes
 

Member Enumeration Documentation

◆ ClkInterpType

Types of interpolation that can be used on the clock data.

Enumerator
Linear 
Lagrange 

Definition at line 62 of file SP3NavDataFactory.hpp.

Constructor & Destructor Documentation

◆ SP3NavDataFactory()

gnsstk::SP3NavDataFactory::SP3NavDataFactory ( )

Fill supportedSignals.

Note
Only GPS nav is supported so only that will be added to supportedSignals.

Definition at line 83 of file SP3NavDataFactory.cpp.

◆ ~SP3NavDataFactory()

virtual gnsstk::SP3NavDataFactory::~SP3NavDataFactory ( )
inlinevirtual

Clean up.

Definition at line 81 of file SP3NavDataFactory.hpp.

Member Function Documentation

◆ addDataSource()

bool gnsstk::SP3NavDataFactory::addDataSource ( const std::string &  source)
overridevirtual

Load a file into internal store.

Postcondition
If RINEX clock data is successfully loaded, the factory will be automatically switched to use RINEX clock data in place of SP3 clock. As a side effect, any SP3 clock data will be removed from the internal store and any subsequent attempts to load SP3 data will not include the clock data from those SP3 files.
Parameters
[in]sourceThe path to the SP3 file to load.
Returns
true on success, false on failure.

Reimplemented from gnsstk::NavDataFactoryWithStoreFile.

Definition at line 556 of file SP3NavDataFactory.cpp.

◆ addRinexClock()

bool gnsstk::SP3NavDataFactory::addRinexClock ( const std::string &  source,
NavDataFactoryCallback cb 
)
private

Load a RINEX clock file into internal store.

Postcondition
If RINEX clock data is successfully loaded, the factory will be automatically switched to use RINEX clock data in place of SP3 clock.
Parameters
[in]sourceThe path to the RINEX clock file to load.
[in]cbThe callback object that stores or otherwise processes the given data (obj).
Returns
true on success, false on failure.
Note
store TimeSystem must be consistent.

Definition at line 709 of file SP3NavDataFactory.cpp.

◆ clearClock()

void gnsstk::SP3NavDataFactory::clearClock ( )
inline

Clear the clock dataset only, meaning remove all clock data from the internal store.

Definition at line 167 of file SP3NavDataFactory.hpp.

◆ convertToClock()

bool gnsstk::SP3NavDataFactory::convertToClock ( const SP3Header head,
const SP3Data navIn,
bool  isC,
NavDataPtr clkOut 
)
static

Convert SP3 nav data to a OrbitDataSP3 object with SV clock offset data.

Parameters
[in]headThe header from the SP3 file being converted.
[in]navInThe SP3 nav message data to convert.
[in]isCIf true, the SP3Data comes from an SP3c file.
[out]clkOutThe OrbitDataSP3 object to be added to the factory data map.
Returns
true if the conversion is valid, false if the input data is unsupported.

Definition at line 903 of file SP3NavDataFactory.cpp.

◆ convertToOrbit()

bool gnsstk::SP3NavDataFactory::convertToOrbit ( const SP3Header head,
const SP3Data navIn,
bool  isC,
NavDataPtr navOut 
)
static

Convert SP3 nav data to a OrbitDataSP3 object with position and velocity data.

Parameters
[in]headThe header from the SP3 file being converted.
[in]navInThe SP3 nav message data to convert.
[in]isCIf true, the SP3Data comes from an SP3c file.
[out]navOutThe OrbitDataSP3 object to be added to the factory data map.
Returns
true if the conversion is valid, false if the input data is unsupported.
Todo:
the ::pow statement was pulled from SP3EphemerisStore. I'm not 100% sure it's possible to get sigma this way. We should determine if it is possible and if so write tests for this case. Look for all uses of isC and correlationFlag.

Definition at line 836 of file SP3NavDataFactory.cpp.

◆ disableClkDataGapCheck()

void gnsstk::SP3NavDataFactory::disableClkDataGapCheck ( )
inline

Disable checking of clock data gaps.

Definition at line 212 of file SP3NavDataFactory.hpp.

◆ disableClockIntervalCheck()

void gnsstk::SP3NavDataFactory::disableClockIntervalCheck ( )
inline

Disable checking of maximum interval in clock store.

Definition at line 240 of file SP3NavDataFactory.hpp.

◆ disableDataGapCheck()

void gnsstk::SP3NavDataFactory::disableDataGapCheck ( )
inline

Disable checking of data gaps in both position and clock.

Definition at line 192 of file SP3NavDataFactory.hpp.

◆ disableIntervalCheck()

void gnsstk::SP3NavDataFactory::disableIntervalCheck ( )
inline

Disable checking of maximum interval in both position and clock.

Definition at line 232 of file SP3NavDataFactory.hpp.

◆ disablePosDataGapCheck()

void gnsstk::SP3NavDataFactory::disablePosDataGapCheck ( )
inline

Disable checking of position data gaps.

Definition at line 196 of file SP3NavDataFactory.hpp.

◆ disablePosIntervalCheck()

void gnsstk::SP3NavDataFactory::disablePosIntervalCheck ( )
inline

Disable checking of maximum interval in position store.

Definition at line 236 of file SP3NavDataFactory.hpp.

◆ dumpConfig()

void gnsstk::SP3NavDataFactory::dumpConfig ( std::ostream &  s) const

Print the current configuration of this factory to the given stream.

Definition at line 1487 of file SP3NavDataFactory.cpp.

◆ find()

bool gnsstk::SP3NavDataFactory::find ( const NavMessageID nmid,
const CommonTime when,
NavDataPtr navOut,
SVHealth  xmitHealth,
NavValidityType  valid,
NavSearchOrder  order 
)
overridevirtual

Search the store to find the navigation message that meets the specified criteria. SP3 is only capable of containing ephemeris data. This implementation of the find method works by finding existing data in the position/velocity tables and returning an OrbitDataSP3 that is already interpolated to get the appropriate values at the desired time.

Parameters
[in]nmidSpecify the message type, satellite and codes to match.
[in]whenThe time of interest to search for data.
[out]navOutThe resulting navigation message.
[in]xmitHealthThe desired health status of the transmitting satellite.
[in]validSpecify whether to search only for valid or invalid messages, or both.
[in]orderSpecify whether to search by receiver behavior or by nearest to when in time.
Returns
true if successful. If false, navOut will be untouched.
Todo:
If someone attempts to use SP3 but sets the type filter to exclude clock, no clock data will be stored and this will end up returning false. I'm not sure if this is valid behavior.

Reimplemented from gnsstk::NavDataFactoryWithStore.

Definition at line 238 of file SP3NavDataFactory.cpp.

◆ findGeneric()

bool gnsstk::SP3NavDataFactory::findGeneric ( NavMessageType  nmt,
const NavSatelliteID nsid,
const CommonTime when,
NavDataPtr navData 
)
private

Implementation of the core of what goes on in the find() method. This is a separate function because the user-accessible find() method needs to acquire both clock and ephemeris data to return a complete record.

Parameters
[in]nmtThe type of message to find (Ephemeris or Clock).
[in]nsidThe satellite and codes to search for.
[in]whenThe time for which the data should be retrieved (and interpolated, if appropriate).
[in,out]navDataThe navData object, in the form of an OrbitDataSP3, to contain the results. If navData is not allocated, it will be.
Returns
true on success, false if unable to find data or interpolate.

Definition at line 272 of file SP3NavDataFactory.cpp.

◆ findIterator()

bool gnsstk::SP3NavDataFactory::findIterator ( NavSatMap::iterator &  sati,
const CommonTime when,
NavDataPtr navData,
unsigned  halfOrder,
bool  findEph,
bool  checkDataGap,
bool  checkInterval,
double  gapInterval,
double  maxInterval 
)
private
Note
at one point I tried using the std::distance() function, but it ended up being extremely slow

Definition at line 343 of file SP3NavDataFactory.cpp.

◆ getClkGapInterval()

double gnsstk::SP3NavDataFactory::getClkGapInterval ( ) const
inline

Get current clock gap interval.

Definition at line 216 of file SP3NavDataFactory.hpp.

◆ getClockInterpOrder()

unsigned int gnsstk::SP3NavDataFactory::getClockInterpOrder ( ) const
inline

Get current interpolation order for the clock data (meaningless if the interpolation type is linear).

Definition at line 303 of file SP3NavDataFactory.hpp.

◆ getClockMaxInterval()

double gnsstk::SP3NavDataFactory::getClockMaxInterval ( ) const
inline

Get current maximum interval in the clock store.

Definition at line 248 of file SP3NavDataFactory.hpp.

◆ getClockTimeStep()

double gnsstk::SP3NavDataFactory::getClockTimeStep ( const SatID sat) const

Get the nominal time step in seconds for the clock data and the given sat

Definition at line 1431 of file SP3NavDataFactory.cpp.

◆ getFactoryFormats()

std::string gnsstk::SP3NavDataFactory::getFactoryFormats ( ) const
overridevirtual

Return a comma-separated list of formats supported by this factory.

Implements gnsstk::NavDataFactory.

Definition at line 823 of file SP3NavDataFactory.cpp.

◆ getPosGapInterval()

double gnsstk::SP3NavDataFactory::getPosGapInterval ( ) const
inline

Get current position gap interval.

Definition at line 200 of file SP3NavDataFactory.hpp.

◆ getPositionInterpOrder()

unsigned int gnsstk::SP3NavDataFactory::getPositionInterpOrder ( ) const
inline

Get current interpolation order for the position table.

Definition at line 293 of file SP3NavDataFactory.hpp.

◆ getPositionTimeStep()

double gnsstk::SP3NavDataFactory::getPositionTimeStep ( const SatID sat) const

Get the nominal time step in seconds for the position data and the given sat

Definition at line 1423 of file SP3NavDataFactory.cpp.

◆ getPosMaxInterval()

double gnsstk::SP3NavDataFactory::getPosMaxInterval ( ) const
inline

Get current maximum interval in the position store.

Definition at line 244 of file SP3NavDataFactory.hpp.

◆ getTimeSystem()

TimeSystem gnsstk::SP3NavDataFactory::getTimeSystem ( ) const
inline

Return the time system of the loaded data.

Definition at line 184 of file SP3NavDataFactory.hpp.

◆ interpolateClk()

void gnsstk::SP3NavDataFactory::interpolateClk ( const NavMap::iterator &  ti1,
const NavMap::iterator &  ti3,
const CommonTime when,
NavDataPtr navData 
)
private

Interpolate the SV clock correction data (bias/drift/drift rate) from the data in the sequence [ti1,ti3).

Parameters
[in]ti1The iterator marking the first OrbitDataSP3 object in the internal store to be used in interpolation.
[in]ti3The iterator marking the first OrbitDataSP3 object in the internal store after ti1 to NOT be used interpolation (use like end() in typical iterator usage).
[in]whenThe time at which to interpolate the data.
[in,out]navDataThe pre-allocated NavDataPtr object that stores the interpolated OrbitDataSP3.
Todo:
this doesn't look right to me because it seems like it should be biasSigData[Nhi]-biasSigData[low] but this is how it is in SP3EphemerisStore.

Definition at line 1184 of file SP3NavDataFactory.cpp.

◆ interpolateEph()

void gnsstk::SP3NavDataFactory::interpolateEph ( const NavMap::iterator &  ti1,
const NavMap::iterator &  ti3,
const CommonTime when,
NavDataPtr navData 
)
private

Interpolate the ephemeris data (position/velocity/acceleration) from the data in the sequence [ti1,ti3).

Parameters
[in]ti1The iterator marking the first OrbitDataSP3 object in the internal store to be used in interpolation.
[in]ti3The iterator marking the first OrbitDataSP3 object in the internal store after ti1 to NOT be used interpolation (use like end() in typical iterator usage).
[in]whenThe time at which to interpolate the data.
[in,out]navDataThe pre-allocated NavDataPtr object that stores the interpolated OrbitDataSP3.

Definition at line 1010 of file SP3NavDataFactory.cpp.

◆ isClkDataGapCheck()

bool gnsstk::SP3NavDataFactory::isClkDataGapCheck ( )
inline

Is clock gap checking on?

Definition at line 208 of file SP3NavDataFactory.hpp.

◆ isClkIntervalCheck()

bool gnsstk::SP3NavDataFactory::isClkIntervalCheck ( )
inline

Is interval checking for clock on?

Definition at line 228 of file SP3NavDataFactory.hpp.

◆ isPosDataGapCheck()

bool gnsstk::SP3NavDataFactory::isPosDataGapCheck ( )
inline

Is position gap checking on?

Definition at line 188 of file SP3NavDataFactory.hpp.

◆ isPosIntervalCheck()

bool gnsstk::SP3NavDataFactory::isPosIntervalCheck ( )
inline

Is interval checking for position on?

Definition at line 224 of file SP3NavDataFactory.hpp.

◆ loadIntoMap()

bool gnsstk::SP3NavDataFactory::loadIntoMap ( const std::string &  filename,
NavMessageMap navMap,
NavNearMessageMap navNearMap,
OffsetCvtMap ofsMap 
)
inlineoverrideprivatevirtual

Load SP3 nav data into a map.

Note
This method is unused, in favor of overriding addDataSource directly and using its own store rather than the one in NavDataFactoryWithStore.
Parameters
[in]filenameThe path of the file to load.
[out]navMapThe map to store the loaded data in.
[out]navNearMapThe map to store the loaded data in for use by "Nearest" (as opposed to "User") searches.
[out]ofsMapThe map to load TimeOffsetData into.
Returns
true on succes, false on failure.

Implements gnsstk::NavDataFactoryWithStoreFile.

Definition at line 413 of file SP3NavDataFactory.hpp.

◆ nomTimeStep()

double gnsstk::SP3NavDataFactory::nomTimeStep ( const NavMessageID nmid) const
private

Compute the nominal timestep of the data for the given signal.

Returns
0 if the signal is not found, otherwise return the nominal timestep in seconds.

Definition at line 1439 of file SP3NavDataFactory.cpp.

◆ process()

bool gnsstk::SP3NavDataFactory::process ( const std::string &  filename,
NavDataFactoryCallback cb 
)
overridevirtual

Process the data in the specified file using a custom callback. Each message decoded by the factory class will be run through NavDataFactoryCallback::process(). It is expected that the user will derive a class from NavDataFactoryCallback, implement the details of the process method to suit their use case, and apply it here.

Parameters
[in]filenameThe path of the file to process.
[in]cbThe call back to use to process the data in the file.
Returns
true on success, false on failure.
Note
store TimeSystem must be consistent.

Implements gnsstk::NavDataFactoryWithStoreFile.

Definition at line 566 of file SP3NavDataFactory.cpp.

◆ rejectBadClocks()

void gnsstk::SP3NavDataFactory::rejectBadClocks ( bool  flag)
inline

Set rejectBadClockFlag; if true then all values in a record are rejected when that record contains a bad clock, while adding data to the store.

Definition at line 270 of file SP3NavDataFactory.hpp.

◆ rejectBadPositions()

void gnsstk::SP3NavDataFactory::rejectBadPositions ( bool  flag)
inline

Set rejectBadPosFlag; if true then all values in a record are rejected when that record contains a bad position, while adding data to the store.

Definition at line 264 of file SP3NavDataFactory.hpp.

◆ rejectPredClocks()

void gnsstk::SP3NavDataFactory::rejectPredClocks ( bool  flag)
inline

Set rejectPredClockFlag; if true then predicted clock values are rejected when adding data to the store.

Definition at line 281 of file SP3NavDataFactory.hpp.

◆ rejectPredPositions()

void gnsstk::SP3NavDataFactory::rejectPredPositions ( bool  flag)
inline

Set rejectPredPosFlag; if true then predicted position values in a record are rejected when adding data to the store.

Definition at line 276 of file SP3NavDataFactory.hpp.

◆ setClkGapInterval()

void gnsstk::SP3NavDataFactory::setClkGapInterval ( double  interval)
inline

Set clock gap interval and turn on gap checking.

Definition at line 220 of file SP3NavDataFactory.hpp.

◆ setClockInterpOrder()

void gnsstk::SP3NavDataFactory::setClockInterpOrder ( unsigned int  order)

Set the interpolation order for the clock table; it is forced to be even. This is ignored if the clock interpolation type is linear.

Definition at line 1397 of file SP3NavDataFactory.cpp.

◆ setClockLagrangeInterp()

void gnsstk::SP3NavDataFactory::setClockLagrangeInterp ( )

Set the type of clock interpolation to Lagrange (the default); set the order of the interpolation to 10.

Definition at line 1407 of file SP3NavDataFactory.cpp.

◆ setClockLinearInterp()

void gnsstk::SP3NavDataFactory::setClockLinearInterp ( )

Set the type of clock interpolation to linear (interpolation order is ignored).

Definition at line 1415 of file SP3NavDataFactory.cpp.

◆ setClockMaxInterval()

void gnsstk::SP3NavDataFactory::setClockMaxInterval ( double  interval)
inline

Set maximum interval and turn on interval checking in the clock store There is no default.

Definition at line 258 of file SP3NavDataFactory.hpp.

◆ setPosGapInterval()

void gnsstk::SP3NavDataFactory::setPosGapInterval ( double  interval)
inline

Set position gap interval and turn on gap checking.

Definition at line 204 of file SP3NavDataFactory.hpp.

◆ setPositionInterpOrder()

void gnsstk::SP3NavDataFactory::setPositionInterpOrder ( unsigned int  order)
inline

Set the interpolation order for the position table; it is forced to be even.

Definition at line 298 of file SP3NavDataFactory.hpp.

◆ setPosMaxInterval()

void gnsstk::SP3NavDataFactory::setPosMaxInterval ( double  interval)
inline

Set maximum interval and turn on interval checking in the position store There is no default.

Definition at line 253 of file SP3NavDataFactory.hpp.

◆ setSignal()

bool gnsstk::SP3NavDataFactory::setSignal ( const SatID sat,
NavMessageID signal 
)
staticprivate

Set the obs and nav identification for the given NavMessageID object, using a satellite system only. This is really just a "best guess" for a given system.

Parameters
[in]satThe satellite identifier (incl GNSS) for the data.
[in,out]signalThe NavMessageID object to update.
Returns
true if successful, false if the system is unsupported.
Todo:
What do we do with non-standard antennas?
Todo:
GLONASS frequency offset should be set to something, but what?
Todo:
add more systems as needed.

Definition at line 1333 of file SP3NavDataFactory.cpp.

◆ store()

bool gnsstk::SP3NavDataFactory::store ( bool  process,
NavDataFactoryCallback cb,
NavDataPtr obj 
)
private

Store the given NavDataPtr object internally, provided it passes any requested valditity checking.

Parameters
[in]processIf true, validate and store. If false, no storing or validation is done. This is done to obviate having to check whether ephemeris or clock data is being processed prior to calling this method.
[in]cbThe callback object that stores or otherwise processes the given data (obj).
[in,out]objThe object to (potentially) be stored. Regardless of whether the object is stored, the pointer will be reset, freeing this particular use.
Returns
false if a failed attempt was made to store the data, true otherwise.

Definition at line 943 of file SP3NavDataFactory.cpp.

◆ transNavMsgID()

bool gnsstk::SP3NavDataFactory::transNavMsgID ( const NavMessageID nmidIn,
NavMessageID nmidOut 
)
static

Because SP3 files don't identify signals (the data is computed, not broadcast). we use this function to translate from arbitrary NavMessageID objects into ones that will match the internally stored data. This is used by find() but is public in case someone finds a use for it.

Note
The system used for making the generic NavMessageID comes from the subject satellite.
Parameters
[in]nmidInThe NavMessageID to translate to generic form.
[out]nmidOutThe generic form of the NavMessageID.
Returns
true if successful, false if the system is unsupported.

Definition at line 1379 of file SP3NavDataFactory.cpp.

◆ useRinexClockData()

void gnsstk::SP3NavDataFactory::useRinexClockData ( bool  useRC = true)

Choose to load the clock data tables from RINEX clock files. This will clear the clock store if the state changes (from using to not using or vice versa). The addDataSource() method should be called after this, to load data into the clock store from RINEX clock files (or SP3 if changing back to using SP3 clock files).

Note
If this is used prior to calling addDataSource() with an SP3 file, the SP3 clock data will not be loaded. But if it's called after loading SP3 or RINEX clock data, that data will be cleared from the internal storage.

Definition at line 1387 of file SP3NavDataFactory.cpp.

Member Data Documentation

◆ checkDataGapClk

bool gnsstk::SP3NavDataFactory::checkDataGapClk
private

Flag to check for data gaps in clock data (default false). If this flag is enabled, data gaps wider than member data gapInterval will result in findGeneric() returning false.

Definition at line 450 of file SP3NavDataFactory.hpp.

◆ checkDataGapPos

bool gnsstk::SP3NavDataFactory::checkDataGapPos
private

Flag to check for data gaps in position data (default false). If this flag is enabled, data gaps wider than member data gapInterval will result in findGeneric() returning false.

Definition at line 440 of file SP3NavDataFactory.hpp.

◆ checkIntervalClk

bool gnsstk::SP3NavDataFactory::checkIntervalClk
private

Flag to check the length of available interpolation interval for clock data (default false). If this flag is enabled, interpolation intervals shorter than member data maxInterval will result in findGeneric() returning false.

Definition at line 474 of file SP3NavDataFactory.hpp.

◆ checkIntervalPos

bool gnsstk::SP3NavDataFactory::checkIntervalPos
private

Flag to check the length of available interpolation interval for position data (default false). If this flag is enabled, interpolation intervals shorter than member data maxInterval will result in findGeneric() returning false.

Definition at line 461 of file SP3NavDataFactory.hpp.

◆ gapIntervalClk

double gnsstk::SP3NavDataFactory::gapIntervalClk
private

Smallest time interval (seconds) that constitutes a data gap in clock data.

Definition at line 454 of file SP3NavDataFactory.hpp.

◆ gapIntervalPos

double gnsstk::SP3NavDataFactory::gapIntervalPos
private

Smallest time interval (seconds) that constitutes a data gap in position data.

Definition at line 444 of file SP3NavDataFactory.hpp.

◆ halfOrderClk

unsigned gnsstk::SP3NavDataFactory::halfOrderClk
private

Half of the interpolation order for clock interpolation. When interpolating SP3 records, 2x this number of records are used, centered on the time of interest.

Definition at line 492 of file SP3NavDataFactory.hpp.

◆ halfOrderPos

unsigned gnsstk::SP3NavDataFactory::halfOrderPos
private

Half of the interpolation order for position interpolation. When interpolating SP3 records, 2x this number of records are used, centered on the time of interest.

Definition at line 486 of file SP3NavDataFactory.hpp.

◆ interpType

ClkInterpType gnsstk::SP3NavDataFactory::interpType
private

Clock data interpolation method.

Definition at line 520 of file SP3NavDataFactory.hpp.

◆ maxIntervalClk

double gnsstk::SP3NavDataFactory::maxIntervalClk
private

Maximum total time interval (seconds) allowed for clock interpolation. For example, with dt=900s and 10-point Lagrange interpolation, this should be (10-1)*900s+1=8101s.

Definition at line 480 of file SP3NavDataFactory.hpp.

◆ maxIntervalPos

double gnsstk::SP3NavDataFactory::maxIntervalPos
private

Maximum total time interval (seconds) allowed for position interpolation. For example, with dt=900s and 10-point Lagrange interpolation, this should be (10-1)*900s+1=8101s.

Definition at line 467 of file SP3NavDataFactory.hpp.

◆ ntBeiDou

const NavType gnsstk::SP3NavDataFactory::ntBeiDou
static

Definition at line 72 of file SP3NavDataFactory.hpp.

◆ ntGalileo

const NavType gnsstk::SP3NavDataFactory::ntGalileo
static

Definition at line 71 of file SP3NavDataFactory.hpp.

◆ ntGLONASS

const NavType gnsstk::SP3NavDataFactory::ntGLONASS
static

Definition at line 71 of file SP3NavDataFactory.hpp.

◆ ntGPS

const NavType gnsstk::SP3NavDataFactory::ntGPS
static

Generic NavTypes for each GNSS.

Definition at line 71 of file SP3NavDataFactory.hpp.

◆ ntQZSS

const NavType gnsstk::SP3NavDataFactory::ntQZSS
static

Definition at line 71 of file SP3NavDataFactory.hpp.

◆ oidBeiDou

const ObsID gnsstk::SP3NavDataFactory::oidBeiDou
static

Definition at line 69 of file SP3NavDataFactory.hpp.

◆ oidGalileo

const ObsID gnsstk::SP3NavDataFactory::oidGalileo
static

Definition at line 68 of file SP3NavDataFactory.hpp.

◆ oidGLONASS

const ObsID gnsstk::SP3NavDataFactory::oidGLONASS
static

Definition at line 68 of file SP3NavDataFactory.hpp.

◆ oidGPS

const ObsID gnsstk::SP3NavDataFactory::oidGPS
static

Generic ObsIDs for each GNSS.

Definition at line 68 of file SP3NavDataFactory.hpp.

◆ oidQZSS

const ObsID gnsstk::SP3NavDataFactory::oidQZSS
static

Definition at line 68 of file SP3NavDataFactory.hpp.

◆ rejectBadClockFlag

bool gnsstk::SP3NavDataFactory::rejectBadClockFlag
private

Flag to reject all data in a record when that record contains bad clocks, default true.

Note
this flag has no effect if the clock store comes from RINEX clock files.

Definition at line 507 of file SP3NavDataFactory.hpp.

◆ rejectBadPosFlag

bool gnsstk::SP3NavDataFactory::rejectBadPosFlag
private

Flag to reject all data in a record when that record contains a bad position, default true.

Definition at line 501 of file SP3NavDataFactory.hpp.

◆ rejectPredClockFlag

bool gnsstk::SP3NavDataFactory::rejectPredClockFlag
private

Flag to reject predicted clock data, using clockPredFlag in SP3Data.

Note
this flag has no effect if the clock store comes from RINEX clock files.

Definition at line 517 of file SP3NavDataFactory.hpp.

◆ rejectPredPosFlag

bool gnsstk::SP3NavDataFactory::rejectPredPosFlag
private

Flag to reject predicted position data, using orbitPredFlag in SP3Data.

Definition at line 511 of file SP3NavDataFactory.hpp.

◆ storeTimeSystem

TimeSystem gnsstk::SP3NavDataFactory::storeTimeSystem
private

Used to make sure that we don't load SP3 data with inconsistent time systems.

Definition at line 434 of file SP3NavDataFactory.hpp.

◆ useSP3clock

bool gnsstk::SP3NavDataFactory::useSP3clock
private

Flag indicating whether the clock store contains data from SP3 (true, the default) or RINEX clock (false) files

Definition at line 497 of file SP3NavDataFactory.hpp.


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


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