Allows for a GPS module to be connected to a serial port and exposes an easy to use API to get the GPS data. New feature, added Mbed/LPC17xx RTC synchronisation
Dependents: SatGPS AntiTheftGPS FLIGHT_CONTROL_AND_COMMUNICATIONS_SYSTEM GPS-Lora ... more
Diff: GPS.h
- Revision:
- 1:6aec92e77ad2
- Parent:
- 0:db98027c0bbb
- Child:
- 2:8aa059e7d8b1
diff -r db98027c0bbb -r 6aec92e77ad2 GPS.h --- a/GPS.h Mon Nov 15 20:11:16 2010 +0000 +++ b/GPS.h Sat Nov 20 21:02:06 2010 +0000 @@ -45,13 +45,16 @@ #define GPS_BUFFER_LEN 128 #define GPS_TICKTOCK 10000 -/** @defgroup API */ +/** @defgroup API The MODGPS API */ /** GPS module - * + * @author Andy Kirkham * @see http://mbed.org/cookbook/MODGPS * @see example1.cpp * @see example2.cpp + * @see API + * + * @image html /media/uploads/AjK/gps_interfaces.png "Wiring up the GPS module" * * Example: * @code @@ -91,7 +94,6 @@ * while(1) {} * } * @endcode - * */ class GPS : Serial { @@ -148,8 +150,22 @@ /** * Method used to check the validity of the positional data. This method * returns the GGA field, 0 is "bad, 1 is "ok", etc. See the NMEA GGA - * description for more details + * description for more details. + * + * @code + * // Assuming we have a GPS object previously created... + * GPS gps(NC, p9); * + * if (gps.getGPSquality() == 0) { + * // The location fix is no good/not accurate :( + * } + * else { + * // All good, can use last fix data. + * ) + * + * @endcode + * + * @ingroup API * @return int 0 on no fix, 1... (see NMEA GGA for more details). */ int getGPSquality(void) { return thePlace.getGPSquality(); }