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

Detailed Description

Factory class for loading RINEX NAV (2, 3) data.

Note
While in theory Y code and P code LNav are supported, RINEX NAV does not support the identification of the codes contained in the files. As such, this factory only "produces" L1 C/A tagged data for LNav.

Definition at line 57 of file RinexNavDataFactory.hpp.

#include <RinexNavDataFactory.hpp>

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

Public Member Functions

std::string getFactoryFormats () const override
 Return a comma-separated list of formats supported by this factory. More...
 
bool loadIntoMap (const std::string &filename, NavMessageMap &navMap, NavNearMessageMap &navNearMap, OffsetCvtMap &ofsMap) override
 
bool process (const std::string &filename, NavDataFactoryCallback &cb) override
 
 RinexNavDataFactory ()
 Fill supportedSignals. More...
 
virtual ~RinexNavDataFactory ()
 Clean up. More...
 
- Public Member Functions inherited from gnsstk::NavDataFactoryWithStoreFile
bool addDataSource (const std::string &source) override
 
 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
 
bool find (const NavMessageID &nmid, const CommonTime &when, NavDataPtr &navOut, SVHealth xmitHealth, NavValidityType valid, NavSearchOrder order) 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 convertToHealth (const Rinex3NavData &navIn, NavDataPtrList &healthOut)
 
static void convertToHealthE1B (const Rinex3NavData &navIn, NavDataPtrList &healthOut)
 
static void convertToHealthE5a (const Rinex3NavData &navIn, NavDataPtrList &healthOut)
 
static void convertToHealthE5b (const Rinex3NavData &navIn, NavDataPtrList &healthOut)
 
static bool convertToIono (const CommonTime &when, const Rinex3NavHeader &navIn, NavDataPtrList &navOut)
 
static bool convertToISC (const Rinex3NavData &navIn, NavDataPtr &navOut)
 
static bool convertToOffset (const Rinex3NavHeader &navIn, NavDataPtrList &navOut)
 
static bool convertToOrbit (const Rinex3NavData &navIn, NavDataPtr &navOut)
 
static void convertToOrbitDataKepler (const Rinex3NavData &navIn, OrbitDataKepler *navOut)
 
static uint8_t decodeSISA (double accuracy)
 
static double encodeSISA (uint8_t sisa)
 
static void fillNavData (const Rinex3NavData &navIn, NavDataPtr &navOut)
 
static void fixTimeBeiDou (const Rinex3NavData &navIn, OrbitDataKepler &navOut)
 
static void fixTimeGalileo (const Rinex3NavData &navIn, OrbitDataKepler &navOut)
 
static void fixTimeGPS (const Rinex3NavData &navIn, GPSLNavEph &navOut)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ RinexNavDataFactory()

gnsstk::RinexNavDataFactory::RinexNavDataFactory ( )

Fill supportedSignals.

Definition at line 73 of file RinexNavDataFactory.cpp.

◆ ~RinexNavDataFactory()

virtual gnsstk::RinexNavDataFactory::~RinexNavDataFactory ( )
inlinevirtual

Clean up.

Definition at line 64 of file RinexNavDataFactory.hpp.

Member Function Documentation

◆ convertToHealth()

bool gnsstk::RinexNavDataFactory::convertToHealth ( const Rinex3NavData navIn,
NavDataPtrList healthOut 
)
static

Convert RINEX nav data to a system/code-appropriate NavHealthData object.

Parameters
[in]navInThe RINEX nav message data to convert.
[out]healthOutThe NavHealthData object(s) to be added to the factory data map.
Returns
true if the conversion is valid, false if the input data is unsupported.
Todo:
add other GNSSes

Definition at line 628 of file RinexNavDataFactory.cpp.

◆ convertToHealthE1B()

void gnsstk::RinexNavDataFactory::convertToHealthE1B ( const Rinex3NavData navIn,
NavDataPtrList healthOut 
)
static

Convert RINEX nav data for Galileo E1B to a GalINavHealth object.

Parameters
[in]navInThe RINEX nav message data to convert.
[out]healthOutThe NavHealthData object(s) to be added to the factory data map.
Note
the RINEX 3.04 spec has bits 8-9 of data sources to indicate whether SISA etc. are for E5a or E5b. There's no mention of E1B.

Definition at line 706 of file RinexNavDataFactory.cpp.

