Commit Graph

633 Commits

Author SHA1 Message Date
Andrew Tridgell
6d63e1f7d3 Plane: added Q_LAND_ALTCHG parameter
this is the threshold height change over 4 seconds for a landing to be
detected. It can be raised if landing detection is very slow
2022-03-09 07:50:10 +11:00
Iampete1
80f8f8b14e Plane: quadplane: double log QPOS state change 2022-03-01 10:59:07 +11:00
Peter Barker
b19bfba0ec Plane: use has_valid_input in place of checking throttle counter 2022-03-01 10:29:37 +11:00
Iampete1
267583db55 Plane: quadplane: never reset yaw target rates when entering QPOS1 2022-02-21 09:35:06 +11:00
Iampete1
9fd14dbf94 Plane: quadplane: set IO failsafe limit for all motors 2022-02-17 12:31:16 +11:00
Andrew Tridgell
1bdc9b5bf8 Plane: fixed in_vtol logic so QRTL can AIRBRAKE 2022-02-16 07:43:01 +11:00
Andrew Tridgell
aab6c94936 Plane: don't weathervane in AIRBRAKE state
this prevents unwanted VTOL motor throttle while trying to slow
down. In this stage the slaving of yaw rate to fixed wing roll control
is sufficient
2022-02-16 07:43:01 +11:00
Andrew Tridgell
2846f87eeb Plane: reduce height gain in auto landing for tiltrotors
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
2022-02-16 07:43:01 +11:00
Iampete1
1ca1707f9f Plane: quadpalne: keep motors interlock state upto date with E-stop 2022-02-10 07:43:40 +09:00
Peter Hall
717b18a680 Plane: quadplane: add allow_weathervane transtion class method 2022-02-08 10:38:16 +11:00
Peter Hall
6a719664d3 Plane: quadplane: pass takeoff and landing state to weathervane 2022-02-08 10:38:16 +11:00
Gone4Dirt
a79359dc67 Plane: use new weathervane library 2022-02-08 10:38:16 +11:00
murata
f8383df5a4 Plane: Remove meaningless semicolons 2022-02-07 08:27:34 +09:00
Bill Geyer
54bdde8845 Copter: fix parameter issue with quadplane 2022-02-01 23:06:51 -05:00
Peter Barker
266d384ca7 ArduPlane: rename AP_AHRS::get_position to get_location 2022-01-25 10:47:22 +11:00
Iampete1
32488a5e3a Plane: add MOTB logging at 10hz 2022-01-18 10:18:10 +11:00
Iampete1
3a5c7ea8fc Plane: quadplane: add transtion fail action param 2022-01-11 11:02:33 +11:00
Peter Hall
2ffebebddc Plane: tailsitter: provide min throttle limit based on disk therory outflow velocity 2022-01-11 10:37:38 +11:00
Iampete1
ca1b5b1db2 Plane: Quadplane: use get_frame_and_type_string 2022-01-05 19:51:19 +11:00
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
Josh Henderson
1da21c3b21 Quadplane: use vector.xy().length() instead of norm(x,y) 2021-09-14 10:43:46 +10:00
Andrew Tridgell
cb307891e0 Plane: fixed bad yaw rate demands in tailsitter fixed wing modes
this prevents the pilot putting in crazy yaw rate demands due to the
use of rudder stick in fixed wing modes for tailsitters while still
allowing for FBWA flat turns if the user wants them.

It uses the existing RUDD_DT_GAIN parameter for a gain scaling of yaw
rate for copter tailsitters
2021-09-14 07:55:40 +10:00
Iampete1
c73207b4b0 Plane: quadplane: remove init mode and control run methods 2021-09-08 18:06:58 +10:00
Iampete1
95fbf39f72 Plane: quadplane: check_attitude_relax use the last time the controllers were run not the last time relax was checked 2021-09-07 09:09:47 +10:00
Hwurzburg
5ca652a243 Plane: rename tailistter motor class to more correct singl/dual motor layout 2021-09-06 10:14:05 +10:00
Iampete1
f1477a6c29 Plane: quadplane: add assisted flight only airmode 2021-09-01 08:33:24 +10:00
Iampete1
46670f7bd0 Plane: quadplane: move tailsitter items to dedicated setup 2021-09-01 08:33:24 +10:00
Iampete1
700a92f036 plane: quadplane: tailsitter: run FW transition check and assist immediately 2021-08-31 10:34:33 +10:00
Peter Hall
657fcb7f59 Plane: quadplane: set last_pidz_init_ms 2021-08-31 09:58:03 +10:00
Iampete1
70ab9ba3b6 Plane: tailsitter: remove pilot prop-hanging teaching params and code. 2021-08-25 18:47:51 +10:00
Hwurzburg
551d55a85c ArduPlane: add thr position trigger to ThrLandCtrl Q_OPTION 2021-08-25 12:32:59 +10:00
Iampete1
d372907a98 Plane: Quadplane: add Q_OPTION to only allow arming in Qmodes and auto. 2021-08-24 10:39:12 +10:00
TunaLobster
cbf6c2926f ArduPlane: Remove @RebootRequired: False 2021-08-19 10:00:16 +10:00
Andrew Tridgell
58c823284c Plane: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Iampete1
baf2b4a3d8 Plane: Qstabilize: mode functions to ModeQStabilize 2021-08-17 11:46:49 +10:00
Iampete1
44e63861ce Plane: QRTL: move functions to ModeQRTL 2021-08-17 11:46:49 +10:00
Iampete1
f75919e727 plane: QLoiter: move functions to ModeQLoiter 2021-08-17 11:46:49 +10:00
Iampete1
921116e7a3 Plane: QLand: move functions to ModeQLand 2021-08-17 11:46:49 +10:00
Iampete1
737096f342 Plane: QHover: move functions to ModeQHover 2021-08-17 11:46:49 +10:00
Iampete1
a1fa683272 plane: Qautotune: move functions to ModeQAutotune 2021-08-17 11:46:49 +10:00
Iampete1
e293866245 plane: Qacro: move functions to ModeQAcro 2021-08-17 11:46:49 +10:00
Leonard Hall
65b58dea85 Plane: fix PID filter names FILT -> FLTE, D_FILT -> FLTD 2021-08-10 08:33:56 +09:00
Peter Hall
ed4345cb3b Quadplane: tailsitter: provide assistance at min throttle 2021-08-08 19:41:22 +10:00
Peter Hall
2527117cf9 Quadplane: combine assistance_needed and assistance_safe functions 2021-08-08 19:41:22 +10:00
Iampete1
7ff592d29e Plane: Quadplane: move mode functions to mode classes in-place 2021-08-03 12:28:31 +10:00
Hwurzburg
b539a534e9 Plane: improve description of Q_TRIM_PITCH 2021-07-27 12:49:33 +10:00
Iampete1
beefd95079 Plane: QuadPlane: tailsitter param conversion, set and use new enable param 2021-07-27 09:08:34 +10:00
Iampete1
0eab3faf32 Plane: use new tailsiter class 2021-07-27 09:08:34 +10:00
Iampete1
2bc2b9533b Plane: QuadPlane: move tailsitter to class 2021-07-27 09:08:34 +10:00
Peter Barker
06c2faaec5 ArduPlane: rename for AHRS restructuring 2021-07-21 21:01:39 +10:00
Hwurzburg
19213d3627 Plane: Allow yaw at zero throttle in VTOL descents 2021-07-20 11:10:25 +10:00