#include <GNSS_RxData.h>
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
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. | |
| GNSS::GPS_BroadcastEphemerisAndAlmanacArray::GPS_BroadcastEphemerisAndAlmanacArray | ( | ) |
| GNSS::GPS_BroadcastEphemerisAndAlmanacArray::~GPS_BroadcastEphemerisAndAlmanacArray | ( | ) | [virtual] |
| bool GNSS::GPS_BroadcastEphemerisAndAlmanacArray::AddEphemeris | ( | const unsigned short | prn, | |
| const GPS_structEphemeris & | eph | |||
| ) |
Add an ephemeris structure.
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.
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.
| 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.
| 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.
| 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.
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.
Definition at line 300 of file GNSS_RxData.cpp.
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] |