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
GPS.h
00001 // For SiRF III 00002 00003 #ifndef __GPS_H 00004 #define __GPS_H 00005 00006 /** 00007 * GPS "interface" class 00008 */ 00009 00010 #include "mbed.h" 00011 00012 class GPS { 00013 public: 00014 /** 00015 * create a new instance of GPS 00016 */ 00017 //GPS(PinName tx, PinName rx); // serial only 00018 00019 /** 00020 * Initalize everything necessary for the GPS to collect the required data 00021 */ 00022 virtual void init(void) = 0; 00023 00024 /** 00025 * Return serial object 00026 */ 00027 virtual Serial *getSerial(void) = 0; 00028 00029 /** 00030 * Set baud rate 00031 */ 00032 virtual void setBaud(int baud) = 0; 00033 00034 /** 00035 * Disable serial data collection 00036 */ 00037 virtual void disable(void) = 0; 00038 00039 /** 00040 * Enable serial data collection 00041 */ 00042 virtual void enable(void) = 0; 00043 00044 /** 00045 * Enable verbose messages for debugging 00046 */ 00047 virtual void enableVerbose(void) = 0; 00048 00049 /** 00050 * Disable verbose messages for debugging 00051 */ 00052 virtual void disableVerbose(void) = 0; 00053 00054 /** 00055 * get latitude 00056 */ 00057 virtual double latitude(void) = 0; 00058 00059 /** 00060 * get longitude 00061 */ 00062 virtual double longitude(void) = 0; 00063 00064 /** 00065 * Get Horizontal Dilution of Precision 00066 * @return float horizontal dilution of precision 00067 */ 00068 virtual float hdop(void) = 0; 00069 00070 /** 00071 * get count of active satellites 00072 */ 00073 virtual int sat_count(void) = 0; 00074 00075 /** 00076 * get speed in m/s 00077 */ 00078 virtual float speed_mps(void) = 0; 00079 00080 /** 00081 * get heading in degrees 00082 */ 00083 virtual float heading_deg(void) = 0; 00084 00085 /** 00086 * determine if data is available to be used 00087 */ 00088 virtual bool available(void) = 0; 00089 00090 /** 00091 * reset the data available flag 00092 */ 00093 virtual void reset_available(void) = 0; 00094 }; 00095 00096 #endif
Generated on Tue Jul 12 2022 21:36:18 by
 1.7.2
 1.7.2