Commit Graph

564 Commits

Author SHA1 Message Date
Peter Hall d4eb2c6396 Plane: quadplane: QPOS_POSITION1 tailsitters use input_vel_accel method 2022-01-04 10:42:12 +11:00
Iampete1 4848ac9166 Plane: quadplane: don't use `is_active_z()`, becasue its wrong 2022-01-04 10:42:12 +11:00
Iampete1 fb1f6b57ad Plane: Quadplane: never run Z controller if motors are not throttle unlimited 2022-01-04 10:42:12 +11:00
Peter Hall c215fa0745 Plane: Quadplane: never run Z controller in tailsiter VTOL transtion 2022-01-04 10:42:12 +11:00
Peter Hall 9df753551e Plane: quadplane: tailsitter: always relax pitch after transtion 2022-01-04 10:42:12 +11:00
Peter Hall 67d7ba490f Plane: quadplane: pass time to tailsitter.in_vtol_transition where avalable 2022-01-04 10:42:12 +11:00
Hwurzburg 18e427d27d Plane: add Q_OPTION to force fw trans on fail instead of QLAND 2021-12-24 13:55:15 +11:00
Iampete1 2154738421 Plane: Quadplane: only advance to QPOS_POSITION2 once tilts have finished slewing 2021-12-22 18:46:14 +11:00
Iampete1 eac52fe08f Plane: quadplane: don't ouput VTOL throttle on tiltrotor with no VTOL motors and till fully forward 2021-12-22 18:46:14 +11:00
Iampete1 6116eaeb32 Plane: quadplane: enhance tiltrotor transtion to better deal with tiltrotors with all motors tilting 2021-12-22 18:46:14 +11:00
Hwurzburg 049f5f2135 Plane: fix divide by zero in transition time 2021-12-10 19:10:51 -08:00
Andrew Tridgell e7c7cdd653 Plane: reset VTOL takeoff if not armed
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)
2021-12-04 16:51:02 +11:00
Josh Henderson 52adda7c4c Plane: INAV rename for neu & cm/cms 2021-11-30 10:08:07 +11:00
Josh Henderson c6dd39773d ArduPlane: inav use _xy() 2021-11-30 10:08:07 +11:00
Andrew Tridgell 36562ed30b Plane: limited VFWD integrator to cruise throttle
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
2021-11-24 18:49:24 +11:00
Andrew Tridgell 77c43d9ba1 Plane: limiting POS1 landing target speed
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
2021-11-24 07:15:21 +11:00
Andrew Tridgell 8d59e6fa48 Plane: fixed variable name
thanks to Peter for noticing
2021-11-22 13:15:29 +11:00
Andrew Tridgell ae81bbc5ed Plane: suppress spurious EKF yaw reset message
this makes plane match copter, emitting a yaw reset event, but not
worrying user. This message came out on each boot when EKF3 first
became active
2021-11-17 20:54:12 +11:00
Iampete1 9210488550 Plane: quadplane: limit pitch for all transitions into position control modes 2021-11-17 19:10:56 +11:00
Peter Barker 70562021ac ArduPlane: move from ENABLE_SCRIPTING to AP_SCRIPTING_ENABLED 2021-11-15 20:27:40 +11:00
Peter Barker 203103bae5 ArduPlane: ensure ENABLE_SCRIPTING is always defined 2021-11-15 20:27:40 +11:00
Iampete1 b9d240460b Plane: remove SpdHgt and use TECS direct 2021-11-13 08:05:39 +11:00
Peter Barker 7c3de472b2 Plane: support send_extended_sys_state 2021-11-09 10:22:24 +11:00
Andrew Tridgell d3742989ef Plane: default rate max to 75 for quadplane VTOL
this reduces overshoot when VTOL tune is less than ideal
2021-11-07 06:58:53 +11:00
Andrew Tridgell debae1381c Plane: fixed a bug in POSITION1 speed thresholds
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
2021-11-06 20:00:10 +11:00
Peter Barker 6a12d3f5d9 Plane: use enum class for StickMixing 2021-11-03 18:06:00 +11:00
Iampete1 af8688b300 Quadplane: add transiton class 2021-11-02 10:14:36 +11:00
Andrew Tridgell b74dca02ca Plane: avoid qpos approach when very close to destination
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
2021-10-29 20:22:19 +11:00
Andrew Tridgell 19b5044223 Plane: fixed VTOL state error when using Q_ENABLE=2
this ensures the poscontrol state is reset if it has not been
initialised before a VTOL loiter operation

