this is equivalent to copters WP_NAVALT_MIN parameter for takeoff. Not
implemented for land yet
this is useful for vehicles with significant GPS velocity noise on
takeoff, preventing dragging the landing gear
this fixes a case where we can get false positive on the landing
detector for quadplanes.
The issue happens if we cross the LAND_DESCEND to LAND_FINAL threshold
while pilot repositioning is active, with stale information in
landing_detect.lower_limit_start_ms as we don't run should_relax() in
LAND_DESCEND
when we arm in guided mode then enter a special guided_wait_takeoff
state. We keep motors suppressed until one of the following happens
1) disarm
2) guided takeoff command
3) change to AUTO with a takeoff waypoint as first nav waypoint
4) change to another mode
while in this state we don't go to throttle unlimited, and will refuse
a change to AUTO mode if the first waypoint is not a takeoff. If we
try to switch to RTL then we will instead use QLAND
This state is needed to cope with the takeoff sequence used by QGC on
common controllers such as the MX16, which do this on a "takeoff"
swipe:
- changes mode to GUIDED
- arms
- changes mode to AUTO
when RC_OPTIONS has been changed to not check throttle for arming then
treat this like a sprung throttle for quadplane throttle suppression
in auto-throttle modes, and only unsuppress when throttle goes above
trim+dz
when rudder disarm is disabled we should allow full yaw control
regardless of throttle level. We should also only disable left yaw
when throttle is at zero, as right yaw does not indicate pilot may be
trying to disarm
when a quadplane touches down in an auto throttle mode the pilot may
use rudder to disarm. The check for rudder disarm was only active in
modes without auto-throttle. This expands it to all modes if the
throttle has hit the lower limit
this improves 4 things in the POSITION1 controller based on logs from
4.2.0beta2. The changes are designed to increase the tolerance to
an incorrect value for Q_TRANS_DECEL, reducing landing overshoot
1) we fix the initialisation of the acceleration. The
init_xy_controller() function assumes zero accel, so we need to
call set_accel_desired_xy_cmss() just after that init to get the
correct accel. Thanks to Leonard for this fix
2) if we decel more than expected due to too low Q_TRANS_DECEL we
need to reduce the target speed, rather than putting the nose down
3) lower the default Q_P_JERK_XY to a value more appropriate for most
quadplanes (Leonard suggested a value of 2)
4) fixed the pitch envelope from Q_BACKTRANS_MS to start after the
airbrake phase is complete
we need to setup last_fw_mode_ms and last_fw_nav_pitch_cd when we
enter POSITION1 mode so that the expanding envelope pitch limit from
Q_BACKTRANS_MS is applied correctly
if we are flying too far off the target vector then exit airbrake
state. This prevents flying for a long distance away from the landing
point in airbrake mode
avoid running the motors while tilted past the tilt max if we are in
AIRBRAKE state. This stops a large amount of forward thrust from the
tilted motors while trying to slow down, while still maintaining
attitude control
we need to reset the takeoff target position while disarmed so we
don't use spurious position information from before we get good GPS
lock.
also remove the "Resetting previous waypoint" message as it doesn't
provide useful information and is just a distraction (it would be
printed continuously while waiting for arming with this PR)
in some situations (such as when landing approach is disabled) the
vfwd integrator can wind up to extreme values. This can put a huge
load on an electric quadplane as it is running both forward and vtol
motors, and the downforce from being nose down can be extreme.
It should never need to go above the cruise throttle in any reasonable
situation, so limit it to cruise to ensure we don't apply too much
forward throttle
prevent very high target speeds when the target velocity profile is
above the initial speed in POSITION1. Always allow up to 2*Q_WP_SPEED,
but don't go above the initial speed
we were comparing two different speeds in the threshold for going to
Q_WP_SPEED limit. The reason the two speeds were different was the
wp_nav init happened before the defaults were setup for quadplanes
this fixes both bugs
this prevents a fwd transition when doing something like LOITER_TIME
close to a VTOL_LAND wp. We use 1.5 times the stopping distance at
cruise airspeed for the threshold
tailsitters may have narrow fixed wing limits but need high limits for
landing in high wind
found this on a HWing which was essentially impossible to auto land
we are immediately replacing the state with QPOS_APPROACH, so the
set_state is not needed, and triggers a call to
attitude_control->reset_yaw_target_and_rate() which can badly impact
euler rates for tailsitters