for Danillo
Dependencies: MBed_Adafruit-GPS-Library SDFileSystem mbed
dataPoint.h@3:0cc40383d016, 2015-01-17 (annotated)
- Committer:
- ncfronk
- Date:
- Sat Jan 17 19:12:28 2015 +0000
- Revision:
- 3:0cc40383d016
- Parent:
- 2:abcf77d0e77d
publishing;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ncfronk | 2:abcf77d0e77d | 1 | #include "mbed.h" |
ncfronk | 2:abcf77d0e77d | 2 | #include "math.h" |
ncfronk | 2:abcf77d0e77d | 3 | |
ncfronk | 2:abcf77d0e77d | 4 | class dataPoint{ |
ncfronk | 2:abcf77d0e77d | 5 | public: |
ncfronk | 2:abcf77d0e77d | 6 | uint8_t hour, minute, seconds, year, month, day; |
ncfronk | 2:abcf77d0e77d | 7 | uint16_t milliseconds; |
ncfronk | 2:abcf77d0e77d | 8 | float latitude, longitude, geoidheight, altitude; |
ncfronk | 2:abcf77d0e77d | 9 | bool fix; |
ncfronk | 2:abcf77d0e77d | 10 | uint8_t fixquality, satellites; |
ncfronk | 2:abcf77d0e77d | 11 | |
ncfronk | 2:abcf77d0e77d | 12 | float LongAvg, ShortAvg, RefAvg; |
ncfronk | 2:abcf77d0e77d | 13 | |
ncfronk | 2:abcf77d0e77d | 14 | |
ncfronk | 2:abcf77d0e77d | 15 | void setTime(uint8_t h, uint8_t m, uint8_t s, uint16_t mil){ |
ncfronk | 2:abcf77d0e77d | 16 | hour = h; |
ncfronk | 2:abcf77d0e77d | 17 | minute = m; |
ncfronk | 2:abcf77d0e77d | 18 | seconds = s; |
ncfronk | 2:abcf77d0e77d | 19 | milliseconds = mil; |
ncfronk | 2:abcf77d0e77d | 20 | }; |
ncfronk | 2:abcf77d0e77d | 21 | |
ncfronk | 2:abcf77d0e77d | 22 | void setPos(float lat, float lon){ |
ncfronk | 2:abcf77d0e77d | 23 | latitude = lat; |
ncfronk | 2:abcf77d0e77d | 24 | longitude = lon; |
ncfronk | 2:abcf77d0e77d | 25 | }; |
ncfronk | 2:abcf77d0e77d | 26 | void setDate(uint8_t y, uint8_t m, uint8_t d){ |
ncfronk | 2:abcf77d0e77d | 27 | year = y; |
ncfronk | 2:abcf77d0e77d | 28 | month = m; |
ncfronk | 2:abcf77d0e77d | 29 | day = d; |
ncfronk | 2:abcf77d0e77d | 30 | }; |
ncfronk | 2:abcf77d0e77d | 31 | |
ncfronk | 2:abcf77d0e77d | 32 | private: |
ncfronk | 2:abcf77d0e77d | 33 | |
ncfronk | 2:abcf77d0e77d | 34 | }; |