Colin Stearns / Mbed 2 deprecated dgps

Dependencies:   mbed

Revision:
4:c75d5e5e6bfc
Child:
5:eef5ea6a9916
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/handle/dataLocation.h	Tue Apr 01 15:52:08 2014 +0000
@@ -0,0 +1,35 @@
+#define MAXNUMLOCS 256
+
+// Storage of data location
+class DataLocation{
+private:
+    // Current value of lat lon and alt
+    double lat,lon,alt;
+public:
+    double& getLat(){return lat;}
+    double& getLon(){return lon;}
+    double& getAlt(){return alt;}
+}
+
+// Singleton location holder
+class LocHolder{
+private:
+    // Actual Locations (absolute)
+    static DataLocation locs[MAXNUMLOCS];
+    // Target Locations (relative to base station -> base station is at 0,0,0)
+    static DataLocation targ[MAXNUMLOCS];
+    // Base Station Locations (absolute)
+    static DataLocation base[MAXNUMLOCS];
+    // Index of the head of the circular buffers
+    static unsigned int headLocs,headTarg,headBase;
+public:
+    static DataLocation* getLocs();
+    static DataLocation* getTarg();
+    static DataLocation* getBase();
+    
+    DataLocation& getCurrentLocs(int offset=0);
+    DataLocation& getCurrentTarg(int offset=0);
+    DataLocation& getCurrentBase(int offset=0);
+    
+    
+};
\ No newline at end of file