Code for autonomous ground vehicle, Data Bus, 3rd place winner in 2012 Sparkfun AVC.
Dependencies: Watchdog mbed Schedule SimpleFilter LSM303DLM PinDetect DebounceIn Servo
Sensors/GPS/GPS.h
- Committer:
- shimniok
- Date:
- 2012-06-20
- Revision:
- 0:826c6171fc1b
File content as of revision 0:826c6171fc1b:
// For SiRF III #ifndef __GPS_H #define __GPS_H /** GPS interface abstraction library */ #include "mbed.h" #include "TinyGPS.h" #include "GeoPosition.h" #define SIRF 1 #define MTK 2 #define VENUS 3 class GPS { public: GPS(PinName tx, PinName rx, int type); void setType(int type); void setBaud(int baud); void setUpdateRate(int rate); void setNmeaMessages(bool gga, bool gsa, bool gsv, bool gll, bool rmc, bool vtg); void gsvMessage(bool enable); void gsaMessage(bool enable); void process(GeoPosition &here, char *date, char *time); void init(void); void gpsStartCapture(void); void gpsStopCapture(void); void recv(void); int year; // gps date variables byte month; byte day; byte hour; byte minute; byte second; byte hundredths; float hdop; // gps horizontal dilution of precision Serial serial; TinyGPS nmea; private: PinName _rx; int _type; // type of GPS device }; #endif