Public Member Functions | Public Attributes | Protected Attributes | List of all members
gnsstk::NavDataFactory Class Referenceabstract

Detailed Description

Abstract base class that defines the interface for searching for navigation data.

Definition at line 60 of file NavDataFactory.hpp.

#include <NavDataFactory.hpp>

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

Public Member Functions

virtual bool addDataSource (const std::string &source)=0
 
virtual void addTypeFilter (NavMessageType nmt)
 
virtual void clear ()
 Remove all data from the factory. More...
 
virtual void clearTypeFilter ()
 
virtual void dump (std::ostream &s, DumpDetail dl) const
 
virtual void edit (const CommonTime &fromTime, const CommonTime &toTime)
 
virtual void edit (const CommonTime &fromTime, const CommonTime &toTime, const NavSatelliteID &satID)
 
virtual void edit (const CommonTime &fromTime, const CommonTime &toTime, const NavSignalID &signal)
 
virtual bool find (const NavMessageID &nmid, const CommonTime &when, NavDataPtr &navOut, SVHealth xmitHealth, NavValidityType valid, NavSearchOrder order)=0
 
virtual NavMessageIDSet getAvailableMsgs (const CommonTime &fromTime, const CommonTime &toTime) const =0
 
virtual NavSatelliteIDSet getAvailableSats (const CommonTime &fromTime, const CommonTime &toTime) const =0
 
virtual NavSatelliteIDSet getAvailableSats (NavMessageType nmt, const CommonTime &fromTime, const CommonTime &toTime) const =0
 
virtual std::string getClassName () const
 Returns the fully-qualified class name. Used for debugging. More...
 
virtual std::string getFactoryFormats () const =0
 Return a comma-separated list of formats supported by this factory. More...
 
virtual CommonTime getFinalTime () const
 
std::set< SatIDgetIndexSet (const CommonTime &fromTime, const CommonTime &toTime) const
 
std::set< SatIDgetIndexSet (NavMessageType nmt, const CommonTime &fromTime, const CommonTime &toTime) const
 
virtual CommonTime getInitialTime () const
 
virtual bool getOffset (TimeSystem fromSys, TimeSystem toSys, const CommonTime &when, NavDataPtr &offset, SVHealth xmitHealth=SVHealth::Any, NavValidityType valid=NavValidityType::ValidOnly)=0
 
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...
 

Public Attributes

NavSignalSet supportedSignals
 

Protected Attributes

FactoryControl factControl
 Configuration for the behavior of this factory. More...
 
NavValidityType navValidity
 
NavMessageTypeSet procNavTypes
 

Constructor & Destructor Documentation

◆ NavDataFactory()

gnsstk::NavDataFactory::NavDataFactory ( )
inline

Initialize navValidity to All and procNavTypes to all known message types.

Definition at line 65 of file NavDataFactory.hpp.

◆ ~NavDataFactory()

virtual gnsstk::NavDataFactory::~NavDataFactory ( )
inlinevirtual

Clean up.

Definition at line 71 of file NavDataFactory.hpp.

Member Function Documentation

◆ addDataSource()

virtual bool gnsstk::NavDataFactory::addDataSource ( const std::string &  source)
pure virtual

Add a data source for this factory. This could be a file name, an IP address and port, or something else entirely, depending on the factory implementation. This method is declared here so that NavDataFactoryPtr objects can be set up without having to do any casting of pointers.

Parameters
[in]sourceA string describing the source of data for the factory.
Returns
true If the factory was able to process the data in source.

Implemented in gnsstk::MultiFormatNavDataFactory, gnsstk::SP3NavDataFactory, TestFactory, TestFactory, and gnsstk::NavDataFactoryWithStoreFile.

◆ addTypeFilter()

virtual void gnsstk::NavDataFactory::addTypeFilter ( NavMessageType  nmt)
inlinevirtual

Add a NavMessageType to be processed to this factory. This should be used prior to loading data and as an alternate approach to setTypeFilter().

Parameters
[in]nmtThe NavMessageType to be processed on the next load.

Reimplemented in gnsstk::MultiFormatNavDataFactory.

Definition at line 163 of file NavDataFactory.hpp.

◆ clear()

virtual void gnsstk::NavDataFactory::clear ( )
inlinevirtual

Remove all data from the factory.

Reimplemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

Definition at line 216 of file NavDataFactory.hpp.

◆ clearTypeFilter()

