From ac2e5f644c698fbb85bf52d394d2a4eb137d8f80 Mon Sep 17 00:00:00 2001 From: Jonathan Challinger Date: Tue, 28 Oct 2014 19:04:34 -0700 Subject: [PATCH] DataFlash: fix bug in ekf gyro bias logging --- libraries/DataFlash/LogFile.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/DataFlash/LogFile.cpp b/libraries/DataFlash/LogFile.cpp index f9b184ddf0abe..35780723693b7 100644 --- a/libraries/DataFlash/LogFile.cpp +++ b/libraries/DataFlash/LogFile.cpp @@ -900,18 +900,18 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs) struct log_EKF1 pkt = { LOG_PACKET_HEADER_INIT(LOG_EKF1_MSG), time_ms : hal.scheduler->millis(), - roll : (int16_t)(100*degrees(euler.x)), // roll angle (centi-deg) - pitch : (int16_t)(100*degrees(euler.y)), // pitch angle (centi-deg) - yaw : (uint16_t)wrap_360_cd(100*degrees(euler.z)), // yaw angle (centi-deg) + roll : (int16_t)(100*degrees(euler.x)), // roll angle (centi-deg, displayed as deg due to format string) + pitch : (int16_t)(100*degrees(euler.y)), // pitch angle (centi-deg, displayed as deg due to format string) + yaw : (uint16_t)wrap_360_cd(100*degrees(euler.z)), // yaw angle (centi-deg, displayed as deg due to format string) velN : (float)(velNED.x), // velocity North (m/s) velE : (float)(velNED.y), // velocity East (m/s) velD : (float)(velNED.z), // velocity Down (m/s) posN : (float)(posNED.x), // metres North posE : (float)(posNED.y), // metres East posD : (float)(posNED.z), // metres Down - gyrX : (int8_t)(60*degrees(gyroBias.x)), // deg/min - gyrY : (int8_t)(60*degrees(gyroBias.y)), // deg/min - gyrZ : (int8_t)(60*degrees(gyroBias.z)) // deg/min + gyrX : (int16_t)(100*degrees(gyroBias.x)), // cd/sec, displayed as deg/sec due to format string + gyrY : (int16_t)(100*degrees(gyroBias.y)), // cd/sec, displayed as deg/sec due to format string + gyrZ : (int16_t)(100*degrees(gyroBias.z)) // cd/sec, displayed as deg/sec due to format string }; WriteBlock(&pkt, sizeof(pkt));