This class provides a factory that processes PackedNavBits data containing GLONASS FDMA civil nav data as defined in the GLONASS (FDMA) ICD. The results of the addData method (in the navOut argument) may contain any number of GLOFNavAlm, GLOFNavEph, GLOFNavHealth, GLOFNavISC, GLOFNavTimeOffset or GLOFNavUT1TimeOffset objects, according to what data is fed to the method and what data is requested via the validity and type filters (see PNBNavDataFactory).
Definition at line 59 of file PNBGLOFNavDataFactory.hpp.
#include <PNBGLOFNavDataFactory.hpp>
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 |
unsigned | getFrameNum (const CommonTime &xmitTime) |
PNBGLOFNavDataFactory () | |
Initialize data members. More... | |
bool | processAlm (unsigned long stringID, const PackedNavBitsPtr &navIn, NavDataPtrList &navOut) |
bool | processAlmOrb (const NavSatelliteID &key, unsigned almIdx, NavDataPtrList &navOut) |
bool | processEph (unsigned long stringID, const PackedNavBitsPtr &navIn, NavDataPtrList &navOut) |
bool | processTime (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut) |
bool | processTimeUT1 (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut) |
void | resetState () override |
![]() | |
PNBNavDataFactory () | |
virtual void | setControl (const FactoryControl &ctrl) |
virtual void | setTypeFilter (const NavMessageTypeSet &nmts) |
virtual void | setValidityFilter (NavValidityType nvt) |
Static Public Member Functions | |
static bool | validSize (const PackedNavBitsPtr &navIn) |
Return true if the PNB is 85 or 96 bits. More... | |
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 |
bool | pendingAlms |
std::map< NavSatelliteID, TimeMeta > | timeAcc |
![]() | |
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... | |
gnsstk::PNBGLOFNavDataFactory::PNBGLOFNavDataFactory | ( | ) |
Initialize data members.
Definition at line 59 of file PNBGLOFNavDataFactory.cpp.
|
overridevirtual |
Process a PackedNavBits object, producing NavData objects as appropriate.
[in] | navIn | The PackedNavBits data to process. |
[out] | navOut | Any resulting NavData objects that were completed, usually as a result of adding navIn to the set of data. |
[in] | cadence | This value is ignored in this class. |
Everything else is almanac
Implements gnsstk::PNBNavDataFactory.
Definition at line 67 of file PNBGLOFNavDataFactory.cpp.
unsigned gnsstk::PNBGLOFNavDataFactory::getFrameNum | ( | const CommonTime & | xmitTime | ) |
Compute the frame number given the transmit time of a string.
[in] | xmitTime | The transmit time of a nav string. |
AssertionFailure | if unable to convert the time system of xmitTime to GLO. |
Definition at line 592 of file PNBGLOFNavDataFactory.cpp.
bool gnsstk::PNBGLOFNavDataFactory::processAlm | ( | unsigned long | stringID, |
const PackedNavBitsPtr & | navIn, | ||
NavDataPtrList & | navOut | ||
) |
Process strings 6-15. When a complete set of almanac orbital elements (e.g. page 6+7) with consecutive time stamps is accumulated in almAcc, that almanac is placed in navOut. If requested, health will also be added to navOut.
[in] | stringID | The string ID (6-15) pertaining to navIn. |
[in] | navIn | The as-broadcast almanac bits. |
[out] | navOut | If an almanac is completed and the data is requested, this will contain a GLOFNavAlm object. If an almanac is completed and health data is requested, it will contain a GLOFNavHealth object. |
Definition at line 331 of file PNBGLOFNavDataFactory.cpp.
bool gnsstk::PNBGLOFNavDataFactory::processAlmOrb | ( | const NavSatelliteID & | key, |
unsigned | almIdx, | ||
NavDataPtrList & | navOut | ||
) |
Process strings 6-15. When a complete set of almanac orbital elements (e.g. page 6+7) with consecutive time stamps is accumulated in almAcc, that almanac is placed in navOut. If requested, health will also be added to navOut.
[in] | key | An unique identifier for the transmitting signal, used as a hash for almAcc. |
[in] | almIdx | The array index into the almAcc collection for this satellite/signal (expected to be even numbers from 0..8). |
[out] | navOut | If an almanac is completed and the data is requested, this will contain a GLOFNavAlm object. If an almanac is completed and health data is requested, it will contain a GLOFNavHealth object. |
Definition at line 377 of file PNBGLOFNavDataFactory.cpp.
bool gnsstk::PNBGLOFNavDataFactory::processEph | ( | unsigned long | stringID, |
const PackedNavBitsPtr & | navIn, | ||
NavDataPtrList & | navOut | ||
) |
Process strings 1-4. When a complete ephemeris of strings 1-4 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.
[in] | stringID | The string ID (1-4) pertaining to navIn. |
[in] | navIn | The as-broadcast ephemeris bits. |
[out] | navOut | If an ephemeris is completed and requested, this will contain a GLOFNavEph object. If navIn contains string 4 and ISC data is requested, navOut will contain a GLOFNavISC object. If an ephemeris is completed and health data is requested, navOut will contain a GLOFNavHealth object. |
Definition at line 144 of file PNBGLOFNavDataFactory.cpp.
bool gnsstk::PNBGLOFNavDataFactory::processTime | ( | const PackedNavBitsPtr & | navIn, |
NavDataPtrList & | navOut | ||
) |
Process string 5. If requested, any of health, almanac, or time offset data may be placed in navOut.
[in] | navIn | The as-broadcast string 5 bits. |
[out] | navOut | If an almanac is completed and the data is requested, this will contain a GLOFNavAlm object. If health data is requested, it will contain a GLOFNavHealth object. If time offsets are requested, it will contain a GLOFNavTimeOffset object. |
Definition at line 486 of file PNBGLOFNavDataFactory.cpp.
bool gnsstk::PNBGLOFNavDataFactory::processTimeUT1 | ( | const PackedNavBitsPtr & | navIn, |
NavDataPtrList & | navOut | ||
) |
Process string 14, frame 5. If requested, UT1 time offset data will be placed in navOut.
[in] | navIn | The as-broadcast string 14, frame 5 bits. |
[out] | navOut | If time offset data is requested and the almanac reference time from string 5 has been loaded, this will contain a GLOFNavUT1TimeOffset object. |
Definition at line 565 of file PNBGLOFNavDataFactory.cpp.
|
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 608 of file PNBGLOFNavDataFactory.cpp.
|
inlinestatic |
Return true if the PNB is 85 or 96 bits.
Definition at line 168 of file PNBGLOFNavDataFactory.hpp.
|
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 208 of file PNBGLOFNavDataFactory.hpp.
|
protected |
Used to set the reference almanac time.
Definition at line 216 of file PNBGLOFNavDataFactory.hpp.
|
protected |
Used to convert time stamps to and from GLONASS.
Definition at line 214 of file PNBGLOFNavDataFactory.hpp.
|
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 204 of file PNBGLOFNavDataFactory.hpp.
|
protected |
Set to true if there are pending almanacs waiting on almDOY to be set.
Definition at line 220 of file PNBGLOFNavDataFactory.hpp.
|
protected |
Map GLONASS transmit satellite ID to TimeMeta to accumulate complete GLONASS to UT1 time corrections.
Definition at line 200 of file PNBGLOFNavDataFactory.hpp.