Mbed library to handle GPS data reception and parsing
Dependents: GPS_U-blox_NEO-6M_Code
Features
- All positionning parameters are contained into a global data structure.
- Automatic nema string parsing and data structure update.
- GSA,GGA,VTG and RMC
- Convert latitude and longitude to decimal value.
- Converts latittude,longitude and altitude to ECEF coordinates.
Planed developement
- Test library for RTOS use.
- Complete the nema parsing decoders (couple of parameters are not parsed yet and not present in the data structure).
- Add conversion tool to get ENU coordinates.
Decoders/DecodersUtils.h@5:8a73e34b3978, 2016-02-16 (annotated)
- Committer:
- chris215
- Date:
- Tue Feb 16 02:57:35 2016 +0000
- Revision:
- 5:8a73e34b3978
- Parent:
- 3:20f8faf2ad18
Function renaming. Adding gps update calls.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chris215 | 3:20f8faf2ad18 | 1 | #ifndef _DECODERSUTILS_H_ |
chris215 | 3:20f8faf2ad18 | 2 | #define _DECODERSUTILS_H_ |
chris215 | 3:20f8faf2ad18 | 3 | |
chris215 | 3:20f8faf2ad18 | 4 | #include "mbed.h" |
chris215 | 3:20f8faf2ad18 | 5 | |
chris215 | 3:20f8faf2ad18 | 6 | char * strtok_single(char * str, char const * delims) |
chris215 | 3:20f8faf2ad18 | 7 | { |
chris215 | 3:20f8faf2ad18 | 8 | static char * src = NULL; |
chris215 | 3:20f8faf2ad18 | 9 | char * p, * ret = 0; |
chris215 | 3:20f8faf2ad18 | 10 | |
chris215 | 3:20f8faf2ad18 | 11 | if (str != NULL) |
chris215 | 3:20f8faf2ad18 | 12 | src = str; |
chris215 | 3:20f8faf2ad18 | 13 | |
chris215 | 3:20f8faf2ad18 | 14 | if (src == NULL) |
chris215 | 3:20f8faf2ad18 | 15 | return NULL; |
chris215 | 3:20f8faf2ad18 | 16 | |
chris215 | 3:20f8faf2ad18 | 17 | if ((p = strpbrk (src, delims)) != NULL) { |
chris215 | 3:20f8faf2ad18 | 18 | *p = 0; |
chris215 | 3:20f8faf2ad18 | 19 | ret = src; |
chris215 | 3:20f8faf2ad18 | 20 | src = ++p; |
chris215 | 3:20f8faf2ad18 | 21 | |
chris215 | 3:20f8faf2ad18 | 22 | } else if (*src) { |
chris215 | 3:20f8faf2ad18 | 23 | ret = src; |
chris215 | 3:20f8faf2ad18 | 24 | src = NULL; |
chris215 | 3:20f8faf2ad18 | 25 | } |
chris215 | 3:20f8faf2ad18 | 26 | |
chris215 | 3:20f8faf2ad18 | 27 | return ret; |
chris215 | 3:20f8faf2ad18 | 28 | } |
chris215 | 3:20f8faf2ad18 | 29 | #endif |