Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
handle/dataLocation.h@7:c75d5e5e6bfc, 2014-04-01 (annotated)
- Committer:
- dylanembed123
- Date:
- Tue Apr 01 15:52:08 2014 +0000
- Revision:
- 7:c75d5e5e6bfc
- Child:
- 9:da906eeac51e
Update handler and adapter;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dylanembed123 | 7:c75d5e5e6bfc | 1 | #define MAXNUMLOCS 256 |
dylanembed123 | 7:c75d5e5e6bfc | 2 | |
dylanembed123 | 7:c75d5e5e6bfc | 3 | // Storage of data location |
dylanembed123 | 7:c75d5e5e6bfc | 4 | class DataLocation{ |
dylanembed123 | 7:c75d5e5e6bfc | 5 | private: |
dylanembed123 | 7:c75d5e5e6bfc | 6 | // Current value of lat lon and alt |
dylanembed123 | 7:c75d5e5e6bfc | 7 | double lat,lon,alt; |
dylanembed123 | 7:c75d5e5e6bfc | 8 | public: |
dylanembed123 | 7:c75d5e5e6bfc | 9 | double& getLat(){return lat;} |
dylanembed123 | 7:c75d5e5e6bfc | 10 | double& getLon(){return lon;} |
dylanembed123 | 7:c75d5e5e6bfc | 11 | double& getAlt(){return alt;} |
dylanembed123 | 7:c75d5e5e6bfc | 12 | } |
dylanembed123 | 7:c75d5e5e6bfc | 13 | |
dylanembed123 | 7:c75d5e5e6bfc | 14 | // Singleton location holder |
dylanembed123 | 7:c75d5e5e6bfc | 15 | class LocHolder{ |
dylanembed123 | 7:c75d5e5e6bfc | 16 | private: |
dylanembed123 | 7:c75d5e5e6bfc | 17 | // Actual Locations (absolute) |
dylanembed123 | 7:c75d5e5e6bfc | 18 | static DataLocation locs[MAXNUMLOCS]; |
dylanembed123 | 7:c75d5e5e6bfc | 19 | // Target Locations (relative to base station -> base station is at 0,0,0) |
dylanembed123 | 7:c75d5e5e6bfc | 20 | static DataLocation targ[MAXNUMLOCS]; |
dylanembed123 | 7:c75d5e5e6bfc | 21 | // Base Station Locations (absolute) |
dylanembed123 | 7:c75d5e5e6bfc | 22 | static DataLocation base[MAXNUMLOCS]; |
dylanembed123 | 7:c75d5e5e6bfc | 23 | // Index of the head of the circular buffers |
dylanembed123 | 7:c75d5e5e6bfc | 24 | static unsigned int headLocs,headTarg,headBase; |
dylanembed123 | 7:c75d5e5e6bfc | 25 | public: |
dylanembed123 | 7:c75d5e5e6bfc | 26 | static DataLocation* getLocs(); |
dylanembed123 | 7:c75d5e5e6bfc | 27 | static DataLocation* getTarg(); |
dylanembed123 | 7:c75d5e5e6bfc | 28 | static DataLocation* getBase(); |
dylanembed123 | 7:c75d5e5e6bfc | 29 | |
dylanembed123 | 7:c75d5e5e6bfc | 30 | DataLocation& getCurrentLocs(int offset=0); |
dylanembed123 | 7:c75d5e5e6bfc | 31 | DataLocation& getCurrentTarg(int offset=0); |
dylanembed123 | 7:c75d5e5e6bfc | 32 | DataLocation& getCurrentBase(int offset=0); |
dylanembed123 | 7:c75d5e5e6bfc | 33 | |
dylanembed123 | 7:c75d5e5e6bfc | 34 | |
dylanembed123 | 7:c75d5e5e6bfc | 35 | }; |