mirror of https://github.com/ArduPilot/ardupilot
Copter: increase chance that parachute will deploy
Previously a single moment where the vehicle was within 30deg of the target could cause the parachute release counter to reset to zero. This change makes the parachute release if it is spending at least half it's time with more than a 30degree angle error.
This commit is contained in:
parent
7a18d59099
commit
1f2d17e8e7
|
@ -101,7 +101,9 @@ void Copter::parachute_check()
|
|||
// check for angle error over 30 degrees
|
||||
const float angle_error = attitude_control.get_att_error_angle_deg();
|
||||
if (angle_error <= CRASH_CHECK_ANGLE_DEVIATION_DEG) {
|
||||
control_loss_count = 0;
|
||||
if (control_loss_count > 0) {
|
||||
control_loss_count--;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue