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
Venus638flpx.h
00001 #ifndef __venus638flpx_h__ 00002 #define __venus638flpx_h__ 00003 00004 #include "GPS.h" 00005 #include "TinyGPS.h" 00006 00007 class Venus638flpx 00008 { 00009 public: 00010 /** 00011 * create a new interface for Venus638flpx 00012 */ 00013 Venus638flpx(PinName tx, PinName rx); 00014 00015 /** 00016 * Initalize everything necessary for the GPS to collect the required data 00017 */ 00018 void init(); 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 * Configure GPS update rate 00052 */ 00053 void setUpdateRate(int rate); 00054 00055 /** 00056 * get latitude 00057 */ 00058 virtual double latitude(void); 00059 00060 /** 00061 * get longitude 00062 */ 00063 virtual double longitude(void); 00064 00065 /** 00066 * Get Horizontal Dilution of Precision 00067 * @return float horizontal dilution of precision 00068 */ 00069 virtual float hdop(void); 00070 00071 /** 00072 * get count of active satellites 00073 */ 00074 virtual int sat_count(void); 00075 00076 /** 00077 * get speed in m/s 00078 */ 00079 virtual float speed_mps(void); 00080 00081 /** 00082 * get heading in degrees 00083 */ 00084 virtual float heading_deg(void); 00085 00086 /** 00087 * determine if data is available to be used 00088 */ 00089 virtual bool available(void); 00090 00091 /** 00092 * reset the data available flag 00093 */ 00094 virtual void reset_available(void); 00095 00096 int getAvailable(void); 00097 00098 private: 00099 /** 00100 * Configure which Nmea messages to enable/disable 00101 */ 00102 void setNmeaMessages(char gga, char gsa, char gsv, char gll, char rmc, char vtg); 00103 00104 /** 00105 * Serial interrupt handler 00106 */ 00107 void recv_handler(void); 00108 00109 /** private serial object */ 00110 Serial serial; 00111 00112 /** private NMEA parser */ 00113 TinyGPS nmea; 00114 }; 00115 00116 #endif
Generated on Tue Jul 12 2022 21:36:19 by
 1.7.2
 1.7.2