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.
GPS.h@0:0c1aa5906cef, 2014-08-06 (annotated)
- Committer:
- chris215
- Date:
- Wed Aug 06 01:37:39 2014 +0000
- Revision:
- 0:0c1aa5906cef
- Child:
- 2:72ac4d7044a7
Renamed library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chris215 | 0:0c1aa5906cef | 1 | #ifndef _MBED_GPS_H_ |
chris215 | 0:0c1aa5906cef | 2 | #define _MBED_GPS_H_ |
chris215 | 0:0c1aa5906cef | 3 | #include "mbedGPSDefs.h" |
chris215 | 0:0c1aa5906cef | 4 | #include "mbed.h" |
chris215 | 0:0c1aa5906cef | 5 | |
chris215 | 0:0c1aa5906cef | 6 | |
chris215 | 0:0c1aa5906cef | 7 | |
chris215 | 0:0c1aa5906cef | 8 | |
chris215 | 0:0c1aa5906cef | 9 | |
chris215 | 0:0c1aa5906cef | 10 | class GPS : RawSerial{ |
chris215 | 0:0c1aa5906cef | 11 | public: |
chris215 | 0:0c1aa5906cef | 12 | GPS(PinName TxPin,PinName RxPin); |
chris215 | 0:0c1aa5906cef | 13 | |
chris215 | 0:0c1aa5906cef | 14 | void SetBaud(int rate); |
chris215 | 0:0c1aa5906cef | 15 | |
chris215 | 0:0c1aa5906cef | 16 | ECEFPoint ReadPositionECEF(void); |
chris215 | 0:0c1aa5906cef | 17 | |
chris215 | 0:0c1aa5906cef | 18 | ECEFDistance DistanceBetweenTwoWP(ECEFPoint p1,ECEFPoint p2); |
chris215 | 0:0c1aa5906cef | 19 | |
chris215 | 0:0c1aa5906cef | 20 | geodPoint ReadDecGeodLoc(void); |
chris215 | 0:0c1aa5906cef | 21 | geodPoint ReadRawGeodLoc(void); |
chris215 | 0:0c1aa5906cef | 22 | |
chris215 | 0:0c1aa5906cef | 23 | bool FixIs3d(void); |
chris215 | 0:0c1aa5906cef | 24 | bool FixIs2d(void); |
chris215 | 0:0c1aa5906cef | 25 | bool GPSFixValid(void); |
chris215 | 0:0c1aa5906cef | 26 | |
chris215 | 0:0c1aa5906cef | 27 | GPSInfo info; //current gps information |
chris215 | 0:0c1aa5906cef | 28 | |
chris215 | 0:0c1aa5906cef | 29 | private: |
chris215 | 0:0c1aa5906cef | 30 | void RxIrqHandler(void); |
chris215 | 0:0c1aa5906cef | 31 | message RxMessageBuffer; |
chris215 | 0:0c1aa5906cef | 32 | char insertIndex; |
chris215 | 0:0c1aa5906cef | 33 | }; |
chris215 | 0:0c1aa5906cef | 34 | |
chris215 | 0:0c1aa5906cef | 35 | #endif |