GPS and IMU reading works

Dependencies:   mbed Servo SDFileSystem

/media/uploads/taoqiuyang/img_2352.jpg

Files at this revision

API Documentation at this revision

Comitter:
dem123456789
Date:
Fri Nov 27 02:24:42 2015 +0000
Parent:
47:4b490931e75f
Commit message:
update with gui

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Nov 25 20:13:57 2015 +0000
+++ b/main.cpp	Fri Nov 27 02:24:42 2015 +0000
@@ -168,7 +168,7 @@
             D_GPS_Num_Satellite = strtod(result.at(6).c_str(), NULL);
             GPS_HDOP = result.at(7);
             D_GPS_HDOP = strtod(result.at(7).c_str(), NULL);
-            GPS_Altitude = result.at(8) + result.at(9);
+            GPS_Altitude = result.at(8);
             D_GPS_Altitude = strtod(result.at(8).c_str(), NULL);
             GPS_Altitude_Unit = result.at(9);
         }
@@ -188,11 +188,11 @@
     } else if (GPS_data_string.substr(0,6) == "$GPVTG" and GPS_Quality != "0" and GPS_Quality != "6") {
         GPS_data_string = GPS_data_string.substr(7);
         vector<string> result = split(GPS_data_string, ',');
-        GPS_VelocityKnot = result.at(4) + result.at(5);
+        GPS_VelocityKnot = result.at(4);
         D_GPS_VelocityKnot = strtod(result.at(4).c_str(), NULL);
         GPS_VelocityKnot_Unit = result.at(5);
         asterisk_idx = result.at(7).find('*');
-        GPS_VelocityKph = result.at(6) + result.at(7).substr(0, asterisk_idx);
+        GPS_VelocityKph = result.at(6);
         D_GPS_VelocityKph = strtod(result.at(6).c_str(), NULL);
         GPS_VelocityKph_Unit = result.at(7).substr(0, asterisk_idx);
     }