AP_Scripting:provide altitude loss safety abort for plane aerobatics
This commit is contained in:
parent
011fdf6e2b
commit
0a96f037f5
@ -185,10 +185,12 @@ tracking. Some of the key parameters are:
|
||||
|
||||
- AEROM_ANG_ACCEL : maximum angular acceleration in degrees per second per second. Reduce to give smoother flight, but more lag
|
||||
- AEROM_ANG_TC : time constant for correcting angular roll errors. Reduce for snappier rolls, but more risk of oscillation
|
||||
- AEROM_KE_ANG : knifeedge angle. This is the required pitch angle in knifeedge flight to hold height at cruise speed.
|
||||
- AEROM_KE_RUDD : This is the required rudder percentage in knifeedge flight to hold height at cruise speed.
|
||||
- AEROM_KE_RUDD_LK : This is the time ahead in seconds that the anticipated rudder required will be applied
|
||||
- AEROM_ENTRY_RATE : roll rate in degrees per second for entering and exiting a roll change
|
||||
- AEROM_THR_MIN : minumum throttle percentage for all aerobatic maneuvers
|
||||
- AEROM_THR_BOOST: minumum throttle percentage for maneuvers marked as throttle boost
|
||||
- AEROM_YAW_ACCEL: maximum yaw acceleration in degrees per second per second. Lower to soften yaw control
|
||||
- AEROM_BOX_WIDTH: the length of the aerobatic box whose center is defined by the start of a schedule
|
||||
- AEROM_PATH_SCALE: scale factor for all maneuvers. A value above 1.0 will increase the size of the maneuvers. A value below 1.0 will decrease the size. A negative value will mirror the maneuvers, allowing a sequence designed for left-to-right to be flown right-to-left.
|
||||
- AEROM_ALT_ABORT: Maximum altitude loss from the start of trick or shcedule before an abort will occur.
|
||||
|
@ -42,6 +42,7 @@ AEROM_STALL_PIT = bind_add_param('STALL_PIT', 24, -20)
|
||||
-- 25 was AEROM_KE_TC
|
||||
AEROM_KE_RUDD = bind_add_param('KE_RUDD', 26, 25)
|
||||
AEROM_KE_RUDD_LK = bind_add_param('KE_RUDD_LK', 27, 0.25)
|
||||
AEROM_ALT_ABORT = bind_add_param('ALT_ABORT',28,15)
|
||||
|
||||
-- cope with old param values
|
||||
if AEROM_ANG_ACCEL:get() < 100 and AEROM_ANG_ACCEL:get() > 0 then
|
||||
@ -2174,6 +2175,12 @@ function do_path()
|
||||
gcs:send_named_float("PERR", pos_error_ef:length())
|
||||
end
|
||||
|
||||
local alt_error = (current_measured_pos_ef - path_var.initial_ef_pos):z()
|
||||
if alt_error > AEROM_ALT_ABORT:get() then
|
||||
gcs:send_text(0,"Too low altitude, aborting")
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user