Plane: Add comment to clarify additional 10m in soaring altitude target.

This commit is contained in:
Samuel Tabor 2020-09-10 10:24:19 +01:00 committed by Peter Barker
parent 87530c1b2b
commit ad48394b50
1 changed files with 2 additions and 0 deletions

View File

@ -344,6 +344,8 @@ void Plane::update_fbwb_speed_height(void)
// we're in soaring mode with throttle suppressed
set_target_altitude_current();
} else {
// we're in soaring mode climbing back to altitude. Set target to SOAR_ALT_CUTOFF plus 10m to ensure we positively climb
// through SOAR_ALT_CUTOFF, thus triggering throttle suppression and return to glide.
target_altitude.amsl_cm = 100*plane.g2.soaring_controller.get_alt_cutoff() + 1000 + AP::ahrs().get_home().alt;
}
}