Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Watchdog SDFileSystem DigoleSerialDisp
Sirf3.h
00001 #ifndef __SIRF3_H__ 00002 #define __SIRF3_H__ 00003 00004 #include "mbed.h" 00005 #include "GPS.h" 00006 #include "TinyGPS.h" 00007 00008 class Sirf3: public GPS { 00009 public: 00010 /** 00011 * create a new SiRF III interface 00012 */ 00013 Sirf3(PinName tx, PinName rx); 00014 00015 /** 00016 * Initalize everything necessary for the GPS to collect the required data 00017 */ 00018 virtual void init(void); 00019 00020 /** 00021 * Set baud rate 00022 */ 00023 virtual void setBaud(int baud); 00024 00025 /** 00026 * return serial object 00027 */ 00028 virtual Serial *getSerial(void); 00029 00030 /** 00031 * Disable serial data collection 00032 */ 00033 virtual void disable(void); 00034 00035 /** 00036 * Enable serial data collection 00037 */ 00038 virtual void enable(void); 00039 00040 /** 00041 * Enable verbose messages for debugging 00042 */ 00043 virtual void enableVerbose(void); 00044 00045 /** 00046 * Disable verbose messages for debugging 00047 */ 00048 virtual void disableVerbose(void); 00049 00050 /** 00051 * stub function for compatibility 00052 */ 00053 int getAvailable(void); 00054 00055 /** 00056 * stub function for compatibility 00057 * Configure GPS update rate (doesn't do anything on Sirf3) 00058 */ 00059 void setUpdateRate(int rate); 00060 00061 /** 00062 * get latitude 00063 */ 00064 virtual double latitude(void); 00065 00066 /** 00067 * get longitude 00068 */ 00069 virtual double longitude(void); 00070 00071 /** 00072 * Get Horizontal Dilution of Precision 00073 * @return float horizontal dilution of precision 00074 */ 00075 virtual float hdop(void); 00076 00077 /** 00078 * get count of active satellites 00079 */ 00080 virtual int sat_count(void); 00081 00082 /** 00083 * get speed in m/s 00084 */ 00085 virtual float speed_mps(void); 00086 00087 /** 00088 * get heading in degrees 00089 */ 00090 virtual float heading_deg(void); 00091 00092 /** 00093 * determine if data is available to be used 00094 */ 00095 virtual bool available(void); 00096 00097 /** 00098 * reset the data available flag 00099 */ 00100 virtual void reset_available(void); 00101 00102 private: 00103 void recv_handler(void); 00104 void ggaMessage(bool enable); 00105 void gsaMessage(bool enable); 00106 void gsvMessage(bool enable); 00107 void gllMessage(bool enable); 00108 void rmcMessage(bool enable); 00109 void vtgMessage(bool enable); 00110 Serial serial; 00111 TinyGPS nmea; 00112 }; 00113 00114 #endif
Generated on Tue Jul 12 2022 21:36:19 by
1.7.2