EngNav Class Reference
[Ephemeris calculations]

#include <EngNav.hpp>

Inheritance diagram for EngNav:

Inheritance graph
[legend]
List of all members.

Detailed Description

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 66 of file EngNav.hpp.

Public Types

enum  BitConvertType { BITS8 = 0, BITS10 = 1 }
 This enumeration is used by the convertXBit() method. More...

Public Member Functions

 EngNav () throw ()
 default constructor
virtual ~EngNav ()
 destructor

Static Public Member Functions

uint32_t computeParity (uint32_t sfword, uint32_t psfword, bool knownUpright=true)
 Compute and return the parity of the given subframe word, based on the algorihm defined in Section 20.3.5 of IS-GPS-200D.
uint32_t fixParity (uint32_t sfword, uint32_t psfword, bool nib)
 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.
bool checkParity (const uint32_t input[10], bool knownUpright=true)
 Perform a parity check on a navigation message subframe.
bool checkParity (const std::vector< uint32_t > &v, bool knownUpright=true)
bool subframeParity (const long input[10])
 This is the OLD GPSTk method, left here for compatibility.
uint32_t getd30 (uint32_t sfword)
 Following two used by checkParity Get bit 30 from the given subframe word.
uint32_t getd29 (uint32_t sfword)
 Get bit 29 from the given subframe word.
unsigned long getHOWTime (uint32_t word2)
 Get the HOW time from the provided HOW.
short getSFID (uint32_t word2)
 Get the subframe ID from the provided HOW.
bool subframeConvert (const long input[10], int gpsWeek, double output[60]) throw ()
 Given 10 words of a navigation message subframe (as defined in ICD-GPS-200), convert to the "appropriate" 60 FIC floating point values.
bool subframeConvert (const uint32_t input[10], short gpsWeek, double output[60]) throw ()
 Given 10 words of a navigation message subframe (as defined in ICD-GPS-200), convert to the "appropriate" 60 FIC floating point values.
bool convert8bit (int gpsWeek, double *out) throw ()
 Convert the week number in out from 8-bit to full using the full week number gpsWeek.
bool convert10bit (int gpsWeek, double *out) throw ()
 Convert the week number in out from 10-bit to full using the full week number gpsWeek.
short convertXBit (short fullGPSWeek, short incompleteGPSWeek, BitConvertType type)
 Convert the week number in out from 8 or 10-bit to full using the full week number fullGPSWeek.
short getSubframePattern (const long input[10]) throw ()
 Given a navigation message subframe, return the pattern number to be used in converting the subframe to engineering units.
short getSubframePattern (const uint32_t input[10]) throw ()


Member Enumeration Documentation

enum BitConvertType
 

This enumeration is used by the convertXBit() method.

Enumeration values:
BITS8 
BITS10 

Definition at line 70 of file EngNav.hpp.


Constructor & Destructor Documentation

EngNav  )  throw ()
 

default constructor

Definition at line 336 of file EngNav.cpp.

References DecodeQuant::nxtq, and DecodeQuant::outIndex.

virtual ~EngNav  )  [inline, virtual]
 

destructor

Definition at line 80 of file EngNav.hpp.


Member Function Documentation

bool checkParity const std::vector< uint32_t > &  v,
bool  knownUpright = true
[static]
 

Definition at line 607 of file EngNav.cpp.

References EngNav::computeParity().

bool checkParity const uint32_t  input[10],
bool  knownUpright = true
[static]
 

Perform a parity check on a navigation message subframe.

Returns:
true if the parity check is successful.

Definition at line 621 of file EngNav.cpp.

Referenced by EngNav::subframeParity().