thanks to Pete Hall for finding this
2021-10-29 20:22:19 +11:00
Iampete1 73e9c9bb43 Plane: quadplane: forward throttle reutrn float 2021-10-20 18:29:58 +11:00
Iampete1 b31ce6734a Plane: get throttle input return float 2021-10-20 18:29:58 +11:00
Peter Barker eef8115ffc ArduPlane: factor substring from allocation_error parameter 2021-10-18 12:49:44 +11:00
Iampete1 e99a5c6ef4 Plane: Quadplane: reinstate THR PWM param discriptions for stable users 2021-10-11 22:19:17 -04:00
Iampete1 30c9cccf78 Plane: Quadplane remove THR_MIN_PWM and THR_MAX_PWM 2021-10-11 22:19:17 -04:00
Iampete1 d1d6342165 Plane: update_throttle_range dont set_throttle_range 2021-10-11 22:19:17 -04:00
Andrew Tridgell 570ecdc2e0 Plane: don't apply fw pitch limit in VTOL control for tailsitters
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
2021-10-10 06:35:20 +11:00
Hwurzburg 4e731bf4e2 Plane: add VTOL POS1 notification to QRTL mode 2021-10-06 11:38:32 +11:00
Andrew Tridgell 2be23fff2b Plane: obey Q_RTL_ALT when in POS1 and POS2 states
this fixes the alt target for when user has disabled the quadplane
approach code
2021-10-02 12:46:59 +10:00
bugobliterator ae4d368267 Plane: replace config_error with allocation_error 2021-09-30 08:51:26 +10:00
Iampete1 a350ebb358 Plane: quadplane: do_vtol_land remove uneded I reset 2021-09-28 10:51:21 +10:00
Andrew Tridgell fd5faa866f Plane: always log QPOS when changing control state 2021-09-27 21:21:53 +10:00
Andrew Tridgell 9d0b7f8efe Plane: removed set_state to QPOS_POSITION1 in do_vtol_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
2021-09-27 21:21:53 +10:00
Peter Hall e83b598040 Plane: Quadplane: check attitude relax before running controllers, don't run controls if not going to output 2021-09-25 12:53:11 +10:00
bugobliterator 4b62dd75b0 ArduPlane: fix casting to pass format check 2021-09-22 21:36:34 +10:00
Bob Long f2d32fc800 Plane: quadplane: fix wp_dist reporting for VTOL landings
After hitting the approach stage of a VTOL landing in auto, nav_controller_output sends zero as the distance to waypoint.
2021-09-21 09:40:00 +10:00
Iampete1 cc89a8cc48 Plane: remove airmode Q_OPTION 2021-09-21 09:36:24 +10:00
Andrew Tridgell 7547ad53d3 Plane: allow for new guided destination during guided takeoff
if you set a very high alt for takeoff this is useful
2021-09-17 10:06:08 +10:00
Andrew Tridgell 8bee839931 Plane: fixed overshoot in guided takeoff of quadplanes 2021-09-17 10:06:08 +10:00
Iampete1 c4a1ae42e5 Plane: Quadpalne: move tiltrotor functionality to own class 2021-09-17 08:24:17 +10:00
Peter Barker 3d34e061fe ArduPlane: add and use HAL_QUADPLANE_ENABLED 2021-09-14 11:23:18 +10:00