Tarea 6 Procesadores

Fork of GPS7 by Gustavo Ramirez

Committer:
NicolasV
Date:
Fri Jun 09 19:37:02 2017 +0000
Revision:
3:8ad6d84b1b60
Parent:
0:15611c7938a3
Tarea 6: Procesadores;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon 0:15611c7938a3 1 #include "mbed.h"
simon 0:15611c7938a3 2 #ifndef MBED_GPS_H
simon 0:15611c7938a3 3 #define MBED_GPS_H
simon 0:15611c7938a3 4
simon 0:15611c7938a3 5 class GPS {
simon 0:15611c7938a3 6 public:
simon 0:15611c7938a3 7
simon 0:15611c7938a3 8 /** Create the GPS interface, connected to the specified serial port
simon 0:15611c7938a3 9 */
simon 0:15611c7938a3 10 GPS(PinName tx, PinName rx);
simon 0:15611c7938a3 11
simon 0:15611c7938a3 12 /** Sample the incoming GPS data, returning whether there is a lock
simon 0:15611c7938a3 13 *
simon 0:15611c7938a3 14 * @return 1 if there was a lock when the sample was taken (and therefore .longitude and .latitude are valid), else 0
simon 0:15611c7938a3 15 */
simon 0:15611c7938a3 16 int sample();
simon 0:15611c7938a3 17
simon 0:15611c7938a3 18 /** The longitude (call sample() to set) */
simon 0:15611c7938a3 19 float longitude;
simon 0:15611c7938a3 20
simon 0:15611c7938a3 21 /** The latitude (call sample() to set) */
simon 0:15611c7938a3 22 float latitude;
simon 0:15611c7938a3 23
simon 0:15611c7938a3 24 private:
simon 0:15611c7938a3 25 float trunc(float v);
simon 0:15611c7938a3 26 void getline();
simon 0:15611c7938a3 27
simon 0:15611c7938a3 28 Serial _gps;
simon 0:15611c7938a3 29 char msg[256];
simon 0:15611c7938a3 30
simon 0:15611c7938a3 31 };
simon 0:15611c7938a3 32
simon 0:15611c7938a3 33 #endif