uint32_t computeParity uint32_t  sfword,
uint32_t  psfword,
bool  knownUpright = true
[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.

Parameters:
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
Returns:
the 6-bit parity (or, if zeroBits is set, the 6-bit parity along with the two t-bits, the non-information bits used for parity computation).

Definition at line 523 of file EngNav.cpp.

References EngNav::getd29(), and EngNav::getd30().

Referenced by EngNav::checkParity(), and EngNav::fixParity().

bool convert10bit int  gpsWeek,
double *  out
throw () [static]
 

Convert the week number in out from 10-bit to full using the full week number gpsWeek.

Parameters:
gpsWeek source full week number.
out 10-bit week number to convert to full
Returns:
true if source and target are within 511 weeks of each other.

Definition at line 448 of file EngNav.cpp.

bool convert8bit int  gpsWeek,
double *  out
throw () [static]
 

Convert the week number in out from 8-bit to full using the full week number gpsWeek.

Parameters:
gpsWeek source full week number.
out 8-bit week number to convert to full
Returns:
true if source and target are within 127 weeks of each other.

Definition at line 436 of file EngNav.cpp.

short convertXBit short  fullGPSWeek,
short  incompleteGPSWeek,
BitConvertType  type
[static]
 

Convert the week number in out from 8 or 10-bit to full using the full week number fullGPSWeek.

Parameters:
fullGPSWeek source full week number.
incompleteGPSWeek week number to convert to full
type BITS8 (0) or BITS10 (1)
Returns:
Full GPS week corresponding to incompleteGPSWeek assuming incompleteGPSWeek is within half the 8/10 bit distance from fullGPSWeek.

Definition at line 461 of file EngNav.cpp.

uint32_t fixParity uint32_t  sfword,
uint32_t  psfword,
bool  nib
[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.

Parameters:
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.
Returns:
sfword with the proper parity bits.

Definition at line 571 of file EngNav.cpp.

References EngNav::computeParity(), EngNav::getd29(), and EngNav::getd30().

uint32_t getd29 uint32_t  sfword  )  [inline, static]
 

Get bit 29 from the given subframe word.

Definition at line 136 of file EngNav.hpp.

Referenced by EngNav::computeParity(), and EngNav::fixParity().

uint32_t getd30 uint32_t  sfword  )  [inline, static]
 

Following two used by checkParity Get bit 30 from the given subframe word.

Definition at line 130 of file EngNav.hpp.

Referenced by EngNav::computeParity(), and EngNav::fixParity().

unsigned long getHOWTime uint32_t  word2  )  [inline, static]
 

Get the HOW time from the provided HOW.

Definition at line 142 of file EngNav.hpp.

short getSFID uint32_t  word2  )  [inline, static]
 

Get the subframe ID from the provided HOW.

Definition at line 150 of file EngNav.hpp.

short getSubframePattern const uint32_t  input[10]  )  throw () [static]
 

Definition at line 487 of file EngNav.cpp.

short getSubframePattern const long  input[10]  )  throw () [static]
 

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

Parameters:
input 10 long integers containing the ten words of the navigation message subframe.
Returns:
the pattern ID as defined in the above table.

Definition at line 478 of file EngNav.cpp.

Referenced by FICData62::FICData62().

bool subframeConvert const uint32_t  input[10],
short  gpsWeek,
double  output[60]
throw () [static]
 

Given 10 words of a navigation message subframe (as defined in ICD-GPS-200), convert to the "appropriate" 60 FIC floating point values.

Parameters:
input array of ten 30-bit words (stored in the 30 least-significant bits of each long.
gpsWeek full (>10 bits) GPS week number associated with almanac reference time.
output 60 FIC floating point values as defined in the documentation for FIC blocks 9 and 62.
Returns:
true if successful.

Definition at line 382 of file EngNav.cpp.

References DecodeQuant::nxtq.

bool subframeConvert const long  input[10],
int  gpsWeek,
double  output[60]
throw () [static]
 

Given 10 words of a navigation message subframe (as defined in ICD-GPS-200), convert to the "appropriate" 60 FIC floating point values.

Parameters:
input array of ten 30-bit words (stored in the 30 least-significant bits of each long.
gpsWeek full (>10 bits) GPS week number associated with almanac reference time.
output 60 FIC floating point values as defined in the documentation for FIC blocks 9 and 62.
Returns:
true if successful.

Definition at line 370 of file EngNav.cpp.

Referenced by EngEphemeris::addIncompleteSF1Thru3(), and FICData62::FICData62().

bool subframeParity const long  input[10]  )  [static]
 

This is the OLD GPSTk method, left here for compatibility.

Definition at line 599 of file EngNav.cpp.

References EngNav::checkParity().


The documentation for this class was generated from the following files:
Generated on Wed Feb 8 03:31:37 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1