AP_TECS: make TECS aware of LAND_PITCH_CD

this makes the flare a bit smoother
This commit is contained in:
Andrew Tridgell 2014-08-27 20:11:48 +10:00
parent fb4ef0b5c6
commit 500e20b08d
1 changed files with 4 additions and 0 deletions

View File

@ -721,6 +721,10 @@ void AP_TECS::update_pitch_throttle(int32_t hgt_dem_cm,
} else {
_PITCHminf = max(_pitch_min, aparm.pitch_limit_min_cd * 0.01f);
}
if (flight_stage == FLIGHT_LAND_FINAL) {
// in flare use min pitch from LAND_PITCH_CD
_PITCHminf = max(_PITCHminf, aparm.land_pitch_cd * 0.01f);
}
// convert to radians
_PITCHmaxf = radians(_PITCHmaxf);
_PITCHminf = radians(_PITCHminf);