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

Revision:
2:8aa059e7d8b1
Parent:
0:db98027c0bbb
Child:
5:7f130f85d5a4
--- a/GPS_Time.h	Sat Nov 20 21:02:06 2010 +0000
+++ b/GPS_Time.h	Fri Apr 15 12:23:52 2011 +0000
@@ -48,6 +48,14 @@
     int  hundreths; 
     //! Time status.
     char status;    
+    //! The velocity (in knots)
+    double velocity;
+    //! The track (in decimal degrees true)
+    double track;    
+    //! The magnetic variation direction
+    char magvar_dir;
+    //! The magnetic variation value
+    double magvar;
     
     GPS_Time();
     void fractionalReset(void) { tenths = hundreths = 0; }
@@ -56,6 +64,12 @@
     GPS_Time * timeNow(GPS_Time *n);
     GPS_Time * timeNow(void) { return timeNow(NULL); }
     void nmea_rmc(char *s);
+    double velocity_knots(void) { return velocity; }
+    double velocity_kph(void) { return (velocity * 1.852); }
+    double velocity_mps(void) { return velocity_kph() / 3600.0; }
+    double velocity_mph(void) { return velocity_kph() / 0.621371192; }
+    double track_over_ground(void) { return track; }
+    double magnetic_variation(void) { return magvar_dir == 'W' ? (magvar * -1.0) : (magvar); }
     double julian_day_number(GPS_Time *t);
     double julian_date(GPS_Time *t);
     double julian_day_number(void) { return julian_day_number(this); }