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: GPS.cpp
- Revision:
- 4:d911d7c4e09d
- Parent:
- 2:72ac4d7044a7
- Child:
- 5:8a73e34b3978
--- a/GPS.cpp Mon Feb 15 00:42:32 2016 +0000 +++ b/GPS.cpp Mon Feb 15 05:26:36 2016 +0000 @@ -3,6 +3,8 @@ GPS::GPS(PinName tx, PinName rx) : RawSerial(tx, rx) { + _gpsTimer.start(); + _gpsTimer.reset(); RxQueueSize=0; RxQueueWriteIndex=0; RxQueueReadIndex=0; @@ -53,21 +55,30 @@ { GPSRMCMessage.MessageIsNew = 0; DecodeMessage(GPSRMCMessage,info); + _gpsTimer.reset(); } if(GPSGGAMessage.MessageIsNew > 0) { GPSGGAMessage.MessageIsNew = 0; DecodeMessage(GPSGGAMessage,info); + _gpsTimer.reset(); } if(GPSVTGMessage.MessageIsNew > 0) { GPSVTGMessage.MessageIsNew = 0; DecodeMessage(GPSVTGMessage,info); + _gpsTimer.reset(); } if(GPSGSAMessage.MessageIsNew > 0) { GPSGSAMessage.MessageIsNew = 0; DecodeMessage(GPSGSAMessage,info); + _gpsTimer.reset(); + } + + if(_gpsTimer.read_ms() > 5000) + { + info.fix = 1; } }