Classes | Public Member Functions | Protected Attributes | List of all members
gnsstk::PNBGLOCNavDataFactory Class Reference

Detailed Description

This class provides a factory that processes PackedNavBits data containing GLONASS CDMA civil nav data as defined in the GLONASS CDMA ICD. The results of the addData method (in the navOut argument) may contain any number of GLOCNavAlm, GLOCNavEph, GLOCNavHealth, GLOCNavISC, GLOCNavTimeOffset or GLOCNavUT1TimeOffset objects, according to what data is fed to the method and what data is requested via the validity and type filters (see PNBNavDataFactory).

Note
With respect to handling of strings 31 and 32, which contain the long-term dynamic model parameters, these are handled in time order. This mimics how user equipment would see it, but also avoids delaying the output of the decoded ephemeris. This does have the unfortunate side effect that the first ephemeris for a given t_b will not have the LTDMP.

Definition at line 68 of file PNBGLOCNavDataFactory.hpp.

#include <PNBGLOCNavDataFactory.hpp>

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

Classes

class  TimeMeta
 Class to store fields used to turn GLONASS into UT1. More...
 

Public Member Functions

bool addData (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut, double cadence=-1) override
 
 PNBGLOCNavDataFactory ()
 Initialize data members. More...
 
bool processAlm (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool processEarth (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool processEph (unsigned long stringID, const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool processHeader (const PackedNavBitsPtr &navIn, GLOCNavHeader &navOut)
 
bool processHealth (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool processLTDMP (unsigned long stringID, const PackedNavBitsPtr &navIn)
 
void resetState () override
 
- Public Member Functions inherited from gnsstk::PNBNavDataFactory
 PNBNavDataFactory ()
 
virtual void setControl (const FactoryControl &ctrl)
 
virtual void setTypeFilter (const NavMessageTypeSet &nmts)
 
virtual void setValidityFilter (NavValidityType nvt)
 

Protected Attributes

std::map< NavSatelliteID, std::vector< PackedNavBitsPtr > > almAcc
 
CommonTime almDOY
 Used to set the reference almanac time. More...
 
BasicTimeSystemConverter btsc
 Used to convert time stamps to and from GLONASS. More...
 
std::map< NavSatelliteID, std::vector< PackedNavBitsPtr > > ephAcc
 
std::map< NavSatelliteID, GLOCNavLTDMPltdmpAcc
 
bool pendingAlms
 
std::map< NavSatelliteID, TimeMetatimeAcc
 
- 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

◆ PNBGLOCNavDataFactory()

gnsstk::PNBGLOCNavDataFactory::PNBGLOCNavDataFactory ( )

Initialize data members.

Definition at line 63 of file PNBGLOCNavDataFactory.cpp.

Member Function Documentation

◆ addData()

bool gnsstk::PNBGLOCNavDataFactory::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]cadenceThis value is ignored in this class.
Returns
false on error.
Todo:
implement CRC check

Implements gnsstk::PNBNavDataFactory.

Definition at line 71 of file PNBGLOCNavDataFactory.cpp.

◆ processAlm()

bool gnsstk::PNBGLOCNavDataFactory::processAlm ( const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process string type 20. That almanac is placed in navOut.

Parameters
[in]navInThe as-broadcast almanac bits.
[out]navOutIf an almanac is completed and the data is requested, this will contain a GLOCNavAlm object. If an almanac is completed and health data is requested, it will contain a GLOCNavHealth object.
Returns
false on error.

Definition at line 443 of file PNBGLOCNavDataFactory.cpp.

◆ processEarth()

bool gnsstk::PNBGLOCNavDataFactory::processEarth ( const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process Earth data, including iono and time offset.

Parameters
[in]navInThe as-broadcast nav data string.
[out]navOutAny resulting NavData objects that were completed, usually as a sresult of adding navIno the set of data.
Returns
true if successful.

Definition at line 202 of file PNBGLOCNavDataFactory.cpp.

◆ processEph()

bool gnsstk::PNBGLOCNavDataFactory::processEph ( unsigned long  stringID,
const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process strings type 10-12. When a complete ephemeris of strings 10-12 with consecutive time stamps is accumulated in ephAcc, that ephemeris is placed in navOut. An ISC and/or health object may also be added to navOut when available and such processing is enabled.

Parameters
[in]stringIDThe string ID (10-12) pertaining to navIn.
[in]navInThe as-broadcast ephemeris bits.
[out]navOutIf an ephemeris is completed and requested, this will contain a GLOCNavEph object. If navIn contains string 4 and ISC data is requested, navOut will contain a GLOCNavISC object. If an ephemeris is completed and health data is requested, navOut will contain a GLOCNavHealth object.
Returns
false on error.
Todo:
Not sure if this is signed or not but it seems likely.

Definition at line 264 of file PNBGLOCNavDataFactory.cpp.

◆ processHeader()

bool gnsstk::PNBGLOCNavDataFactory::processHeader ( const PackedNavBitsPtr navIn,
GLOCNavHeader navOut 
)

Process the header data in any given string.

Precondition
navIn must be a GloCivilC nav string of 300 bits.
Parameters
[in]navInThe as-broadcast nav data string.
[in,out]navOutThe object to decode the header into.
Returns
true if successful.

Definition at line 175 of file PNBGLOCNavDataFactory.cpp.

◆ processHealth()

bool gnsstk::PNBGLOCNavDataFactory::processHealth ( const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process the health bits in the GLONASS CDMA Nav header.

Parameters
[in]navInThe as-broadcast nav data string.
[out]navOutAny resulting NavData objects that were completed, usually as a result of adding navIn to the set of data.
Returns
true if successful.

Definition at line 244 of file PNBGLOCNavDataFactory.cpp.

◆ processLTDMP()

bool gnsstk::PNBGLOCNavDataFactory::processLTDMP ( unsigned long  stringID,
const PackedNavBitsPtr navIn 
)

Process strings 31 and 32 which contain the long-term dynamic model parameters.

Parameters
[in]stringIDThe string ID (31 or 32) pertaining to navIn.
[in]navInThe as-broadcast string 31 or 32 bits.
Returns
false on error.

< Instant in Moscow time this data relates to.

Definition at line 505 of file PNBGLOCNavDataFactory.cpp.

◆ resetState()

void gnsstk::PNBGLOCNavDataFactory::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 554 of file PNBGLOCNavDataFactory.cpp.

Member Data Documentation

◆ almAcc

std::map<NavSatelliteID, std::vector<PackedNavBitsPtr> > gnsstk::PNBGLOCNavDataFactory::almAcc
protected

Map GLONASS satellite ID to a vector of PackedNavBits for accumulating almanac data, where index 0 is string 6 and so on.

Definition at line 180 of file PNBGLOCNavDataFactory.hpp.

◆ almDOY

CommonTime gnsstk::PNBGLOCNavDataFactory::almDOY
protected

Used to set the reference almanac time.

Definition at line 188 of file PNBGLOCNavDataFactory.hpp.

◆ btsc

BasicTimeSystemConverter gnsstk::PNBGLOCNavDataFactory::btsc
protected

Used to convert time stamps to and from GLONASS.

Definition at line 186 of file PNBGLOCNavDataFactory.hpp.

◆ ephAcc

std::map<NavSatelliteID, std::vector<PackedNavBitsPtr> > gnsstk::PNBGLOCNavDataFactory::ephAcc
protected

Map GLONASS satellite ID to a vector of PackedNavBits for accumulating ephemeris data, where index 0 is string 1 and so on.

Definition at line 173 of file PNBGLOCNavDataFactory.hpp.

◆ ltdmpAcc

std::map<NavSatelliteID, GLOCNavLTDMP> gnsstk::PNBGLOCNavDataFactory::ltdmpAcc
protected

Map GLONASS satellite ID to a vector of GLOCNavLTDMP for accumulating ephemeris data

Definition at line 176 of file PNBGLOCNavDataFactory.hpp.

◆ pendingAlms

bool gnsstk::PNBGLOCNavDataFactory::pendingAlms
protected

Set to true if there are pending almanacs waiting on almDOY to be set.

Definition at line 192 of file PNBGLOCNavDataFactory.hpp.

◆ timeAcc

std::map<NavSatelliteID, TimeMeta> gnsstk::PNBGLOCNavDataFactory::timeAcc
protected

Map GLONASS transmit satellite ID to TimeMeta to accumulate complete GLONASS to UT1 time corrections.

Definition at line 169 of file PNBGLOCNavDataFactory.hpp.


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


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