Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
gnsstk::PNBMultiGNSSNavDataFactory Class Reference

Detailed Description

Define a wrapper class for all known PNBNavDataFactory classes, allowing a single class to be used to handle all GNSSes.

Warning
Because the factories used by this class are maintained in a static object, the validity filters and type filters are essentially "non-volatile" across object instantiations. That is, if you create one PNBMultiGNSSNavDataFactory, change the filter settings, destroy it and create another, the filter settings will be the same as they were in the destroyed object. Do not expect the filter settings to be reinitialized with each constructed PNBMultiGNSSNavDataFactory. Additionally, contained factories will retain their state unless you explicitly call resetState(). When using contiguous data, it's probably best to not use resetState(), but when using non-contiguous data, using resetState() prevents invalid assembly of data.

Definition at line 66 of file PNBMultiGNSSNavDataFactory.hpp.

#include <PNBMultiGNSSNavDataFactory.hpp>

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

Public Member Functions

bool addData (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut, double cadence=-1) override
 
 PNBMultiGNSSNavDataFactory ()
 Initialize myFactories. More...
 
void resetState () override
 
void setControl (const FactoryControl &ctrl) override
 
void setTypeFilter (const NavMessageTypeSet &nmts) override
 
void setValidityFilter (NavValidityType nvt) override
 
- Public Member Functions inherited from gnsstk::PNBNavDataFactory
 PNBNavDataFactory ()
 

Static Public Member Functions

static bool addFactory (NavType navType, PNBNavDataFactoryPtr &fact)
 

Static Protected Member Functions

static std::shared_ptr< PNBNavDataFactoryMapfactories ()
 

Protected Attributes

std::shared_ptr< PNBNavDataFactoryMapmyFactories
 
- Protected Attributes inherited from gnsstk::PNBNavDataFactory
FactoryControl factControl
 Configuration for the behavior of this factory. More...
 
NavValidityType navValidity
 Determines how the factory should filter added data. More...
 
bool processAlm
 If true, almanac data will be output by addData. More...
 
bool processEph
 If true, ephemeris data will be output by addData. More...
 
bool processHea
 If true, health data will be output by addData. More...
 
bool processIono
 If true, ionospheric data will be output by addData. More...
 
bool processISC
 If true, inter-signal correction data will be output by addData. More...
 
bool processTim
 If true, time offset data will be output by addData. More...
 

Constructor & Destructor Documentation

◆ PNBMultiGNSSNavDataFactory()

gnsstk::PNBMultiGNSSNavDataFactory::PNBMultiGNSSNavDataFactory ( )

Initialize myFactories.

Definition at line 45 of file PNBMultiGNSSNavDataFactory.cpp.

Member Function Documentation

◆ addData()

bool gnsstk::PNBMultiGNSSNavDataFactory::addData ( const PackedNavBitsPtr navIn,
NavDataPtrList navOut,
double  cadence = -1 
)
overridevirtual

Process a PackedNavBits object, producing NavData objects as appropriate.

Parameters
[in]navInThe PackedNavBits data to process.
[out]navOutAny resulting NavData objects that were completed, usually as a result of adding navIn to the set of data.
[in]cadenceThe data rate of the navigation messages being processed. If cadence < 0, The default values of NavData::msgLenSec will be used. Values >= 0 will override the default.
Returns
false on error.

Implements gnsstk::PNBNavDataFactory.

Definition at line 73 of file PNBMultiGNSSNavDataFactory.cpp.

◆ addFactory()

bool gnsstk::PNBMultiGNSSNavDataFactory::addFactory ( NavType  navType,
PNBNavDataFactoryPtr fact 
)
static

Add a new factory to the support map. The factory must be derived from PNBNavDataFactory but not an instance of this class.

Parameters
[in]navTypeThe nav message that the factory processes.
[in]factThe PNBNavDataFactory object to add.
Returns
false if fact is not a valid factory class.

Definition at line 91 of file PNBMultiGNSSNavDataFactory.cpp.

◆ factories()

std::shared_ptr< PNBNavDataFactoryMap > gnsstk::PNBMultiGNSSNavDataFactory::factories ( )
staticprotected

Known PNB -> nav data factories, organized by navigation message type. Declared static so that the user doesn't have to add all the factories themselves.

Definition at line 119 of file PNBMultiGNSSNavDataFactory.cpp.

◆ resetState()

void gnsstk::PNBMultiGNSSNavDataFactory::resetState ( )
overridevirtual

Reset the state of the data accumulator. Most PNBNavDataFactory child classes will maintain some state to assemble data prior to processing. This method is intended to be used to clear out that intermediate data to start from a fresh state, e.g. if you're loading discontinuous data.

Implements gnsstk::PNBNavDataFactory.

Definition at line 109 of file PNBMultiGNSSNavDataFactory.cpp.

◆ setControl()

void gnsstk::PNBMultiGNSSNavDataFactory::setControl ( const FactoryControl ctrl)
overridevirtual

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

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

Reimplemented from gnsstk::PNBNavDataFactory.

Definition at line 128 of file PNBMultiGNSSNavDataFactory.cpp.

◆ setTypeFilter()

void gnsstk::PNBMultiGNSSNavDataFactory::setTypeFilter ( const NavMessageTypeSet nmts)
overridevirtual

Indicate what nav message types the factories should be loading. This should be called before any addData() calls.

Warning
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 from gnsstk::PNBNavDataFactory.

Definition at line 63 of file PNBMultiGNSSNavDataFactory.cpp.

◆ setValidityFilter()

void gnsstk::PNBMultiGNSSNavDataFactory::setValidityFilter ( NavValidityType  nvt)
overridevirtual

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

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

Reimplemented from gnsstk::PNBNavDataFactory.

Definition at line 53 of file PNBMultiGNSSNavDataFactory.cpp.

Member Data Documentation

◆ myFactories

std::shared_ptr<PNBNavDataFactoryMap> gnsstk::PNBMultiGNSSNavDataFactory::myFactories
protected

Keep a cached copy of the shared_ptr to the static PNBNavDataFactoryMap so that windows doesn't destroy it before destroying this.

Definition at line 136 of file PNBMultiGNSSNavDataFactory.hpp.


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


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