Define methods and data structures for internally storing navigation message data internally as read from some source.
Definition at line 63 of file NavDataFactoryWithStore.hpp.
#include <NavDataFactoryWithStore.hpp>
Classes | |
class | UniqueTimeOffset |
Public Types | |
typedef std::map< TimeCvtKey, OffsetEpochMap > | OffsetCvtMap |
Map from the time system conversion pair to the conversion objects. More... | |
typedef std::map< CommonTime, OffsetMap > | OffsetEpochMap |
typedef std::map< NavSatelliteID, NavDataPtr > | OffsetMap |
Protected Member Functions | |
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 | |
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 |
![]() | |
FactoryControl | factControl |
Configuration for the behavior of this factory. More... | |
NavValidityType | navValidity |
NavMessageTypeSet | procNavTypes |
Private Types | |
using | TOUSatMap = std::map< SatID, TOUSet > |
Map transmitting satellite to unique time offsets. More... | |
using | TOUSet = std::set< std::shared_ptr< StdNavTimeOffset >, UniqueTimeOffset > |
Collect unique StdNavTimeOffset data. More... | |
using | TOUSigMap = std::map< NavSignalID, TOUSet > |
Map signal to unique time offsets. More... | |
Private Attributes | |
TOUSigMap | touBySig |
Each signal's uniquely transmitted time offset. More... | |
TOUSatMap | touBySV |
Each satellite's uniquely transmitted time offset. More... | |
Friends | |
class | MultiFormatNavDataFactory |
Grant access to MultiFormatNavDataFactory for various functions. More... | |
class | NavDataFactoryStoreCallback |
Grant access to NavDataFactoryStoreCallback to data maps. More... | |
Additional Inherited Members | |
![]() | |
NavSignalSet | supportedSignals |
typedef std::map<TimeCvtKey, OffsetEpochMap> gnsstk::NavDataFactoryWithStore::OffsetCvtMap |
Map from the time system conversion pair to the conversion objects.
Definition at line 74 of file NavDataFactoryWithStore.hpp.
typedef std::map<CommonTime, OffsetMap> gnsstk::NavDataFactoryWithStore::OffsetEpochMap |
Map from the timeStamp of a TimeOffsetData object to the collection of TimeOffsetData objects.
Definition at line 72 of file NavDataFactoryWithStore.hpp.
typedef std::map<NavSatelliteID, NavDataPtr> gnsstk::NavDataFactoryWithStore::OffsetMap |
Map that will contain all TimeOffsetData objects with the same conversion pair broadcast at a given time.
Definition at line 69 of file NavDataFactoryWithStore.hpp.
|
private |
Map transmitting satellite to unique time offsets.
Definition at line 489 of file NavDataFactoryWithStore.hpp.
|
private |
Collect unique StdNavTimeOffset data.
Definition at line 487 of file NavDataFactoryWithStore.hpp.
|
private |
Map signal to unique time offsets.
Definition at line 491 of file NavDataFactoryWithStore.hpp.
gnsstk::NavDataFactoryWithStore::NavDataFactoryWithStore | ( | ) |
Initialize internal data.
Definition at line 55 of file NavDataFactoryWithStore.cpp.
|
inlinevirtual |
Clean up.
Definition at line 80 of file NavDataFactoryWithStore.hpp.
|
inline |
Add a nav message to the internal store (data).
[in] | nd | The nav data to add. |
Definition at line 149 of file NavDataFactoryWithStore.hpp.
bool gnsstk::NavDataFactoryWithStore::addNavData | ( | const NavDataPtr & | nd, |
NavMessageMap & | navMap, | ||
NavNearMessageMap & | navNearMap, | ||
OffsetCvtMap & | ofsMap | ||
) |
Add a nav message to the given store.
[in] | nd | The nav data to add. |
[out] | navMap | The map to load the data in. |
[out] | navNearMap | The map to load the data in for use by "Nearest" (as opposed to "User") searches. |
[out] | ofsMap | The map to load TimeOffsetData into. |
Definition at line 851 of file NavDataFactoryWithStore.cpp.
|
overridevirtual |
Remove all data from the internal store.
Reimplemented from gnsstk::NavDataFactory.
Definition at line 840 of file NavDataFactoryWithStore.cpp.
|
virtual |
Return a count of messages matching the given NavMessageID.
[in] | nmid | The NavMessageID to match. Wildcards may be used. In addition to the standard wildcard support in SatID, ObsID and NavID, the signal field may be set to "Unknown" to be treated as a wildcard, as may the messageType field. The following code snippet represents a NavMessageID with all wildcards (which will match the results from the size() method). |
The system field is initialized in the above constructor from the SatID system, which is why we're initializing it to "Unknown" (to make system a wildcard). But setting the SatID::system to Unknown doesn't make SatID a wildcard, that requires the SatID::makeWild() method calls.
Reimplemented in gnsstk::MultiFormatNavDataFactory.
Definition at line 1022 of file NavDataFactoryWithStore.cpp.
|
virtual |
Return a count of messages where the SUBJECT satellite ID matches the given SatID and message type.
[in] | satID | The subject satellite ID to match. |
[in] | nmt | The NavMessageType to match (default Unknown=all). |
Reimplemented in gnsstk::MultiFormatNavDataFactory.
Definition at line 1095 of file NavDataFactoryWithStore.cpp.
|
virtual |
Return a count of messages matching the given NavMessageType.
Reimplemented in gnsstk::MultiFormatNavDataFactory.
Definition at line 1112 of file NavDataFactoryWithStore.cpp.
|
virtual |
Return a count of messages matching the given SatelliteSystem and NavMessageType.
[in] | sys | The SatelliteSystem to match when counting. |
[in] | nmt | The NavMessageType to match (default Unknown=all). |
Reimplemented in gnsstk::MultiFormatNavDataFactory.
Definition at line 1076 of file NavDataFactoryWithStore.cpp.
|
overridevirtual |
Print the contents of this store in a human-readable format.
[in,out] | s | The stream to write the data to. |
[in] | dl | The level of detail the output should contain. |
Reimplemented from gnsstk::NavDataFactory.
Definition at line 1458 of file NavDataFactoryWithStore.cpp.
|
overridevirtual |
Remove all data from the internal storage in the time span [fromTime,toTime).
[in] | fromTime | The earliest time to be removed. |
[in] | toTime | The earliest time that will NOT be removed. |
Reimplemented from gnsstk::NavDataFactory.
Definition at line 556 of file NavDataFactoryWithStore.cpp.
|
overridevirtual |
Remove data for a specific satellite signal from the internal storage in the time span [fromTime,toTime).
[in] | fromTime | The earliest time to be removed. |
[in] | toTime | The earliest time that will NOT be removed. |
[in] | satID | The complete signal specification for the data to be removed (subject satellite, transmit satellite, system, carrier, code, nav). |
Reimplemented from gnsstk::NavDataFactory.
Definition at line 684 of file NavDataFactoryWithStore.cpp.
|
overridevirtual |
Remove data for all satellites matching a specific signal from the internal storage in the time span [fromTime,toTime).
[in] | fromTime | The earliest time to be removed. |
[in] | toTime | The earliest time that will NOT be removed. |
[in] | signal | The signal for the data to be removed (system, carrier, code, nav). |
Reimplemented from gnsstk::NavDataFactory.
Definition at line 831 of file NavDataFactoryWithStore.cpp.
|
overridevirtual |
Search the store to find the navigation message that meets the specified criteria.
[in] | nmid | Specify the message type, satellite and codes to match. |
[in] | when | The time of interest to search for data. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[out] | navOut | The resulting navigation message. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
[in] | order | Specify whether to search by receiver behavior or by nearest to when in time. |
Implements gnsstk::NavDataFactory.
Reimplemented in gnsstk::SP3NavDataFactory.
Definition at line 68 of file NavDataFactoryWithStore.cpp.
|
protectedvirtual |
Search the store to find the navigation message that meets the specified criteria using the nearest match in time (e.g. nearest toe to when).
[in] | nmid | Specify the message type, satellite and codes to match. |
[in] | when | The time of interest to search for data. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[out] | navData | The resulting navigation message. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
Class for gathering matches in findNearest(). It's only used in findNearest so it is declared and implemented here alone.
Constructor for the iterator yielded by lower_bound.
[in] | theMap | A pointer to the map containing the matching data. |
[in] | theIt | The iterator referring to the result from lower_bound. |
Definition at line 291 of file NavDataFactoryWithStore.cpp.
|
protectedvirtual |
Search the store to find the navigation message that meets the specified criteria using User-oriented data.
[in] | nmid | Specify the message type, satellite and codes to match. |
[in] | when | The time of interest to search for data. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[out] | navData | The resulting navigation message. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
Class for gathering matches in findUser(). It's only used in findUser so it is declared and implemented here alone.
Definition at line 105 of file NavDataFactoryWithStore.cpp.
|
overridevirtual |
Obtain a set of satellites+message types for which we have data in the given time span.
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Implements gnsstk::NavDataFactory.
Definition at line 1421 of file NavDataFactoryWithStore.cpp.
|
overridevirtual |
Obtain a set of satellites for which we have data in the given time span.
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Implements gnsstk::NavDataFactory.
Definition at line 1344 of file NavDataFactoryWithStore.cpp.
|
overridevirtual |
Obtain a set of satellites for which we have data of a specific message type in the given time span.
[in] | nmt | The navigation message type you're looking for. |
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Implements gnsstk::NavDataFactory.
Definition at line 1358 of file NavDataFactoryWithStore.cpp.
|
inlineoverridevirtual |
Determine the latest time for which this object can successfully determine the Xvt for any object.
Reimplemented from gnsstk::NavDataFactory.
Definition at line 173 of file NavDataFactoryWithStore.hpp.
CommonTime gnsstk::NavDataFactoryWithStore::getFirstTime | ( | const SatID & | sat | ) | const |
Determine the timestamp of the oldest record in this store for the given satellite.
Definition at line 1326 of file NavDataFactoryWithStore.cpp.
std::set< SatID > gnsstk::NavDataFactoryWithStore::getIndexSet | ( | const CommonTime & | fromTime, |
const CommonTime & | toTime | ||
) | const |
Similar to getAvailableSats() except it only returns the basic subject satellite ID, making no further distinction between codes.
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Definition at line 1380 of file NavDataFactoryWithStore.cpp.
std::set< SatID > gnsstk::NavDataFactoryWithStore::getIndexSet | ( | NavMessageType | nmt, |
const CommonTime & | fromTime, | ||
const CommonTime & | toTime | ||
) | const |
Similar to getAvailableSats() except it only returns the basic subject satellite ID, making no further distinction between codes.
[in] | nmt | The navigation message type you're looking for. |
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Definition at line 1400 of file NavDataFactoryWithStore.cpp.
|
inlineoverridevirtual |
Determine the earliest time for which this object can successfully determine the Xvt for any object.
Reimplemented from gnsstk::NavDataFactory.
Definition at line 166 of file NavDataFactoryWithStore.hpp.
CommonTime gnsstk::NavDataFactoryWithStore::getLastTime | ( | const SatID & | sat | ) | const |
Determine the timestamp of the newest record in this store for the given satellite.
Definition at line 1335 of file NavDataFactoryWithStore.cpp.
const NavMap * gnsstk::NavDataFactoryWithStore::getNavMap | ( | const NavMessageID & | nmid | ) | const |
Get read-only access to the nav data for a specific type/sat.
[in] | nmid | The nav message ID to obtain the map for. |
Definition at line 1442 of file NavDataFactoryWithStore.cpp.
|
inline |
Get read-only access to the nav data map (User priority).
Definition at line 343 of file NavDataFactoryWithStore.hpp.
|
inline |
Get read-only access to the nav data map (Nearest priority).
Definition at line 346 of file NavDataFactoryWithStore.hpp.
|
overridevirtual |
Get the offset, in seconds, to apply to times when converting them from fromSys to toSys.
[in] | fromSys | The time system to convert from. |
[in] | toSys | The time system to convert to. |
[in] | when | The time being converted, usually in the time system appropriate for a given nav message source. The details of what time system this should be in and any other restrictions will be documented in each leaf class, e.g. GPSLNavTimeOffset. |
[out] | offset | The offset when converting fromSys->toSys where when(toSys)=when(fromSys)-offset. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
Implements gnsstk::NavDataFactory.
Definition at line 439 of file NavDataFactoryWithStore.cpp.
|
inline |
Get read-only access to the time offset map.
Definition at line 349 of file NavDataFactoryWithStore.hpp.
Check the SV health status of the transmitting satellite of a navigation message.
[in] | ndp | A pointer to the NavData to verify. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
Definition at line 1224 of file NavDataFactoryWithStore.cpp.
|
virtual |
Return the number of distinct signals including PRN, in the data.
Reimplemented in gnsstk::MultiFormatNavDataFactory.
Definition at line 1145 of file NavDataFactoryWithStore.cpp.
|
virtual |
Return the number of distinct signals (ignoring PRN) in the data.
Reimplemented in gnsstk::MultiFormatNavDataFactory.
Definition at line 1130 of file NavDataFactoryWithStore.cpp.
|
virtual |
Return the number of nav messages in data.
Reimplemented in gnsstk::MultiFormatNavDataFactory.
Definition at line 1005 of file NavDataFactoryWithStore.cpp.
|
protected |
Update initialTime and finalTime according to a fit interval or other timestamp. For orbital elements with an actual fit interval, the beginning and end of the fit interval are specified as arguments. For tabular orbital data (e.g. SP3), the time stamp of the data is used for both parameters.
[in] | begin | The start of the fit interval of the orbital elements being processed. |
[in] | end | The end of the fit interval of the orbital elements being processed. |
Definition at line 957 of file NavDataFactoryWithStore.cpp.
|
protected |
Performs an appropriate validity check based on the desired validity.
[in] | ndp | The NavDataPtr object whose validity is to be checked. |
[in] | valid | The desired validity for navigation data. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
Definition at line 1178 of file NavDataFactoryWithStore.cpp.
|
protected |
Performs an appropriate validity check based on the desired validity.
[in] | ti | A container iterator pointing to the nav data to check. |
[in] | nm | The NavMap that ti is iterating over. |
[in] | valid | The desired validity for navigation data. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
Definition at line 1160 of file NavDataFactoryWithStore.cpp.
|
friend |
Grant access to MultiFormatNavDataFactory for various functions.
Definition at line 470 of file NavDataFactoryWithStore.hpp.
|
friend |
Grant access to NavDataFactoryStoreCallback to data maps.
Definition at line 472 of file NavDataFactoryWithStore.hpp.
|
protected |
Internal storage of navigation data for User searches.
Definition at line 456 of file NavDataFactoryWithStore.hpp.
|
protected |
Store the latest applicable orbit time here, by addNavData.
Definition at line 465 of file NavDataFactoryWithStore.hpp.
|
protected |
Map subject satellite ID to time stamp pair (oldest,newest).
Definition at line 467 of file NavDataFactoryWithStore.hpp.
|
protected |
Store the earliest applicable orbit time here, by addNavData.
Definition at line 463 of file NavDataFactoryWithStore.hpp.
|
protected |
Internal storage of navigation data for Nearest searches.
Definition at line 458 of file NavDataFactoryWithStore.hpp.
|
protected |
Store the time offset data separate from the other nav data because searching is very different.
Definition at line 461 of file NavDataFactoryWithStore.hpp.
|
private |
Each signal's uniquely transmitted time offset.
Definition at line 494 of file NavDataFactoryWithStore.hpp.
|
private |
Each satellite's uniquely transmitted time offset.
Definition at line 493 of file NavDataFactoryWithStore.hpp.