AURobotServers
4
|
GPS status struct to hold the advanced status information about the GPS system. More...
#include <uresgps.h>
Public Member Functions | |
void | clear () |
int | getTrueVisCnt () |
bool | parseGPGSA (char *inBuf) |
bool | parseGPGSV (char *inBuf) |
UGpsStatus () | |
Public Member Functions inherited from ULock | |
bool | lock () |
void | lockInit () |
void | post () |
bool | tryLock () |
bool | tryWait () |
ULock () | |
void | unlock () |
bool | wait () |
~ULock () | |
Public Attributes | |
int | EGNOS |
double | HDOP |
Horizontal Dillution of Precision (In a plane) More... | |
int | mode |
Calculation mode. More... | |
char | opr_mode |
Operational mode. More... | |
double | PDOP |
Positional Dillution of Precision (3D) More... | |
int | satUsed [GPS_SATELLITES_SUPPORTED] |
Number of the satellites used to make calculation (GID) More... | |
int | satUsedCnt |
int | satVisAz [GPS_SATELLITES_TOTAL] |
azimuth in compas degrees (0..359) More... | |
int | satVisCnt |
total number of satellites in view More... | |
int | satVisElev [GPS_SATELLITES_TOTAL] |
elevation of satelite 0..90 (0 is hirizon and 90 is zenith) More... | |
int | satVisGID [GPS_SATELLITES_TOTAL] |
int | satVisIdx |
index during reception of data More... | |
int | satVisSN [GPS_SATELLITES_TOTAL] |
Signal to noice ratio 1–99 db-Hz. More... | |
char | sentence [GPS_SENTENCE_MAX_LENGTH] |
last message received More... | |
double | VDOP |
Vertical Dillution of precision (Height only) More... | |
GPS status struct to hold the advanced status information about the GPS system.
|
inline |
Constructor
References clear(), getTrueVisCnt(), parseGPGSA(), and parseGPGSV().
void UGpsStatus::clear | ( | void | ) |
Clear the structure
References EGNOS, GPS_SATELLITES_SUPPORTED, GPS_SATELLITES_TOTAL, HDOP, mode, opr_mode, PDOP, satUsed, satUsedCnt, satVisAz, satVisCnt, satVisElev, satVisGID, satVisIdx, satVisSN, and VDOP.
Referenced by UResGps::getLastPositionTime(), UGpsLatLong::UGpsLatLong(), UGpsStatus(), and UGpsUTM::UGpsUTM().
int UGpsStatus::getTrueVisCnt | ( | ) |
Get number of visible satellites with a signal strength obove zero
References satVisCnt, and satVisSN.
Referenced by UGpsStatus().
bool UGpsStatus::parseGPGSA | ( | char * | inBuf | ) |
GSA - GPS DOP and active satellites. This sentence provides details on the nature of the fix. It includes the numbers of the satellites being used in the current solution and the DOP. DOP (dilution of precision) is an indication of the effect of satellite geometry on the accuracy of the fix. It is a unitless number where smaller is better. For 3D fixes using 4 satellites a 1.0 would be considered to be a perfect number, however for overdetermined solutions it is possible to see numbers below 1.0.
There are differences in the way the PRN's are presented which can effect the ability of some programs to display this data. For example, in the example shown below there are 5 satellites in the solution and the null fields are scattered indicating that the almanac would show satellites in the null positions that are not being used as part of this solution. Other receivers might output all of the satellites used at the beginning of the sentence with the null field all stacked up at the end. This difference accounts for some satellite display programs not always being able to display the satellites being tracked. Some units may show all satellites that have ephemeris data without regard to their use as part of the solution but this is non-standard.
$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39
Where: GSA Satellite status A Auto selection of 2D or 3D fix (M = manual) 3 3D fix - values include: 1 = no fix 2 = 2D fix 3 = 3D fix 04,05... PRNs of satellites used for fix (space for 12) 2.5 PDOP (dilution of precision) 1.3 Horizontal dilution of precision (HDOP) 2.1 Vertical dilution of precision (VDOP) 39 the checksum data, always begins with *
References GPS_SENTENCE_MAX_LENGTH, HDOP, ULock::lock(), mode, opr_mode, PDOP, satUsed, satUsedCnt, sentence, ULock::unlock(), and VDOP.
Referenced by UGpsStatus().
bool UGpsStatus::parseGPGSV | ( | char * | inBuf | ) |
GSV - Satellites in View shows data about the satellites that the unit might be able to find based on its viewing mask and almanac data. It also shows current ability to track this data. Note that one GSV sentence only can provide data for up to 4 satellites and thus there may need to be 3 sentences for the full information. It is reasonable for the GSV sentence to contain more satellites than GGA might indicate since GSV may include satellites that are not used as part of the solution. It is not a requirment that the GSV sentences all appear in sequence. To avoid overloading the data bandwidth some receivers may place the various sentences in totally different samples since each sentence identifies which one it is.
The field called SNR (Signal to Noise Ratio) in the NMEA standard is often referred to as signal strength. SNR is an indirect but more useful value that raw signal strength. It can range from 0 to 99 and has units of dB according to the NMEA standard, but the various manufacturers send different ranges of numbers with different starting numbers so the values themselves cannot necessarily be used to evaluate different units. The range of working values in a given gps will usually show a difference of about 25 to 35 between the lowest and highest values, however 0 is a special case and may be shown on satellites that are in view but not being tracked.
$GPGSV,2,1,08,01,40,083,46,02,17,308,41,12,07,344,39,14,22,228,45*75
Where: GSV Satellites in view 2 Number of sentences for full data 1 sentence 1 of 2 08 Number of satellites in view
01 Satellite PRN number 40 Elevation, degrees 083 Azimuth, degrees 46 SNR - higher is better for up to 4 satellites per sentence 75 the checksum data, always begins with *
References GPS_SENTENCE_MAX_LENGTH, ULock::lock(), satVisAz, satVisCnt, satVisElev, satVisGID, satVisIdx, satVisSN, sentence, and ULock::unlock().
Referenced by UGpsStatus().
int UGpsStatus::EGNOS |
Show if the GPS is in SBAS augmentation mode (EGNOS or WAAS) from SiRF message
Referenced by clear().
double UGpsStatus::HDOP |
Horizontal Dillution of Precision (In a plane)
Referenced by clear(), and parseGPGSA().
int UGpsStatus::mode |
Calculation mode.
Referenced by clear(), and parseGPGSA().
char UGpsStatus::opr_mode |
Operational mode.
Referenced by clear(), and parseGPGSA().
double UGpsStatus::PDOP |
Positional Dillution of Precision (3D)
Referenced by clear(), and parseGPGSA().
int UGpsStatus::satUsed[GPS_SATELLITES_SUPPORTED] |
Number of the satellites used to make calculation (GID)
Referenced by clear(), and parseGPGSA().
int UGpsStatus::satUsedCnt |
Referenced by clear(), and parseGPGSA().
int UGpsStatus::satVisAz[GPS_SATELLITES_TOTAL] |
azimuth in compas degrees (0..359)
Referenced by clear(), and parseGPGSV().
int UGpsStatus::satVisCnt |
total number of satellites in view
Referenced by clear(), getTrueVisCnt(), and parseGPGSV().
int UGpsStatus::satVisElev[GPS_SATELLITES_TOTAL] |
elevation of satelite 0..90 (0 is hirizon and 90 is zenith)
Referenced by clear(), and parseGPGSV().
int UGpsStatus::satVisGID[GPS_SATELLITES_TOTAL] |
Visible satellites with information: Number (GID), elevation (0-90 deg), azimuth (0-360 deg), Signal to Noise Ratio (1-99 db-Hz)
Referenced by clear(), and parseGPGSV().
int UGpsStatus::satVisIdx |
index during reception of data
Referenced by clear(), and parseGPGSV().
int UGpsStatus::satVisSN[GPS_SATELLITES_TOTAL] |
Signal to noice ratio 1–99 db-Hz.
Referenced by clear(), getTrueVisCnt(), and parseGPGSV().
char UGpsStatus::sentence[GPS_SENTENCE_MAX_LENGTH] |
last message received
Referenced by UResGps::getLastSentance(), UGpsLatLong::parseGPGGA(), parseGPGSA(), parseGPGSV(), UGpsLatLong::parseGPRMC(), UResGps::parseNMEA(), UGpsUTM::parsePTNL(), and UResGps::print().
double UGpsStatus::VDOP |
Vertical Dillution of precision (Height only)
Referenced by clear(), and parseGPGSA().