Code for autonomous rover for Sparkfun AVC. DataBus won 3rd in 2012 and the same code was used on Troubled Child, a 1986 Jeep Grand Wagoneer to win 1st in 2014.
Dependencies: mbed Watchdog SDFileSystem DigoleSerialDisp
Sensors/GPS/Sirf3.h
- Committer:
- shimniok
- Date:
- 2013-05-27
- Revision:
- 0:a6a169de725f
- Child:
- 2:fbc6e3cf3ed8
File content as of revision 0:a6a169de725f:
#ifndef __SIRF3_H__ #define __SIRF3_H__ #include "mbed.h" #include "GPS.h" #include "TinyGPS.h" class Sirf3: public GPS { public: /** * create a new SiRF III interface */ Sirf3(PinName tx, PinName rx); /** * Initalize everything necessary for the GPS to collect the required data */ virtual void init(void); /** * Set baud rate */ virtual void setBaud(int baud); /** * return serial object */ virtual Serial *getSerial(void); /** * Disable serial data collection */ virtual void disable(void); /** * Enable serial data collection */ virtual void enable(void); /** * Enable verbose messages for debugging */ virtual void enableVerbose(void); /** * Disable verbose messages for debugging */ virtual void disableVerbose(void); /** * get latitude */ virtual double latitude(void); /** * get longitude */ virtual double longitude(void); /** * Get Horizontal Dilution of Precision * @return float horizontal dilution of precision */ virtual float hdop(void); /** * get count of active satellites */ virtual int sat_count(void); /** * get speed in m/s */ virtual float speed_mps(void); /** * get heading in degrees */ virtual float heading_deg(void); /** * determine if data is available to be used */ virtual bool available(void); /** * reset the data available flag */ virtual void reset_available(void); private: void recv_handler(void); void gsaMessage(bool enable); void gsvMessage(bool enable); Serial serial; TinyGPS nmea; }; #endif