Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: handle/dataLocation.h
- Revision:
- 4:c75d5e5e6bfc
- Child:
- 5:eef5ea6a9916
diff -r 434d20e99e49 -r c75d5e5e6bfc handle/dataLocation.h --- /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