mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
Copter: parachute check uses alt-above-home
Baro alt is tied to the alt above EKF origin which isn't correct
This commit is contained in:
parent
5560d3dba1
commit
3269cd63cb
@ -110,7 +110,7 @@ void parachute_check()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ensure the first control_loss event is from above the min altitude
|
// ensure the first control_loss event is from above the min altitude
|
||||||
if (control_loss_count == 0 && parachute.alt_min() != 0 && (baro_alt < (int32_t)parachute.alt_min() * 100)) {
|
if (control_loss_count == 0 && parachute.alt_min() != 0 && (current_loc.alt < (int32_t)parachute.alt_min() * 100)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ static void parachute_manual_release()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// do not release if we are landed or below the minimum altitude above home
|
// do not release if we are landed or below the minimum altitude above home
|
||||||
if (ap.land_complete || (parachute.alt_min() != 0 && (baro_alt < (int32_t)parachute.alt_min() * 100))) {
|
if (ap.land_complete || (parachute.alt_min() != 0 && (current_loc.alt < (int32_t)parachute.alt_min() * 100))) {
|
||||||
// warn user of reason for failure
|
// warn user of reason for failure
|
||||||
gcs_send_text_P(SEVERITY_HIGH,PSTR("Parachute: Too Low"));
|
gcs_send_text_P(SEVERITY_HIGH,PSTR("Parachute: Too Low"));
|
||||||
// log an error in the dataflash
|
// log an error in the dataflash
|
||||||
|
Loading…
Reference in New Issue
Block a user