virtual void gnsstk::NavDataFactory::clearTypeFilter ( )
inlinevirtual

Clear the type filters of each of this factory. This should be used prior to loading data, and prior to using addTypeFilter(), if that API is going to be used instead of setTypeFilter().

Reimplemented in gnsstk::MultiFormatNavDataFactory.

Definition at line 155 of file NavDataFactory.hpp.

◆ dump()

virtual void gnsstk::NavDataFactory::dump ( std::ostream &  s,
DumpDetail  dl 
) const
inlinevirtual

Print the contents of this factory in a human-readable format.

Parameters
[in,out]sThe stream to write the data to.
[in]dlThe level of detail the output should contain.

Reimplemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

Definition at line 181 of file NavDataFactory.hpp.

◆ edit() [1/3]

virtual void gnsstk::NavDataFactory::edit ( const CommonTime fromTime,
const CommonTime toTime 
)
inlinevirtual

Remove all data from the factory in the time span [fromTime,toTime).

Parameters
[in]fromTimeThe earliest time to be removed.
[in]toTimeThe earliest time that will NOT be removed.

Reimplemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

Definition at line 189 of file NavDataFactory.hpp.

◆ edit() [2/3]

virtual void gnsstk::NavDataFactory::edit ( const CommonTime fromTime,
const CommonTime toTime,
const NavSatelliteID satID 
)
inlinevirtual

Remove data for a specific satellite signal from the factory in the time span [fromTime,toTime).

Parameters
[in]fromTimeThe earliest time to be removed.
[in]toTimeThe earliest time that will NOT be removed.
[in]satIDThe complete signal specification for the data to be removed (subject satellite, transmit satellite, system, carrier, code, nav).

Reimplemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

Definition at line 200 of file NavDataFactory.hpp.

◆ edit() [3/3]

virtual void gnsstk::NavDataFactory::edit ( const CommonTime fromTime,
const CommonTime toTime,
const NavSignalID signal 
)
inlinevirtual

Remove data for all satellites matching a specific signal from the factory in the time span [fromTime,toTime).

Parameters
[in]fromTimeThe earliest time to be removed.
[in]toTimeThe earliest time that will NOT be removed.
[in]signalThe signal for the data to be removed (system, carrier, code, nav).

Reimplemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

Definition at line 211 of file NavDataFactory.hpp.

◆ find()

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

Search the store as defined by each child class of NavDataFactory to find the navigation message that meets the specified criteria.