◆ convertToHealthE5a()

void gnsstk::RinexNavDataFactory::convertToHealthE5a ( const Rinex3NavData navIn,
NavDataPtrList healthOut 
)
static

Convert RINEX nav data for Galileo E5a to a GalFNavHealth object.

Parameters
[in]navInThe RINEX nav message data to convert.
[out]healthOutThe NavHealthData object(s) to be added to the factory data map.

Definition at line 744 of file RinexNavDataFactory.cpp.

◆ convertToHealthE5b()

void gnsstk::RinexNavDataFactory::convertToHealthE5b ( const Rinex3NavData navIn,
NavDataPtrList healthOut 
)
static

Convert RINEX nav data for Galileo E5b to a GalINavHealth object.

Parameters
[in]navInThe RINEX nav message data to convert.
[out]healthOutThe NavHealthData object(s) to be added to the factory data map.

Definition at line 777 of file RinexNavDataFactory.cpp.

◆ convertToIono()

bool gnsstk::RinexNavDataFactory::convertToIono ( const CommonTime when,
const Rinex3NavHeader navIn,
NavDataPtrList navOut 
)
static

Convert RINEX nav header data into a IonoNavData object.

Parameters
[in]whenA timestamp to use for the IonoNavData, since the RINEX nav header doesn't include time information on its own (usually a timestamp pulled from the data).
[in]navInThe RINEX nav header to convert.
[out]navOutA list (possibly empty) of the resulting converted data. This may include NavHealthData which is necessary due to the minimalist storage used by RINEX vs the implementation of NavLibrary::getIonoCorr().
Returns
true if successful.
Todo:
We don't know whether the iono data came from I/NAV or F/NAV so I just arbitrarily chose to store it as I/NAV. Probably the best thing to do would be to update the find() method in the future so that it hides all of these assumptions from the user.

Definition at line 861 of file RinexNavDataFactory.cpp.

◆ convertToISC()

bool gnsstk::RinexNavDataFactory::convertToISC ( const Rinex3NavData navIn,
NavDataPtr navOut 
)
static

Convert RINEX nav data to a InterSigCorr object.

Parameters
[in]navInThe RINEX nav message data to convert.
[out]navOutThe OrbitData object to be added to the factory data map.
Returns
true if the conversion is valid, false if the input data is unsupported.
Note
The I/NAV ISC data contains what's in the F/NAV data, i.e. BGD(E1,E5a), so there's no reason to output a separate GalFNavISC object from RINEX NAV data.

Definition at line 1032 of file RinexNavDataFactory.cpp.

◆ convertToOffset()

bool gnsstk::RinexNavDataFactory::convertToOffset ( const Rinex3NavHeader navIn,
NavDataPtrList navOut 
)
static

Convert RINEX nav header data to a TimeOffsetData object.

Parameters
[in]navInThe RINEX nav header to convert.
[out]navOutThe GPSCNavTimeOffset object generated from navIn.
Returns
true if successful.
Bug:
the time stamp is likely to cause problems for GLONASS which doesn't have a reference time.
Todo:
add support for delta t LSF in RINEX 3 (leapDelta, leapWeek, leapDay in Rinex3NavHeader).

Definition at line 811 of file RinexNavDataFactory.cpp.

◆ convertToOrbit()

bool gnsstk::RinexNavDataFactory::convertToOrbit ( const Rinex3NavData navIn,
NavDataPtr navOut 
)
static

Convert RINEX nav data to a system/code-appropriate OrbitData object.

Parameters
[in]navInThe RINEX nav message data to convert.
[out]navOutThe OrbitData object to be added to the factory data map.
Returns
true if the conversion is valid, false if the input data is unsupported.
Note
rinex includes health information for three signals, but I/NAV ephemerides will only include health for E5b and E1B, while F/NAV only includes health for E1a
rinex can combine I/NAV ephemerides, but we just assume one or the other.
Todo:
set sv health correctly
Note
rinex includes health information for three signals, but I/NAV ephemerides will only include health for E5b and E1B, while F/NAV only includes health for E1a
Todo:
add other GNSSes

Definition at line 326 of file RinexNavDataFactory.cpp.

◆ convertToOrbitDataKepler()

void gnsstk::RinexNavDataFactory::convertToOrbitDataKepler ( const Rinex3NavData navIn,
OrbitDataKepler navOut 
)
static

