Colin Stearns / Mbed 2 deprecated dgps

Dependencies:   mbed

handle/dataLocation.h

Committer:
dylanembed123
Date:
2014-04-01
Revision:
4:c75d5e5e6bfc
Child:
5:eef5ea6a9916

File content as of revision 4:c75d5e5e6bfc:

#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);
    
    
};