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.
Diff: defines/mbedGPSDefs.h
- Revision:
- 0:0c1aa5906cef
- Child:
- 2:72ac4d7044a7
diff -r 000000000000 -r 0c1aa5906cef defines/mbedGPSDefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/defines/mbedGPSDefs.h Wed Aug 06 01:37:39 2014 +0000 @@ -0,0 +1,85 @@ +#ifndef _MBED_GPS_DEFS_H_ +#define _MBED_GPS_DEFS_H_ +//======================================================================= +// GPS Special caracters +#define START_CHAR '$' +#define END_CHAR 0x0D +//======================================================================= +// GPS BUFFER SIZE +#define RX_BUFFER_SIZE 80 +//======================================================================= +// GPS COMMANDS +#define GPS_CMD_GPGGA "$GPGGA" +#define GPS_CMD_GPGSA "$GPGSA" +#define GPS_CMD_GPGSV "$GPGSV" +#define GPS_CMD_GPRMC "$GPRMC" +#define GPS_CMD_GPVTG "$GPVTG" + +//======================================================================= +// GPS MESSAGE STRUCTURE +typedef struct { + char data[RX_BUFFER_SIZE]; + }message; + +//======================================================================= +// GPS COORDINATE POINT STRUCTURES +typedef struct{ + double latitude; + double longitude; + float altitude; + }geodPoint; + +typedef struct{ + double x; + double y; + double z; + }ECEFPoint; + +typedef struct{ + float dx; + float dy; + float dz; + float d; + }ECEFDistance; + +typedef struct{ + char time[7]; + char hour; + char min; + char sec; + int msec; + }FIXtime; +typedef struct{ + char date[7]; + char day; + char month; + char year; + }FIXDate; + +typedef struct{ + double latitude; + char latLoc; + double longitude; + char lonLoc; + float GPStime; + char GPSStatus; + char FixQal; + float GPSAltitude; + float GEOIDHeight; + + float TrueTrack; //Relative to true north + float MagneticTrack; //Relative to magnetic north + float GroundSpeedN; + float GroundSpeedK; + + char TrackedSatCnt; + + char mode; //A=automatic M=manual + char fix; //1=not valid, 2=2d, 3=3d + + float PDOP,HDOP,VDOP; + + FIXtime time; + FIXDate date; + }GPSInfo; +#endif \ No newline at end of file