GNSS::GPS_BroadcastEphemerisAndAlmanacArray Class Reference

#include <GNSS_RxData.h>


Detailed Description

An array class for storing broadcast GPS ephemeris and almanac information.

Each satellite is uniquely identified in GPS by it's PRN. Each PRN has an associated almanac structure, a most recent ephemeris structure, and a previous ephemeris structure (to faciliate ephemeris matching)

GPS are 1-32
Pseudolites are 33-37
SBAS are 120-138
WAAS, EGNOS, MSAS

WAAS:
AOR-W 122
Anik 138
POR 134
PanAm 135

EGNOS:
AOR-E 120
Artemis 124
IOR-W 126
IOR-E 131

MSAS:
MTSAT-1 129
MTSAT-2 137

The index mapping is as follows:
PRN 1-37 maps to indidex 0-36
PRN 38-40 maps to indices 37-39 (reserved mappings)
PRN 120-138 maps to indicex 40-58

Author:
Glenn D. MacGougan (GDM)
Date:
2007-10-29
Since:
2006-11-15

Definition at line 98 of file GNSS_RxData.h.


Public Member Functions

 GPS_BroadcastEphemerisAndAlmanacArray ()
 The default constructor (no data allocated yet).
virtual ~GPS_BroadcastEphemerisAndAlmanacArray ()
 The destructor.
bool AddEphemeris (const unsigned short prn, const GPS_structEphemeris &eph)
 Add an ephemeris structure.
bool AddAlmanac (const unsigned short prn, const GPS_structAlmanac &alm)
 Add an almanac structure.
bool IsEphemerisAvailable (const unsigned short prn, bool &isAvailable, char iode=-1)
 Check if ephemeris information is available for a PRN.
bool GetEphemeris (const unsigned short prn, GPS_structEphemeris &eph, bool &isAvailable, char iode=-1)
 Try to get the most current ephemeris or the ephemeris with the issue of data (ephemeris), iode, specified.
bool GetEphemerisTOW (const unsigned short prn, bool &isAvailable, unsigned short &week, unsigned &tow)
 Try to get the week, and time of week of the most current ephemeris for the prn specified if available.

Protected Member Functions

bool AllocateArray ()
 Allocate the array.
bool GetIndexGivenPRN (const unsigned short prn, unsigned short &index)
 Get the index of the PRN in the array.

Protected Attributes

GPS_structOrbitParameters * m_array
 A pointer to the array of GPS satellite orbit information structs.
unsigned m_arrayLength
 The maximum number of elements in m_array.

Constructor & Destructor Documentation

GNSS::GPS_BroadcastEphemerisAndAlmanacArray::GPS_BroadcastEphemerisAndAlmanacArray (  ) 

The default constructor (no data allocated yet).

Definition at line 69 of file GNSS_RxData.cpp.

GNSS::GPS_BroadcastEphemerisAndAlmanacArray::~GPS_BroadcastEphemerisAndAlmanacArray (  )  [virtual]

The destructor.

Definition at line 76 of file GNSS_RxData.cpp.


Member Function Documentation

bool GNSS::GPS_BroadcastEphemerisAndAlmanacArray::AddEphemeris ( const unsigned short  prn,
const GPS_structEphemeris eph 
)

Add an ephemeris structure.

Returns:
true if successful, false if error.

Definition at line 110 of file GNSS_RxData.cpp.

bool GNSS::GPS_BroadcastEphemerisAndAlmanacArray::AddAlmanac ( const unsigned short  prn,
const GPS_structAlmanac alm 
)

Add an almanac structure.

Returns:
true if successful, false if error.

Definition at line 130 of file GNSS_RxData.cpp.

bool GNSS::GPS_BroadcastEphemerisAndAlmanacArray::IsEphemerisAvailable ( const unsigned short  prn,
bool &  isAvailable,
char  iode = -1 
)

Check if ephemeris information is available for a PRN.

Returns:
true if successful, false if error.
Parameters:
prn  The desired GPS PRN. (1-32 GPS, 120-138 SBAS).
isAvailable  This boolean indicates if ephemeris data is available or not.
iode  The issue of data for the ephemeris, -1 means get the most current.

Definition at line 251 of file GNSS_RxData.cpp.

bool GNSS::GPS_BroadcastEphemerisAndAlmanacArray::GetEphemeris ( const unsigned short  prn,
GPS_structEphemeris eph,
bool &  isAvailable,
char  iode = -1 
)

Try to get the most current ephemeris or the ephemeris with the issue of data (ephemeris), iode, specified.

Remarks:
(1) iode == -1, means retrieve the most current ephemeris.
(2)
Returns:
true if successful, false if error.
Parameters:
prn  The desired GPS PRN. (1-32 GPS, 120-138 SBAS).
eph  A reference to an ephemeris struct in which to store the data.
isAvailable  This boolean indicates if ephemeris data is available or not.
iode  The issue of data for the ephemeris, -1 means get the most current.

Definition at line 148 of file GNSS_RxData.cpp.

bool GNSS::GPS_BroadcastEphemerisAndAlmanacArray::GetEphemerisTOW ( const unsigned short  prn,
bool &  isAvailable,
unsigned short &  week,
unsigned &  tow 
)

Try to get the week, and time of week of the most current ephemeris for the prn specified if available.

Author:
Glenn D. MacGougan
Date:
2007-12-07
Returns:
true if successful, false if error.
Parameters:
prn  The desired GPS PRN. (1-32 GPS, 120-138 SBAS).
isAvailable  This boolean indicates if ephemeris data is available or not.
week  The correct week corresponding to the time of week based on the Z-count in the Hand Over Word.
tow  The time of week based on the Z-count in the Hand Over Word.

Definition at line 196 of file GNSS_RxData.cpp.

bool GNSS::GPS_BroadcastEphemerisAndAlmanacArray::AllocateArray (  )  [protected]

Allocate the array.

Returns:
true if successful, false if error.

Definition at line 85 of file GNSS_RxData.cpp.

bool GNSS::GPS_BroadcastEphemerisAndAlmanacArray::GetIndexGivenPRN ( const unsigned short  prn,
unsigned short &  index 
) [protected]

Get the index of the PRN in the array.

Returns:
true if successful, false if error (e.g. unsupported PRN).

Definition at line 300 of file GNSS_RxData.cpp.


Field Documentation

GPS_structOrbitParameters* GNSS::GPS_BroadcastEphemerisAndAlmanacArray::m_array [protected]

A pointer to the array of GPS satellite orbit information structs.

Definition at line 180 of file GNSS_RxData.h.

unsigned GNSS::GPS_BroadcastEphemerisAndAlmanacArray::m_arrayLength [protected]

The maximum number of elements in m_array.

Definition at line 183 of file GNSS_RxData.h.


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