Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
Revision 38:6f814050895d, committed 2014-04-23
- Comitter:
- krobertson
- Date:
- Wed Apr 23 03:54:24 2014 +0000
- Parent:
- 37:417d6403a708
- Child:
- 40:7b4d6043f533
- Child:
- 41:df156ae5631b
- Commit message:
- dylan what did I do wrong with dataLocation?
Changed in this revision
handle/handleGPS.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/handle/handleGPS.cpp Wed Apr 23 03:34:39 2014 +0000 +++ b/handle/handleGPS.cpp Wed Apr 23 03:54:24 2014 +0000 @@ -23,6 +23,7 @@ if(rx_status != 1){ return rx_status; } + DH::Locs().inc(LHType_targ,0,true); Point* points = (Point*)pack.data; unsigned int num_points = pack.size; for(int i=0;i<num_points;i++){ @@ -113,6 +114,12 @@ op=getNext(field);delete op; //altitude double altitude = atof(op); if(timeS>0.5f){ + int degrees = (int)(latitude/100); + double minutes = latitude - degrees*100; + latitude = degrees + minutes/60; + degrees = (int)(longitude/100); + minutes = longitude - degrees*100; + longitude = degrees + minutes/60; USB::getSerial().printf("\nMy GPS data: Lat: %f, Lon: %f, Alt: %f, Time:%f\r\n",latitude,longitude,altitude,timeS); DH::Locs().add(LHType_locs,DataLocation(latitude,longitude,altitude,timeS)); USB::getSerial().printf("Current Time:%f\r\n",DH::Locs().getC().getTime());