Plane: Soaring: Reset loiter.sum_cd when good to continue thermalling, so that exit heading acceptance criteria does not grow.

This commit is contained in:
Samuel Tabor 2019-06-09 01:25:01 +01:00 committed by Andrew Tridgell
parent e7736fb5e7
commit 96bc0e1e03

View File

@ -64,8 +64,10 @@ void Plane::update_soaring() {
const SoaringController::LoiterStatus loiterStatus = g2.soaring_controller.check_cruise_criteria();
if (loiterStatus == SoaringController::LoiterStatus::THERMAL_GOOD_TO_KEEP_LOITERING ||
loiterStatus == SoaringController::LoiterStatus::SOARING_DISABLED) {
if (loiterStatus == SoaringController::LoiterStatus::THERMAL_GOOD_TO_KEEP_LOITERING) {
// Reset loiter angle, so that the loiter exit heading criteria
// only starts expanding when we're ready to exit.
plane.loiter.sum_cd = 0;
break;
}