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:
parent
e7736fb5e7
commit
96bc0e1e03
@ -64,8 +64,10 @@ void Plane::update_soaring() {
|
|||||||
|
|
||||||
const SoaringController::LoiterStatus loiterStatus = g2.soaring_controller.check_cruise_criteria();
|
const SoaringController::LoiterStatus loiterStatus = g2.soaring_controller.check_cruise_criteria();
|
||||||
|
|
||||||
if (loiterStatus == SoaringController::LoiterStatus::THERMAL_GOOD_TO_KEEP_LOITERING ||
|
if (loiterStatus == SoaringController::LoiterStatus::THERMAL_GOOD_TO_KEEP_LOITERING) {
|
||||||
loiterStatus == SoaringController::LoiterStatus::SOARING_DISABLED) {
|
// 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user