Base class for ICD-GPS-200 navigation messages. This class provides functions for decoding the bits in navigation message, and is the base class for all "engineering units" types.
Definition at line 69 of file EngNav.hpp.
#include <EngNav.hpp>
Public Types | |
enum | BitConvertType { BITS8 = 0, BITS10 = 1 } |
This enumeration is used by the convertXBit() method. More... | |
Public Member Functions | |
EngNav () noexcept | |
default constructor More... | |
virtual | ~EngNav () |
destructor More... | |
Static Public Member Functions | |
static bool | checkParity (const std::vector< uint32_t > &v, bool knownUpright=true) |
static bool | checkParity (const uint32_t input[10], bool knownUpright=true) |
static uint32_t | computeParity (uint32_t sfword, uint32_t psfword, bool knownUpright=true) |
static bool | convert10bit (int gpsWeek, double *out) noexcept |
static bool | convert8bit (int gpsWeek, double *out) noexcept |
static short | convertXBit (short fullGPSWeek, short incompleteGPSWeek, BitConvertType type) |
static void | dump (std::ostream &s=std::cout) |
static uint32_t | fixParity (uint32_t sfword, uint32_t psfword, bool nib, bool knownUpright=true) |
static uint32_t | getd29 (uint32_t sfword) |
Get bit 29 from the given subframe word. More... | |
static uint32_t | getd30 (uint32_t sfword) |
static unsigned long | getHOWTime (uint32_t word2) |
Get the HOW time from the provided HOW. More... | |
static bool | getNMCTValidity (const uint32_t sf2[10], unsigned howWeek, NMCTMeta &meta) |
static bool | getNMCTValidity (const uint32_t sf2[10], unsigned howWeek, uint32_t &aodo, CommonTime &tnmct, CommonTime &toe, CommonTime &tot) |
static short | getSFID (uint32_t word2) |
Get the subframe ID from the provided HOW. More... | |
static short | getSubframePattern (const long input[10]) noexcept |
static short | getSubframePattern (const uint32_t input[10]) noexcept |
static unsigned long | getTOW (uint32_t word2) |
Get the TOW count from the provided HOW. More... | |
static bool | sfpage2svid (short subframe, short page, short &svpgid) noexcept |
static bool | subframeConvert (const long input[10], int gpsWeek, double output[60]) noexcept |
static bool | subframeConvert (const uint32_t input[10], short gpsWeek, double output[60]) noexcept |
static bool | subframeParity (const long input[10]) |
This is the old routine only left around for compatibility. More... | |
static bool | sv2page (short svpgid, short &subframe, short &page) noexcept |
static bool | zcount2page (unsigned long zcount, short &subframe, short &page) noexcept |
Static Private Member Functions | |
static void | convertQuant (const uint32_t input[10], double output[60], const DecodeQuant &dq) noexcept |
This enumeration is used by the convertXBit() method.
Enumerator | |
---|---|
BITS8 | |
BITS10 |
Definition at line 73 of file EngNav.hpp.
|
noexcept |
default constructor
Definition at line 369 of file EngNav.cpp.
|
inlinevirtual |
destructor
Definition at line 83 of file EngNav.hpp.
|
static |
Definition at line 722 of file EngNav.cpp.
|
static |
Perform a parity check on a navigation message subframe.
Definition at line 727 of file EngNav.cpp.
|
static |
Compute and return the parity of the given subframe word, based on the algorihm defined in Section 20.3.5 of IS-GPS-200D.
sfword | The subframe word to compute the parity of. |
psfword | The previous word in the subframe (use 0 when sfword is word 1) |
knownUpright | When this is set, the data is assumed to be upright and no D30 inversion is performed |
Definition at line 637 of file EngNav.cpp.
|
staticnoexcept |
Convert the week number in out
from 10-bit to full using the full week number gpsWeek
.
gpsWeek | source full week number. |
out | 10-bit week number to convert to full |
Definition at line 448 of file EngNav.cpp.
|
staticnoexcept |
Convert the week number in out
from 8-bit to full using the full week number gpsWeek
.
gpsWeek | source full week number. |
out | 8-bit week number to convert to full |
Definition at line 436 of file EngNav.cpp.
|
staticprivatenoexcept |
Given 10 words of a navigation message subframe, in, and a structure, p, defining a particular conversion, perform the conversion and store the results in the appropriate location in the output array.
[in] | input | words of navigation message subframe. Each nav message word is in the 30 lsbs of the corresponding input[i]. |
[out] | output | array of 60 doubles. The converted output will be placed in the output array at the location specified in the conversion specification. |
[in] | dq | structure defining conversion to be performed. |
Definition at line 742 of file EngNav.cpp.
|
static |
Convert the week number in out
from 8 or 10-bit to full using the full week number fullGPSWeek
.
fullGPSWeek | source full week number. |
incompleteGPSWeek | week number to convert to full |
type | BITS8 (0) or BITS10 (1) |
Definition at line 461 of file EngNav.cpp.
|
static |
Emit human-readable instance data to the specified stream.
s | stream to which data will be written |
Definition at line 800 of file EngNav.cpp.
|
static |
Compute the parity for the given subframe using the prior subframe and a flag to handle the "non-information bits" that appear in certain words of each subframe.
sfword | The subframe word to compute the parity of. |
psfword | The previous word in the subframe (use 0 when sfword is word 1) |
nib | if true, sfword is one of the words with the non-information bearing bits (word 2 or 10), and the parity will be computed as appropriate for that situation. |
Definition at line 685 of file EngNav.cpp.
|
inlinestatic |
Get bit 29 from the given subframe word.
Definition at line 140 of file EngNav.hpp.
|
inlinestatic |
Following two used by checkParity Get bit 30 from the given subframe word
Definition at line 134 of file EngNav.hpp.
|
inlinestatic |
Get the HOW time from the provided HOW.
Definition at line 146 of file EngNav.hpp.
|
inlinestatic |
Get the NMCT validity time from subframe 2. Refer to IS-GPS-200 section 2.3.3.4.4.
[in] | sf2 | The 10 words of subframe 2. |
[in] | howWeek | the GPS full week for the HOW time in sf2. |
[in] | meta | Other metadata pertaining to the NMCT. |
InvalidParameter | if sf2 is not subframe 2. |
Definition at line 361 of file EngNav.hpp.
|
static |
Get the NMCT validity time from subframe 2. Refer to IS-GPS-200 section 2.3.3.4.4.
[in] | sf2 | The 10 words of subframe 2. |
[in] | howWeek | the GPS full week for the HOW time in sf2. |
[out] | aodo | Age of data offset in seconds. |
[out] | tnmct | The NMCT validity time. |
[out] | toe | Time of ephemeris. |
InvalidParameter | if sf2 is not subframe 2. |
Definition at line 851 of file EngNav.cpp.
|
inlinestatic |
Get the subframe ID from the provided HOW.
Definition at line 163 of file EngNav.hpp.
|
staticnoexcept |
Given a navigation message subframe, return the pattern number to be used in converting the subframe to engineering units. The patterns are defined in the following table. The numbers correspond to the ordering of the bit definitions in ICD-GPS-200 Figure 20-1.
Subframe # SV_id Pattern # 1 n/a 1 2 n/a 2 3 n/a 3 4 1-24 4 4 25 5 5 57 6 5 58-62 7 5 56 8 5 63 9 5 52-55 10
input | 10 long integers containing the ten words of the navigation message subframe. |
Definition at line 478 of file EngNav.cpp.
|
staticnoexcept |
Definition at line 487 of file EngNav.cpp.
|
inlinestatic |
Get the TOW count from the provided HOW.
Definition at line 154 of file EngNav.hpp.
|
staticnoexcept |
Given an SV/Page ID (1-63), set the subframe ID and page passed to the function.
subframe | (input) the subframe ID of svpgid (4,5) |
page | (input) the page number of svpgid (1-25) |
svpgid | (output) the SV/Page ID translated from subframe/page |
Definition at line 583 of file EngNav.cpp.
|
staticnoexcept |
Given 10 words of a navigation message subframe (as defined in ICD-GPS-200), convert to the "appropriate" 60 floating point values.
[in] | input | array of ten 30-bit words (stored in the 30 least-significant bits of each long. |
[in] | gpsWeek | full (>10 bits) GPS week number associated with almanac reference time. |
[out] | output | 60 floating point values as defined in the formats array in EngNav.cpp. |
Definition at line 375 of file EngNav.cpp.
|
staticnoexcept |
Given 10 words of a navigation message subframe (as defined in ICD-GPS-200), convert to the "appropriate" 60 floating point values.
[in] | input | array of ten 30-bit words (stored in the 30 least-significant bits of each long. |
[in] | gpsWeek | full (>10 bits) GPS week number associated with almanac reference time. |
[out] | output | 60 floating point values as defined in the formats array in EngNav.cpp. |
Definition at line 387 of file EngNav.cpp.
|
static |
This is the old routine only left around for compatibility.
This is the OLD GNSSTk method, left here for compatibility.
Definition at line 714 of file EngNav.cpp.
|
staticnoexcept |
Given an SV/Page ID (1-63), set the subframe ID and page passed to the function.
svpgid | (input) the SV/Page ID to be translated (typically extracted from subframe 4/5, word 3, bits 3-8 (bit 1=MSB). |
subframe | (output) the subframe ID of svpgid (4,5) |
page | (output) the page number of svpgid (1-25) |
Definition at line 524 of file EngNav.cpp.
|
staticnoexcept |
Given a Z-count representing the TOW in the HOW of a navigation subframe (i.e. TOW * 4), set the subframe ID and page passed to the function.
zcount | (input) the TOW count, in z-counts, of a nav subframe |
subframe | (output) the subframe ID of svpgid (4,5) |
page | (output) the page number of svpgid (1-25) |
Definition at line 608 of file EngNav.cpp.