From a88e10d3a05175e5d7a502ba44a49ec2666ce78b Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Mon, 7 Sep 2015 15:58:17 -0700 Subject: [PATCH] DataFlash: Log vDOP with GPS messages. Due to the description string getting to long HDop was renamed as EPH with VDop as EPV (Which is the same terimnology used to describe the MAVLink side). Status was shortened to stat as well. --- libraries/DataFlash/DataFlash.h | 3 ++- libraries/DataFlash/LogFile.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/DataFlash/DataFlash.h b/libraries/DataFlash/DataFlash.h index 55382e4467..409d30728d 100644 --- a/libraries/DataFlash/DataFlash.h +++ b/libraries/DataFlash/DataFlash.h @@ -211,6 +211,7 @@ struct PACKED log_GPS { uint16_t gps_week; uint8_t num_sats; uint16_t hdop; + uint16_t vdop; int32_t latitude; int32_t longitude; int32_t rel_altitude; @@ -688,7 +689,7 @@ Format characters in the format string for binary log messages { LOG_PARAMETER_MSG, sizeof(log_Parameter), \ "PARM", "QNf", "TimeUS,Name,Value" }, \ { LOG_GPS_MSG, sizeof(log_GPS), \ - "GPS", "QBIHBcLLeeEefB", "TimeUS,Status,GMS,GWk,NSats,HDop,Lat,Lng,RAlt,Alt,Spd,GCrs,VZ,U" }, \ + "GPS", "QBIHBccLLeeEefB", "TimeUS,Stat,GMS,GWk,NSat,EPH,EPV,Lat,Lng,RAlt,Alt,Spd,GCrs,VZ,U" }, \ { LOG_IMU_MSG, sizeof(log_IMU), \ "IMU", "QffffffIIfBB", "TimeUS,GyrX,GyrY,GyrZ,AccX,AccY,AccZ,ErrG,ErrA,Temp,GyHlt,AcHlt" }, \ { LOG_MESSAGE_MSG, sizeof(log_Message), \ diff --git a/libraries/DataFlash/LogFile.cpp b/libraries/DataFlash/LogFile.cpp index 3e6735e731..6d8862721f 100644 --- a/libraries/DataFlash/LogFile.cpp +++ b/libraries/DataFlash/LogFile.cpp @@ -720,6 +720,7 @@ void DataFlash_Class::Log_Write_GPS(const AP_GPS &gps, uint8_t i, int32_t relati gps_week : gps.time_week(i), num_sats : gps.num_sats(i), hdop : gps.get_hdop(i), + vdop : gps.get_vdop(i), latitude : loc.lat, longitude : loc.lng, rel_altitude : relative_alt,