Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
Revision 1:aef1562834b4, committed 2014-02-16
- Comitter:
- stearnsc
- Date:
- Sun Feb 16 22:12:47 2014 +0000
- Parent:
- 0:9c001c4e7bf4
- Commit message:
- cs: Enable DGPS
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Feb 16 21:26:54 2014 +0000 +++ b/main.cpp Sun Feb 16 22:12:47 2014 +0000 @@ -7,9 +7,9 @@ Serial gps(p28,p27); typedef struct { - int latitude; //in .0001 minutes - int longitude; //in .0001 minutes - int altitude; //in decimeters + int latitude; //in 0.0001 minutes + int longitude; //in 0.0001 minutes + int altitude; //in 0.1 m int time; //in milliseconds } GpsData; @@ -101,6 +101,12 @@ otherGps.latitude, otherGps.longitude, otherGps.altitude, otherGps.time ); reading = false; + pc.printf("Lat: %d, Lon: %d, Alt: %d, Time: %d\r\n", + gpsData.latitude - otherGps.latitude, + gpsData.longitude - otherGps.longitude, + gpsData.altitude - otherGps.altitude, + gpsData.time - otherGps.time + ); } } else if (c == 'X'){ reading = true; @@ -132,9 +138,9 @@ gpsData.altitude = parseDec(field); //update whatever needs updating when gps updates - pc.printf("My GPS data: Lat: %d, Lon: %d, Alt: %d, Time:%d\r\n", - gpsData.latitude, gpsData.longitude, gpsData.altitude, gpsData.time - ); +// pc.printf("My GPS data: Lat: %d, Lon: %d, Alt: %d, Time:%d\r\n", +// gpsData.latitude, gpsData.longitude, gpsData.altitude, gpsData.time +// ); line.str(string("")); reading = false; @@ -154,7 +160,6 @@ pc.baud(57600); // sendGpsCommand("PMTK301,1"); -// while(true){pc.putc(gps.getc());} gps.attach(&handleGpsData, Serial::RxIrq); -// xbee.attach(&handleXbeeGps, Serial::RxIrq); + xbee.attach(&handleXbeeGps, Serial::RxIrq); }