APM_Control: use EKF yaw bias to correct fixed wing yaw damper

This commit is contained in:
Andrew Tridgell 2021-12-06 20:54:33 +11:00
parent 304b7df8c2
commit 639447142a

View File

@ -196,6 +196,10 @@ int32_t AP_YawController::get_servo_out(float scaler, bool disable_integrator)
// Get the accln vector (m/s^2)
float accel_y = AP::ins().get_accel().y;
// subtract current bias estimate from EKF
const Vector3f &abias = _ahrs.get_accel_bias();
accel_y -= abias.y;
// Subtract the steady turn component of rate from the measured rate
// to calculate the rate relative to the turn requirement in degrees/sec
float rate_hp_in = ToDeg(omega_z - rate_offset);