Parameters
[in]nmidSpecify the message type, satellite and codes to match.
[in]whenThe time of interest to search for data.
[in]xmitHealthThe desired health status of the transmitting satellite.
[out]navOutThe resulting navigation message.
[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, navData will be untouched.

Implemented in gnsstk::NavDataFactoryWithStore, gnsstk::SP3NavDataFactory, and gnsstk::MultiFormatNavDataFactory.

◆ getAvailableMsgs()

virtual NavMessageIDSet gnsstk::NavDataFactory::getAvailableMsgs ( const CommonTime fromTime,
const CommonTime toTime 
) const
pure virtual

Obtain a set of satellites+message types for which we have data in the given time span.

Parameters
[in]fromTimeThe earliest time for which any messages should be available.
[in]toTimeThe earliest time for which any messages should be NOT available.
Returns
a set of NavMessageID objects for which data is available from [fromTime,toTime).
Note
We specifically require the time range parameters to try to avoid making assumptions about the size of the data set (i.e. assuming the data is going to be a day's worth when it's actually several years.

Implemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

◆ getAvailableSats() [1/2]

virtual NavSatelliteIDSet gnsstk::NavDataFactory::getAvailableSats ( const CommonTime fromTime,
const CommonTime toTime 
) const
pure virtual

Obtain a set of satellites for which we have data in the given time span.

Parameters
[in]fromTimeThe earliest time for which any messages should be available.
[in]toTimeThe earliest time for which any messages should be NOT available.
Returns
a set of satellites for which data is available from [fromTime,toTime).
Note
We specifically require the time range parameters to try to avoid making assumptions about the size of the data set (i.e. assuming the data is going to be a day's worth when it's actually several years.

Implemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

◆ getAvailableSats() [2/2]

virtual NavSatelliteIDSet gnsstk::NavDataFactory::getAvailableSats ( NavMessageType  nmt,
const CommonTime fromTime,
const CommonTime toTime 
) const
pure virtual

Obtain a set of satellites for which we have data of a specific message type in the given time span.

Parameters
[in]nmtThe navigation message type you're looking for.
[in]fromTimeThe earliest time for which any messages should be available.
[in]toTimeThe earliest time for which any messages should be NOT available.
Returns
a set of satellites for which data is available from [fromTime,toTime).
Note
We specifically require the time range parameters to try to avoid making assumptions about the size of the data set (i.e. assuming the data is going to be a day's worth when it's actually several years.

Implemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

◆ getClassName()

std::string gnsstk::NavDataFactory::getClassName ( ) const
virtual

Returns the fully-qualified class name. Used for debugging.

Definition at line 117 of file NavDataFactory.cpp.

◆ getFactoryFormats()

virtual std::string gnsstk::NavDataFactory::getFactoryFormats ( ) const
pure virtual

◆ getFinalTime()

virtual CommonTime gnsstk::NavDataFactory::getFinalTime ( ) const
inlinevirtual

Determine the latest time for which this object can successfully determine the Xvt for any object.

Returns
The initial time, or CommonTime::BEGINNING_OF_TIME if no data is available.

Reimplemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

Definition at line 230 of file NavDataFactory.hpp.

◆ getIndexSet() [1/2]

std::set< SatID > gnsstk::NavDataFactory::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.

Parameters
[in]fromTimeThe earliest time for which any messages should be available.
[in]toTimeThe earliest time for which any messages should be NOT available.
Returns
a set of satellites for which data is available from [fromTime,toTime).
Note
We specifically require the time range parameters to try to avoid making assumptions about the size of the data set (i.e. assuming the data is going to be a day's worth when it's actually several years.

Definition at line 88 of file NavDataFactory.cpp.

◆ getIndexSet() [2/2]

std::set< SatID > gnsstk::NavDataFactory::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.

Parameters
[in]nmtThe navigation message type you're looking for.
[in]fromTimeThe earliest time for which any messages should be available.
[in]toTimeThe earliest time for which any messages should be NOT available.
Returns
a set of satellites for which data is available from [fromTime,toTime).
Note
We specifically require the time range parameters to try to avoid making assumptions about the size of the data set (i.e. assuming the data is going to be a day's worth when it's actually several years.

Definition at line 102 of file NavDataFactory.cpp.

◆ getInitialTime()

virtual CommonTime gnsstk::NavDataFactory::getInitialTime ( ) const
inlinevirtual

Determine the earliest time for which this object can successfully determine the Xvt for any object.

Returns
The initial time, or CommonTime::END_OF_TIME if no data is available.

Reimplemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

Definition at line 223 of file NavDataFactory.hpp.

◆ getOffset()

virtual bool gnsstk::NavDataFactory::getOffset ( TimeSystem  fromSys,
TimeSystem  toSys,
const CommonTime when,
NavDataPtr offset,
SVHealth  xmitHealth = SVHealth::Any,
NavValidityType  valid = NavValidityType::ValidOnly 
)
pure virtual

Get the offset, in seconds, to apply to times when converting them from fromSys to toSys.

Precondition
If xmithHealth is set to anything other than "Any", ephemeris data must be loaded in order to obtain satellite health to match.
Parameters
[in]fromSysThe time system to convert from.
[in]toSysThe time system to convert to.
[in]whenThe 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]offsetThe offset when converting fromSys->toSys where when(toSys)=when(fromSys)-offset.
[in]xmitHealthThe desired health status of the transmitting satellite.
[in]validSpecify whether to search only for valid or invalid messages, or both.
Returns
true if an offset is available, false if not.

Implemented in gnsstk::NavDataFactoryWithStore, and gnsstk::MultiFormatNavDataFactory.

◆ getTypeFilter()

NavMessageTypeSet gnsstk::NavDataFactory::getTypeFilter ( ) const
inline

Return the set of NavMessageType that would be processed on the next load.

Warning
MultiFormatNavDataFactory can get out of sync and report incorrect type filter information, if, for example, you manipulate its contained factories' type filters independently.

Definition at line 148 of file NavDataFactory.hpp.

◆ isPresent()

bool gnsstk::NavDataFactory::isPresent ( const NavMessageID nmid,
const CommonTime fromTime,
const CommonTime toTime 
)
virtual

Determine if a given message/satellite/signal is available in the factory.

Parameters
[in]nmidThe message/satellite/signal to search for.
[in]fromTimeThe earliest time for which a matching message should be available.
[in]toTimeThe latest time for which a matching message should be available.
Returns
true if the given satellite/signal is has data in the given time span.
Note
We specifically require the time range parameters to try to avoid making assumptions about the size of the data set (i.e. assuming the data is going to be a day's worth when it's actually several years).
This method iterates over the given time span until it finds a match. As such, it is strongly recommended that you not use BEGINNING_OF_TIME or END_OF_TIME, as it takes several minutes to iterate over that time span.

Reimplemented in gnsstk::MultiFormatNavDataFactory.

Definition at line 49 of file NavDataFactory.cpp.

◆ isTypePresent()

virtual bool gnsstk::NavDataFactory::isTypePresent ( NavMessageType  nmt,
const NavSatelliteID satID,
const CommonTime fromTime,
const CommonTime toTime 
)
inlinevirtual

Determine if a given satellite/signal is available in the factory.

Parameters
[in]nmtThe navigation message type of interest.
[in]satIDThe satellite/signal to search for.
[in]fromTimeThe earliest time for which a matching message should be available.
[in]toTimeThe latest time for which a matching message should be available.
Returns
true if the given satellite/signal is has data in the given time span.
Note
We specifically require the time range parameters to try to avoid making assumptions about the size of the data set (i.e. assuming the data is going to be a day's worth when it's actually several years).
This method iterates over the given time span until it finds a match. As such, it is strongly recommended that you not use BEGINNING_OF_TIME or END_OF_TIME, as it takes several minutes to iterate over that time span.
Named isTypePresent instead of overloading isPresent because of peculiarities of C++ overloading, i.e. derived classes would have to override both, defeating the purposed of having this short-cut.

Definition at line 359 of file NavDataFactory.hpp.

◆ setControl()

virtual void gnsstk::NavDataFactory::setControl ( const FactoryControl ctrl)
inlinevirtual

Set the configuration parameters for this and any child NavDataFactory or PNBNavDataFactory objects.

Parameters
[in]ctrlThe configuration for the factory/factories.

Reimplemented in gnsstk::MultiFormatNavDataFactory.

Definition at line 372 of file NavDataFactory.hpp.

◆ setTypeFilter()

virtual void gnsstk::NavDataFactory::setTypeFilter ( const NavMessageTypeSet nmts)
inlinevirtual

Indicate what nav message types the factories should be loading. This should be called before the factories acquire any data.

Warning
In order to properly support SP3, if you want to include Ephemeris data, you should also include Clock data in the filter.
You MUST include Health data in the type filter if you intend to look up data by health status other than "Any" (exceptions: if you're ONLY looking up orbit data that has self-contained health status).
Parameters
[in]nmtsThe set of nav message types to be processed by the factories.

Reimplemented in gnsstk::MultiFormatNavDataFactory.

Definition at line 139 of file NavDataFactory.hpp.

◆ setValidityFilter()

virtual void gnsstk::NavDataFactory::setValidityFilter ( NavValidityType  nvt)
inlinevirtual

Set the factory's handling of valid and invalid navigation data. This should be called before any find() calls.

Parameters
[in]nvtThe new nav data loading filter method.

Reimplemented in gnsstk::MultiFormatNavDataFactory.

Definition at line 124 of file NavDataFactory.hpp.

Member Data Documentation

◆ factControl

FactoryControl gnsstk::NavDataFactory::factControl
protected

Configuration for the behavior of this factory.

Definition at line 383 of file NavDataFactory.hpp.

◆ navValidity

NavValidityType gnsstk::NavDataFactory::navValidity
protected

Determines how the factory should load nav data from the store.

Note
There's nothing to prevent someone from doing something silly like setting this to "InvalidOnly" then doing a find for "ValidOnly" which of course will result in no results.

Definition at line 390 of file NavDataFactory.hpp.

◆ procNavTypes

NavMessageTypeSet gnsstk::NavDataFactory::procNavTypes
protected

Determines which types of navigation message data the factory should be processing.

Definition at line 394 of file NavDataFactory.hpp.

◆ supportedSignals

NavSignalSet gnsstk::NavDataFactory::supportedSignals

Define which signals this factory supports. This will be empty by default, which means that NavLibrary would not use this factory, so it is up to the derived classes to fill out the signals as appropriate.

Definition at line 379 of file NavDataFactory.hpp.


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


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