giovanni migon
/
GPS_LIB
a program to get GPS latitude and longitude and precision, with a simple validation.
Diff: GPS/GPS.h
- Revision:
- 0:cc406c7b09be
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GPS/GPS.h Fri May 25 20:59:59 2018 +0000 @@ -0,0 +1,33 @@ +/*LIB GPS +author: Giovanni Migon +GPS GP 735T +*/ +#include "mbed.h" +#include <string.h> // memcpy() +#include <stdint.h> // uint8_t +#include <stdlib.h> // atof() + +class GPS { + +public: + GPS(PinName pinTx, PinName pinRx, int Baud); + ~GPS(); + + double lat; + double lon; + uint8_t pdop; + + // Ctrl + uint8_t _buf_rx[512]; // recv + unsigned short _count_rx; + Serial _serial; + + void printRX(void); + void printGPS(void); + //static void SerialRecvInterrupt (void); + +private: + int _Baud; + PinName _pinTx; + PinName _pinRx; +}; \ No newline at end of file