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

Detailed Description

This class provides a factory that processes PackedNavBits data containing GPS CNav (Civil Nav, aka data ID 4) data as defined in IS-GPS-200 section 30. The results of the addData method (in the navOut argument) may contain any number of GPSCNavAlm, GPSCNavEph, GPSCNavHealth or GPSCNavTimeOffset objects, according to what data is fed to the method and what data is requested via the validity and type filters (see PNBNavDataFactory).

Note
Currently validity is not checked in any way in this class.
Currently only message types 10, 11, 30, 32 and 33 are being broadcast by the constellation. As such, no further effort is going to be spent at this time on decoding messages outside this set. GPSCNavAlm data structure and decoding was already implemented by this time, but the data isn't being transmitted and has not been tested.

Definition at line 65 of file PNBGPSCNavDataFactory.hpp.

#include <PNBGPSCNavDataFactory.hpp>

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

Public Member Functions

bool addData (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut, double cadence=-1) override
 
void dumpState (std::ostream &s) const
 
bool process12 (unsigned msgType, const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool process30 (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool process31 (unsigned msgType, const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool process33 (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool process35 (const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool processAlmOrb (unsigned msgType, const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool processEph (unsigned msgType, const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
bool processRedAlmOrb (unsigned msgType, unsigned offset, unsigned pre, bool alert, unsigned wna, double toa, const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
 
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< unsigned, std::vector< PackedNavBitsPtr > > ephAcc
 
- 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...
 

Member Function Documentation

◆ addData()

bool gnsstk::PNBGPSCNavDataFactory::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.

Implements gnsstk::PNBNavDataFactory.

Definition at line 57 of file PNBGPSCNavDataFactory.cpp.

◆ dumpState()

void gnsstk::PNBGPSCNavDataFactory::dumpState ( std::ostream &  s) const

For debugging purposes, dump the sizes of the accumulator maps.

Parameters
[in,out]sThe stream to write the debug output to.

Definition at line 895 of file PNBGPSCNavDataFactory.cpp.

◆ process12()

bool gnsstk::PNBGPSCNavDataFactory::process12 ( unsigned  msgType,
const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process message type 12. This includes reduced almanac data.

Parameters
[in]msgTypeType of the message that contains the packet being decoded. Used to determine the subject satellite in QZSS.
[in]navInThe PackedNavBits data containing the message.
[out]navOutThe GPSCNavTimeOffset object generated from navIn.
Returns
true if successful.

Definition at line 559 of file PNBGPSCNavDataFactory.cpp.

◆ process30()

bool gnsstk::PNBGPSCNavDataFactory::process30 ( const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process message type 30. This includes ionospheric correction information for single-frequency users.

Parameters
[in]navInThe PackedNavBits data containing the message.
[out]navOutThe GPSCNavIono object generated from navIn.
Returns
true if successful.

Definition at line 578 of file PNBGPSCNavDataFactory.cpp.

◆ process31()

bool gnsstk::PNBGPSCNavDataFactory::process31 ( unsigned  msgType,
const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process message type 31. This includes reduced almanac data.

Parameters
[in]msgTypeType of the message that contains the packet being decoded. Used to determine the subject satellite in QZSS.
[in]navInThe PackedNavBits data containing the message.
[out]navOutThe GPSCNavTimeOffset object generated from navIn.
Returns
true if successful.

Definition at line 630 of file PNBGPSCNavDataFactory.cpp.

◆ process33()

bool gnsstk::PNBGPSCNavDataFactory::process33 ( const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process message type 33. This includes GPS-UTC time offset data.

Parameters
[in]navInThe PackedNavBits data containing the message.
[out]navOutThe GPSCNavTimeOffset object generated from navIn.
Returns
true if successful.

Definition at line 799 of file PNBGPSCNavDataFactory.cpp.

◆ process35()

bool gnsstk::PNBGPSCNavDataFactory::process35 ( const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process message type 35. This includes GPS-GNSS time offset data.

Parameters
[in]navInThe PackedNavBits data containing the message.
[out]navOutThe GPSCNavTimeOffset object generated from navIn.
Returns
true if successful.
Note
this is defined in IS-QZSS. Not sure if we should really be checking to make sure the signal is from a QZSS satellite.

Definition at line 839 of file PNBGPSCNavDataFactory.cpp.

◆ processAlmOrb()

bool gnsstk::PNBGPSCNavDataFactory::processAlmOrb ( unsigned  msgType,
const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process message type 37 (GPS, QZSS) or 53 (QZSS).

Parameters
[in]msgTypeThe CNAV message type.
[in]navInThe PackedNavBits data containing the message.
[out]navOutThe GPSCNavAlm and/or GPSCNavHealth objects generated from navIn.
Returns
true if successful (navOut may still be empty).
Todo:
I'm not entirely sure what's appropriate here. The source signal is actually L2C CNAV but it's broadcasting signal status for L1 signals that don't have CNAV.
Todo:
apply 13-bit week rollover adjustment, not 10-bit. Must be completed by January, 2137 :-)

Definition at line 391 of file PNBGPSCNavDataFactory.cpp.

◆ processEph()

bool gnsstk::PNBGPSCNavDataFactory::processEph ( unsigned  msgType,
const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process ephemeris messages 1-2. When a complete and consistent ephemeris is accumulated in ephAcc, that ephemeris is placed in navOut.

Parameters
[in]msgTypeThe CNAV message type (10-11).
[in]navInThe as-broadcast ephemeris message bits.
[out]navOutIf an ephemeris is completed, this will contain a GPSCNavEph object.
Returns
false on error.
Todo:
Should we ignore the PNB satellite ID and just use the PRN in the nav message, or maybe compare the two as an validity check?
Todo:
Is this strictly relevant for ephemeris assembly? Seems like if these are rebroadcast messages they're not going to correspond to the ephemeris data being broadcast by QZSS.
Todo:
I'm not entirely sure what's appropriate here. The source signal is actually L2C CNAV but it's broadcasting signal status for L1 signals that don't have CNAV.
Note
Some data elements, e.g. toe, are stored internally as floating point, but are treated as integers in the encoded message. This is not a mistake. It's mostly due to how the scaling is handled for the quantity, i.e. linear scaling vs fractional (ldexp).
Todo:
apply 13-bit week rollover adjustment, not 10-bit. Must be completed by January, 2137 :-)
Todo:
GEO QZSS satellites use a different OMEGAdot reference, but I have yet to figure out how to determine if a QZSS satellite is GEO or QZO

Definition at line 137 of file PNBGPSCNavDataFactory.cpp.

◆ processRedAlmOrb()

bool gnsstk::PNBGPSCNavDataFactory::processRedAlmOrb ( unsigned  msgType,
unsigned  offset,
unsigned  pre,
bool  alert,
unsigned  wna,
double  toa,
const PackedNavBitsPtr navIn,
NavDataPtrList navOut 
)

Process a single reduced almanac packed from either message type 12 or 31 (or, for QZSS, including message types 28 and 47).

Parameters
[in]msgTypeType of the message that contains the packet being decoded. Used to determine the subject satellite in QZSS.
[in]offsetThe position of the first bit of the reduced almanac packet within navIn.
[in]preThe 8-bit preamble taken from the message start.
[in]alertThe 1-bit alert flag taken from the message start.
[in]wnaThe WNa (almanac week number) as extracted from the message. This value is shared across the message and applies to all packets in a given message.
[in]toaThe almanac reference time in seconds of week (see wna).
[in]navInThe PackedNavBits data containing the message.
[out]navOutThe GPSCNavRedAlm object generated from navIn.
Returns
true if successful.
Todo:
I'm not entirely sure what's appropriate here. The source signal is actually L2C CNAV but it's broadcasting signal status for L1 signals that don't have CNAV.
Todo:
apply 13-bit week rollover adjustment, not 10-bit. Must be completed by January, 2137 :-)

Definition at line 646 of file PNBGPSCNavDataFactory.cpp.

◆ resetState()

void gnsstk::PNBGPSCNavDataFactory::resetState ( )
inlineoverridevirtual

Reset the state of the data accumulator. 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 172 of file PNBGPSCNavDataFactory.hpp.

Member Data Documentation

◆ ephAcc

std::map<unsigned, std::vector<PackedNavBitsPtr> > gnsstk::PNBGPSCNavDataFactory::ephAcc
protected

Map GPS PRN to a vector of PackedNavBits for accumulating ephemeris data, where index 0 is message 10 and so on.

Definition at line 182 of file PNBGPSCNavDataFactory.hpp.


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


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