2018 revision to classic DataBus AVC code.

Dependencies:   LSM303DLM Servo SerialGraphicLCD L3G4200D IncrementalEncoder SimpleShell

Revision:
18:3f8a8f6e3cc1
Parent:
16:eb28d0f64a9b
Child:
19:0d1728091519
--- a/Ublox6.h	Thu Dec 13 23:27:04 2018 +0000
+++ b/Ublox6.h	Fri Dec 14 00:36:06 2018 +0000
@@ -13,6 +13,8 @@
     // TODO 3 convert this to time units
     static const int lag=40;        // number of updater steps by which gps output lags reality
 
+    Ublox6();
+
     /**
      * UBX protocol parser (Wayne Holder)
      * @param cc is the character to parse
@@ -21,6 +23,8 @@
      */    
     void parse(unsigned char cc);
 
+    void read(double& lat, double& lon, float& course, float& speed, float& hdop, int& svcount);
+
     /**
      * get latitude
      */    
@@ -63,13 +67,29 @@
     void reset_available(void);
 
 private:
-    int _available;     // is data available?
+    typedef struct {
+        double lat;
+        double lon;
+        float course;
+        float speed;
+        float hdop;
+        int svcount;
+    } gps_data_t;
+
+    gps_data_t tmp;
+    gps_data_t latest;
+
+    int _ready;             // is data ready to be copied?
+    bool _available;        // 
+
+    /*
     float _latitude;        // temp storage, latitude
     float _longitude;       // temp storage, longitude
     float _hdop;            // horiz dilution of precision
     float _course_deg;      // course in degrees
     float _speed_mps;       // speed in m/s
-    int _sat_count;         // satellite count
+    int _svcount;           // space vehicle (satellite) count
+    */
 };
 
 #endif