Copy common elements from Rinex3NavData to OrbitDataKepler.

Parameters
[in]navInThe RINEX nav message data to convert.
[in,out]navOutThe pre-allocated OrbitDataKepler object to be updated from the RINEX nav data.

Definition at line 598 of file RinexNavDataFactory.cpp.

◆ decodeSISA()

uint8_t gnsstk::RinexNavDataFactory::decodeSISA ( double  accuracy)
static

Convert accuracy in meters into a Galileo Signal In Space Accuracy index.

Note
This uses RINEX conventions (naturally) of using -1 to mean No Accuracy Predicition Available.
Parameters
[in]accuracyThe signal accuracy in meters.

Definition at line 1293 of file RinexNavDataFactory.cpp.

◆ encodeSISA()

double gnsstk::RinexNavDataFactory::encodeSISA ( uint8_t  sisa)
static

Convert a Galileo Signal In Space Accuracy index to accuracy in meters.

Note
This uses RINEX conventions (naturally) of using -1 to mean No Accuracy Predicition Available.
Parameters
[in]sisaThe signal in space accuracy index.
Returns
The signal accuracy in meters.

Definition at line 1318 of file RinexNavDataFactory.cpp.

◆ fillNavData()

void gnsstk::RinexNavDataFactory::fillNavData ( const Rinex3NavData navIn,
NavDataPtr navOut 
)
static

Fill the high level (NavData and above) data for an object using information from a RINEX nav record.

Parameters
[in]navInThe RINEX nav message data to convert.
[in,out]navOutA NavDataPtr that has already been allocated for the appropriate leaf node class (e.g. GPSLNavEph, GPSLNavHealth, etc.)
Postcondition
If navIn contains valid, supported data, the timeStamp and signal data members will be filled in.
Todo:
figure out how to handle the case where Bit 0 and 2 are both set (see table A8).
Todo:
add other GNSSes

Definition at line 1115 of file RinexNavDataFactory.cpp.

◆ fixTimeBeiDou()

void gnsstk::RinexNavDataFactory::fixTimeBeiDou ( const Rinex3NavData navIn,
OrbitDataKepler navOut 
)
static

Set the xmitTime field in navOut according to the appropriate data in navIn.

Parameters
[in]navInA BeiDou D1Nav or D2Nav record in RINEX format.
[in,out]navOutThe BDSD1NavEph or BDSD2NavEph object whose time stamps are to be set.
Todo:
Probably need to do half week tests on the transmit time

Definition at line 1285 of file RinexNavDataFactory.cpp.

◆ fixTimeGalileo()

void gnsstk::RinexNavDataFactory::fixTimeGalileo ( const Rinex3NavData navIn,
OrbitDataKepler navOut 
)
static

Set the xmitTime field in navOut according to the appropriate data in navIn.

Parameters
[in]navInA Galileo I/Nav or F/Nav record in RINEX format.
[in,out]navOutThe GalINavEph or GalFNavEph object whose time stamps are to be set.
Todo:
Probably need to do half week tests on the transmit time

Definition at line 1273 of file RinexNavDataFactory.cpp.

◆ fixTimeGPS()

void gnsstk::RinexNavDataFactory::fixTimeGPS ( const Rinex3NavData navIn,
GPSLNavEph navOut 
)
static

Set the xmitTime, Toc and Toe fields in navOut according to the appropriate data in navIn.

Parameters
[in]navInA GPS LNav record in RINEX format.
[in,out]navOutThe GPSLNavEph object whose time stamps are to be set.

Definition at line 1219 of file RinexNavDataFactory.cpp.

◆ getFactoryFormats()

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

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

Implements gnsstk::NavDataFactory.

Definition at line 311 of file RinexNavDataFactory.cpp.

◆ loadIntoMap()

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

Load RINEX NAV data into a map.

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 success, false on failure.

Implements gnsstk::NavDataFactoryWithStoreFile.

Definition at line 107 of file RinexNavDataFactory.cpp.

◆ process()

bool gnsstk::RinexNavDataFactory::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.
Todo:
what about embedded RINEX headers?
Todo:
what about embedded RINEX headers?

Implements gnsstk::NavDataFactoryWithStoreFile.

Definition at line 116 of file RinexNavDataFactory.cpp.


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


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