|
GPS Device
|
Functions | |
| static ERR_te | neo6_calc_checksum (char *msg, uint32_t msg_len, uint8_t *checksum_o) |
| Computes the NMEA checksum of a sentence by XORing all bytes between '$' and '*'. | |
| static ERR_te | neo6_process_msg (uint8_t *msg, uint32_t msg_len) |
| Verifies the checksum of a received NMEA sentence and dispatches it to the appropriate parser. | |
| static ERR_te | neo6_process_rmc (char **tokens) |
| Parses an RMC sentence and updates time, date, latitude, and longitude. | |
| static ERR_te | neo6_process_vtg (char **tokens) |
| Parses a VTG sentence and updates movement direction and speed. | |
| static ERR_te | neo6_process_gga (char **tokens) |
| Parses a GGA sentence and updates fix status, satellites used, orthometric height, and geoid separation. | |
| static ERR_te | neo6_process_gsa (char **tokens) |
| Parses a GSA sentence and updates fix type, PDOP, HDOP, and VDOP. | |
| static ERR_te | neo6_process_gsv (char **tokens) |
| Parses a GSV sentence and updates the total satellite count. | |
|
static |
Computes the NMEA checksum of a sentence by XORing all bytes between '$' and '*'.
Iterates through msg, skipping the leading '$', XORing each byte until '*' is encountered. The result is the standard NMEA XOR checksum.
| [in] | msg | Pointer to the null-terminated NMEA sentence string. |
| [in] | msg_len | Length of the message in bytes. |
| [out] | checksum_o | Pointer to a variable that will receive the computed checksum. |
msg_len bytes are consumed Definition at line 458 of file neo6.c.

|
static |
Verifies the checksum of a received NMEA sentence and dispatches it to the appropriate parser.
Extracts the two-character hex checksum from the end of the sentence, computes the expected checksum via neo6_calc_checksum, and compares them. On a match, tokenizes the sentence by comma and dispatches to neo6_process_rmc, neo6_process_vtg, neo6_process_gga, neo6_process_gsa, or neo6_process_gsv based on the sentence ID. Unrecognized sentence types are silently ignored.
| [in] | msg | Pointer to the raw NMEA sentence bytes. |
| [in] | msg_len | Length of the sentence in bytes. |
Definition at line 501 of file neo6.c.


|
static |
Parses an RMC sentence and updates time, date, latitude, and longitude.
If the validity flag (token 2) is not "A" (active), all four fields are set to "No data" and the function returns early. Otherwise: time is formatted as "HH:MM:SS UTC", date as "DD/MM/YYYY", and latitude/longitude have their hemisphere indicator appended.
| [in] | tokens | Tokenized RMC sentence (comma-separated fields). |
Definition at line 556 of file neo6.c.


|
static |
Parses a VTG sentence and updates movement direction and speed.
Direction is taken from the true-north track field. Speed is taken from the speed-over-ground field and has " kph" appended. Empty fields result in "No data" being written instead.
| [in] | tokens | Tokenized VTG sentence. |
Definition at line 634 of file neo6.c.


|
static |
Parses a GGA sentence and updates fix status, satellites used, orthometric height, and geoid separation.
Fix quality is mapped to a human-readable string: "No valid fix" (0), "GPS fix" (1), "DGPS fix" (2). Height and separation values have their unit character appended. Empty fields result in "No data".
| [in] | tokens | Tokenized GGA sentence. |
Definition at line 678 of file neo6.c.


|
static |
Parses a GSA sentence and updates fix type, PDOP, HDOP, and VDOP.
Fix type is mapped to a human-readable string: "Not available" (1), "2D" (2), "3D" (3). VDOP strips the trailing NMEA checksum suffix (*XX) before storing. Empty fields result in "No data".
| [in] | tokens | Tokenized GSA sentence. |
Definition at line 757 of file neo6.c.


|
static |
Parses a GSV sentence and updates the total satellite count.
Only the total number of satellites in view is extracted. The per-satellite detail fields (PRN, elevation, azimuth, SNR) are not currently stored. Empty fields result in "No data".
| [in] | tokens | Tokenized GSV sentence. |
Definition at line 826 of file neo6.c.

