programa para leer un GPS desde la FRDMKL25Z
Dependents: pruebagps rastreador_satelital_2 ELJPGTarea_6
Fork of GPS by
GPS.h
- Committer:
- tony63
- Date:
- 2014-06-06
- Revision:
- 1:653fe36ca211
- Parent:
- 0:15611c7938a3
File content as of revision 1:653fe36ca211:
#include "mbed.h" #ifndef MBED_GPS_H #define MBED_GPS_H /** A GPS interface for reading from a Globalsat EM-406 GPS Module */ class GPS { public: /** Create the GPS interface, connected to the specified serial port */ GPS(PinName tx, PinName rx); /** Sample the incoming GPS data, returning whether there is a lock * * @return 1 if there was a lock when the sample was taken (and therefore .longitude and .latitude are valid), else 0 */ int sample(); /** The longitude (call sample() to set) */ float longitude; /** The latitude (call sample() to set) */ float latitude; private: float trunc(float v); void getline(); Serial _gps; char msg[256]; }; #endif