AP_Control : Add true airspeed compensation to pitch controller

turn rate to pitch rate calculation should use true airspeed
This commit is contained in:
Paul Riseborough 2013-12-03 10:29:18 +11:00 committed by Andrew Tridgell
parent 4f242aedec
commit 779e32d79f
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ float AP_PitchController::_get_coordination_rate_offset(float &aspeed, bool &inv
// don't do turn coordination handling when at very high pitch angles
rate_offset = 0;
} else {
rate_offset = cosf(_ahrs.pitch)*fabsf(ToDeg((GRAVITY_MSS / max(aspeed , float(aparm.airspeed_min))) * tanf(bank_angle) * sinf(bank_angle))) * _roll_ff;
rate_offset = cosf(_ahrs.pitch)*fabsf(ToDeg((GRAVITY_MSS / max((aspeed * _ahrs.get_EAS2TAS()) , float(aparm.airspeed_min))) * tanf(bank_angle) * sinf(bank_angle))) * _roll_ff;
}
if (inverted) {
rate_offset = -rate_offset;