DataFlash: fix bug in ekf gyro bias logging

This commit is contained in:
Jonathan Challinger 2014-10-28 19:04:34 -07:00 committed by Andrew Tridgell
parent bb6d8fd44a
commit ac2e5f644c

View File

@ -900,18 +900,18 @@ void DataFlash_Class::Log_Write_EKF(AP_AHRS_NavEKF &ahrs)
struct log_EKF1 pkt = { struct log_EKF1 pkt = {
LOG_PACKET_HEADER_INIT(LOG_EKF1_MSG), LOG_PACKET_HEADER_INIT(LOG_EKF1_MSG),
time_ms : hal.scheduler->millis(), time_ms : hal.scheduler->millis(),
roll : (int16_t)(100*degrees(euler.x)), // roll 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) 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) 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) velN : (float)(velNED.x), // velocity North (m/s)
velE : (float)(velNED.y), // velocity East (m/s) velE : (float)(velNED.y), // velocity East (m/s)
velD : (float)(velNED.z), // velocity Down (m/s) velD : (float)(velNED.z), // velocity Down (m/s)
posN : (float)(posNED.x), // metres North posN : (float)(posNED.x), // metres North
posE : (float)(posNED.y), // metres East posE : (float)(posNED.y), // metres East
posD : (float)(posNED.z), // metres Down posD : (float)(posNED.z), // metres Down
gyrX : (int8_t)(60*degrees(gyroBias.x)), // deg/min gyrX : (int16_t)(100*degrees(gyroBias.x)), // cd/sec, displayed as deg/sec due to format string
gyrY : (int8_t)(60*degrees(gyroBias.y)), // deg/min gyrY : (int16_t)(100*degrees(gyroBias.y)), // cd/sec, displayed as deg/sec due to format string
gyrZ : (int8_t)(60*degrees(gyroBias.z)) // deg/min gyrZ : (int16_t)(100*degrees(gyroBias.z)) // cd/sec, displayed as deg/sec due to format string
}; };
WriteBlock(&pkt, sizeof(pkt)); WriteBlock(&pkt, sizeof(pkt));