Plane: report bad AHRS health if uncalibrated accels with EKF

fixes issue #1720
This commit is contained in:
Andrew Tridgell 2015-01-02 17:39:08 +11:00
parent 745b739ab7
commit 80d1bd230e
1 changed files with 5 additions and 0 deletions

View File

@ -224,6 +224,11 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan)
// AHRS subsystem is unhealthy
control_sensors_health &= ~MAV_SYS_STATUS_AHRS;
}
if (ahrs.have_inertial_nav() && !ins.calibrated()) {
// trying to use EKF without properly calibrated accelerometers
control_sensors_health &= ~MAV_SYS_STATUS_AHRS;
}
if (barometer.healthy()) {
control_sensors_health |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
}