GPS and IMU reading works
Dependencies: mbed Servo SDFileSystem
Diff: Get.cpp
- Revision:
- 15:dbf20c1209ae
- Parent:
- 14:92bacb5af01b
- Child:
- 20:a820531c78bc
diff -r 92bacb5af01b -r dbf20c1209ae Get.cpp --- a/Get.cpp Wed Aug 26 16:33:26 2015 +0000 +++ b/Get.cpp Wed Aug 26 22:41:36 2015 +0000 @@ -60,4 +60,39 @@ string getGPS_VelocityKph() { return GPS_VelocityKph; } - + +string decodeCommand(string cmd) { + if (cmd == "IMU_Y") { + return(getIMU_Y()); + } else if (cmd == "IMU_P") { + return(getIMU_P()); + } else if (cmd == "IMU_R") { + return(getIMU_R()); + } else if (cmd == "GPS_Quality") { + return(getGPS_Quality()); + } else if (cmd == "GPS_UTC") { + return(getGPS_UTC()); + } else if (cmd == "GPS_Latitude") { + return(getGPS_Latitude()); + } else if (cmd == "GPS_Longtitude") { + return(getGPS_Longtitude()); + } else if (cmd == "GPS_Altitude") { + return(getGPS_Altitude()); + } else if (cmd == "GPS_Num_Satellite") { + return(getGPS_Num_Satellite()); + } else if (cmd == "GPS_HDOP") { + return(getGPS_HDOP()); + } else if (cmd == "GPS_VDOP") { + return(getGPS_VDOP()); + } else if (cmd == "GPS_PDOP") { + return(getGPS_PDOP()); + } else if (cmd == "GPS_Date") { + return(getGPS_Date()); + } else if (cmd == "GPS_VelocityKnot") { + return(getGPS_VelocityKnot()); + } else if (cmd == "GPS_VelocityKph") { + return(getGPS_VelocityKph()); + } else { + return("Not acceptable command, example: @GET=GPS_Quality"); + } +} \ No newline at end of file