Commit Graph

279 Commits

Author SHA1 Message Date
Michael du Breuil c15983c690 Plane: prevent loss of control when Q_ENABLE is set while flying
Also rename check_throttle_suppression
2019-02-21 21:38:03 -07:00
Mark Whitehorn 95b3a5bacd ArduPlane: implement hover throttle learning for quadplanes
disable by default
check quadplane.enable in update_hover_learn
2019-02-16 19:04:13 -08:00
Mark Whitehorn b9f3118374 Plane: allow changing Q_TRIM_PITCH in flight
change float comparison to is_equal
2019-02-12 09:42:19 +11:00
Michael du Breuil df1632054e Plane: Update throttle mix 2019-02-05 11:05:54 +11:00
Michael du Breuil d6cac4b52a Plane: Add a failure timer for quadplane forward transitions
Falls over to QLAND if we fail to transition
2019-01-08 10:52:12 +11:00
Michael du Breuil 69c87c6c4a Plane: Disallow arming if quadplane has been requested but isn't available 2018-12-28 18:09:21 +11:00
Andrew Tridgell d3afc9424a Plane: make QTUN logging match copter logging 2018-12-21 22:17:52 +11:00
Michael du Breuil 1a45755ffd Plane: Support a different landing radius for quadplane fw approach 2018-12-18 10:11:22 +11:00
Nikhil Upadhye d1e93bae83 Plane: adding new mode QAUTOTUNE
copter like autotune support for quadplanes and tailsitter in VTOL mode.

cleanup
2018-12-14 16:33:11 +11:00
Randy Mackay 71708ee4ea Plane: quadplane uses set_defaults_from_table 2018-12-06 12:23:41 +09:00
IamPete1 c6e70c0454 Plane: add roll limit for tailsitters
Quadplane: add tailsitter pitch params
2018-12-01 09:40:07 +11:00
Andrew Tridgell c59b2c156a Plane: fixes for Q_TRIM_PITCH
improved documentation and variable names
2018-11-12 17:05:04 +11:00
IamPete1 5a7bd61e8c Quadplane: add trim params 2018-11-12 17:05:04 +11:00
Michael du Breuil 8e906e0ba0 Plane: Add support for a loiter to alt approach to VTOL landing 2018-11-10 18:58:54 +11:00
Michael du Breuil b6efc8a20b Plane: reduce some copy pasted code 2018-09-20 13:47:21 -07:00
Andrew Tridgell ef154cf3fa Plane: fixed relaxing of attitude controller on transition
this fixes an issue found by Leonard where the attitude controller
could have residual control left over from a previous transition when
engaging the VTOL attitude controller
2018-09-15 11:00:29 +10:00
Michael du Breuil f9e56f9d12 Plane: Respect frame type on VTOL_TAKEOFF commands
allow missioncommands to fail to start
2018-09-11 06:42:00 +10:00
Michael du Breuil 925d76bb8c Plane: Small cleanup to quadplane const (and clarity) 2018-09-04 15:11:41 +10:00
Michael du Breuil 3d923d0572 Plane: Send a quadplane version of NAV_CONTROLLER_OUTPUT 2018-08-07 09:49:01 +10:00
IamPete1 20c67019b0 Plane: added Q_TAILSIT_THSCMX
this provides more flexibility in tailsitter throttle scaling
2018-07-19 09:48:25 +10:00
Randy Mackay 840a6e4147 Plane: quadplane uses AC_Loiter
includes param conversion
2018-04-04 10:45:10 +09:00
Peter Barker f6a185a3c3 Plane: factor vehicle's mavlink send_heartbeat 2018-04-03 13:05:19 +01:00
Randy Mackay a0a9a68fbc Plane: quadplane smoothing gain replaced by Q_A_INPUT_TC
Q_A_INPUT_TC parameter allows this to be tuned and a single value (which defaults to a value between the two previously used values) is used for all modes
2018-03-16 13:50:57 +09:00
Randy Mackay f41f4dc6e5 Plane: move pos-control pids to pos-control library 2018-01-23 12:00:43 +09:00
Randy Mackay 017e71a748 Plane: quadplane velocity pi moves to position control library 2018-01-23 12:00:43 +09:00
Peter Barker af007c5f0f Plane: tighten handleMessage result type 2017-12-01 17:01:10 +00:00
Andrew Tridgell 9c8cd6c1cc Plane: added Q_TRANS_DECEL
this gives a deceleration rate for QRTL transition from RTL, and also
for transitions to QLOITER
2017-11-05 20:44:42 +11:00
Andrew Tridgell 21164ef409 Plane: added tailsitter surface speed scaling
added scaling of control surfaces by throttle when in hover. This helps
the controller remain stable over a wide range of throttle levels, such
as when descending or rapidly climbing
2017-11-05 17:05:08 +11:00
Andrew Tridgell 552faa8f67 Plane: smoother tailsitter transitions
this smooths out tailsitter transitions in both directions, adding a
new FW to VTOL transition state
2017-10-30 16:30:38 +11:00
Andrew Tridgell af893ddde7 Plane: implement Q_OPTIONS
this allows for NAV_TAKEOFF to be treated as NAV_VTOL_TAKEOFF in
quadplanes, and for level flight to be maintained during quadplane
transitions
2017-10-30 16:30:10 +11:00
Andrew Tridgell 8178ab4037 Plane: make mav_type in HEARTBEAT configurable
needed for qgc to setup for quadplanes
2017-10-20 15:41:06 +11:00
Andrew Tridgell bc17c26dbf Plane: limit pitch in transition to QLOITER and QLAND
when switching to QLOITER or QLAND when in forward flight, limit the
maximum pitch to prevent a sudden decelleration
2017-09-09 08:14:09 +10:00
Andrew Tridgell baee71a5b4 Plane: added GUIDED takeoff for quadplanes
this allows takeoff in GUIDED mode in the same way as copters
2017-09-09 08:14:09 +10:00
Andrew Tridgell a88e663191 Plane: adjust target altitude slowly in QRTL mode
this fixes a sudden throttle drop when starting the descent in QRTL mode
thanks to Marco for finding this issue
2017-09-07 07:22:13 +10:00
Andrew Tridgell 6eaad59115 Plane: improve vectored tailsitter takeoff
this gives extra pitch input when taking off a vectored tailsitter,
allowing the motors to point straight up for easy takeoff

thanks to Leonard for the idea!
2017-05-07 09:10:44 +10:00
Andrew Tridgell b1f1ace736 Plane: support vectored yaw tiltrotors
this adds support for tiltrotors which control yaw by vectoring the
forward motors. This avoids the need for the rear motor on a
tilt-tricopter to have a tilt servo
2017-04-24 16:54:41 +10:00
Andrew Tridgell 2d9c3e3d93 Plane: added EKF yaw reset handling to quadplane
this follows the implementation from copter. Thanks to Leonard for the
suggestion
2017-04-24 16:52:16 +10:00
Andrew Tridgell 88e02c7b35 Plane: log the throttle mix for quadplane copter control 2017-04-19 09:08:43 +10:00
Andrew Tridgell 642a6acfcb Plane: support thrust vectoring in tailsitters
adds Q_TAILSIT_VHGAIN and Q_TAILSIT_VFGAIN, allowing for thust
vectoring in both fixed wing and hover
2017-04-11 17:34:40 +10:00
Andrew Tridgell 664e41cec6 Plane: bring in demanded climb rate over 1 second
when we engage the Z controller in quadplane we bring in the climb
rate slowly to prevent a sudden change in motor demand
2017-04-09 16:45:19 +10:00
Andrew Tridgell 36d8f730e1 Plane: setup better defaults for tailsitters 2017-04-04 10:15:08 +10:00
Andrew Tridgell 5d06e4238f Plane: make the quadplane motors var_info dynamic
this will allow for more quadplane motors class types
2017-03-25 16:22:10 +11:00
Andrew Tridgell e3a8d477f5 Plane: improve tiltrotor transition strategy
avoid running forward motors at high throttle when transitioning to a
VTOL mode
2017-03-14 14:42:20 +11:00
Andrew Tridgell 3f7e7d456f Plane: in fixed wing mode slave quadplane attitude rate controller
For quadplanes this uses the attitude controller from fixed wing
when using the multicopter controller to assist fixed wing
flight. This prevents a rate mismatch between the two controller
leading to oscillation
2017-03-14 14:42:20 +11:00
Andrew Tridgell 2db8589f49 Plane: smarter Z controller initialisation for quadplanes
this is more generic than the previous one used only for the full
position controller
2017-03-14 14:42:20 +11:00
Andrew Tridgell c061d5615b Plane: added manual input mask for tailsitter prop-hang
This adds new parameters Q_TAILSIT_MASK and Q_TAILSIT_MASKCH. These
parameters allow a user to use the tailsitter capabilities of a 3D
plane to teach themselves to prop-hang.

It works by allowing the user to setup a switch on their transmitter
to enable manual pass-thru of a set of the input channels to outputs
when in tailsitter hover. The user can then use that switch to allow
learning of hover control in a 3D plane one channel (or two channels)
at a time.
2017-02-26 09:20:13 +11:00
Andrew Tridgell 3bb25eb194 Plane: added Q_TAILSIT_INPUT
this allows the user to control tailsitters either in body frame (like
a plane) or in earth frame (like a multicopter). This is useful for
people wanting to learn to fly prop-hang on 3D planes
2017-02-26 09:20:13 +11:00
Andrew Tridgell ea5186340b Plane: added Q_TILT_RATE_UP and Q_TILT_RATE_DN as separate parameters
allow control of tilt rate separately for UP and DOWN

always allow at least 90 degrees/second for switching to MANUAL
2017-02-25 17:53:26 +11:00
Andrew Tridgell e8b11924f8 Plane: split out the tailsitter transition complete code
use both roll and pitch to trigger completion of transition. This
copes with situations where the plane has managed to get itself rolled
over far enough that it can't recover into hover
2017-02-18 17:26:43 +11:00
Andrew Tridgell c787f4c56f Plane: initial support for tailsitter transitions 2017-02-18 17:26:43 +11:00
Andrew Tridgell 83f3cee99e Plane: initial hooks for tailsitter support 2017-02-18 17:26:43 +11:00
Andrew Tridgell 5c820adad4 Plane: fixed tilt transition with binary tilt servo
once the tilt is fully fwd then force transition as done at any
airspeed
2017-01-25 19:01:15 +11:00
Andrew Tridgell 54bca768b8 Plane: added Q_TILT_TYPE for retract servo tiltrotors 2017-01-25 19:01:15 +11:00
Andrew Tridgell 2f100b0804 Plane: removed separate tricopter quadplane build
can all be done with one build now
2017-01-12 17:39:37 +11:00
Randy Mackay c6dec5c3f6 Plane: quad plane uses consolidated multicopter classes 2016-12-31 10:55:23 +09:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Randy Mackay 574976a3b7 Plane: include AP_Proximity in quadplane 2016-10-13 20:21:07 +09:00
Andrew Tridgell 4e017bf5b3 Plane: fixed loiter mode when Q_GUIDED_MODE=1
This fixes the fixed wing behaviour of LOITER mode whne
Q_GUIDED_MODE=1.

Many thanks to the PertUAV team for finding and reporting this bug
2016-10-01 08:37:17 +10:00
Andrew Tridgell 6d09897b19 Plane: fixed VTOL motor termination in AFS 2016-09-27 11:53:45 +10:00
Andrew Tridgell dac7f45326 Plane: fixed use of multicopter mix_max
we need a settable mix_max for some vehicles
2016-09-21 12:23:19 +10:00
Andrew Tridgell 3d0516fd57 Plane: added Q_ASSIST_ANGLE
this automatically provides quadplane assistance if the angular error
is over the given value for 1 second while flying faster than
Q_ASSIST_SPEED
2016-08-30 08:35:18 +10:00
Andrew Tridgell b29b609bcc Plane: added AFS support for quadplanes 2016-08-16 12:56:12 +10:00
Andrew Tridgell 76b6cbbda1 Plane: prevent motor startup on reboot in quadplanes
we need to prevent RC overrides within px4io from running
2016-08-16 12:53:34 +10:00
Andrew Tridgell 63317e9430 Plane: added throttle suppression for quadplanes
this tries to prevent motor start when on ground. Motors instead go
into spin_when_armed state
2016-08-04 09:43:40 -07:00
Andrew Tridgell f65b46385c Plane: added engine cut on land final in quadplane 2016-07-25 15:46:17 +10:00
Randy Mackay 9201a57c83 QuadPlane: include AC_Avoidance, AC_Fence
This is required because of AC_WPNav's use of the new avoidance library to stop at the fence
2016-06-22 11:38:15 +09:00
Randy Mackay b456a38432 QuadPlane: remove throttle_mid
motor's hover throttle is automatically updated
2016-06-18 11:55:49 +09:00
Randy Mackay f2b0f09d6f QuadPlane: remove THR_MIN 2016-06-18 11:55:49 +09:00
Andrew Tridgell b1b73e2d99 Plane: improved quadplane landing detector
look for no vertical position change for 5s as well as low motors
2016-06-16 18:17:56 +10:00
Tom Pittenger 69f29b51d1 Plane: new param Q_VFWD_ALT to disable VFWD motor below this altitude. Also uses rangefinder 2016-06-10 17:48:31 +10:00
Tom Pittenger f83a6ca1ff Plane: fixed variable misspelling 2016-06-02 15:10:51 -07:00
Andrew Tridgell 978a89efa6 Plane: added new ESC calibration method 2016-06-02 18:10:37 +10:00
Andrew Tridgell ba3576f027 Plane: added tuning error reporting for quadplanes 2016-05-28 17:33:30 +10:00
Andrew Tridgell 52ea443d65 Plane: added Q_THR_MIN 2016-05-11 05:55:26 +10:00
Andrew Tridgell 6b358a5618 Plane: added Q_GUIDED_MODE parameter
this allows you to do hybrid VTOL and fixed wing guided mode
2016-05-11 05:55:25 +10:00
Andrew Tridgell 3bd5b42c69 Plane: refactor quadplane land controller as general VTOL position controller 2016-05-11 05:55:25 +10:00
Andrew Tridgell 6fdaaa7d98 Plane: new tilt compensation method 2016-05-11 05:55:25 +10:00
Andrew Tridgell 46bf2b83f5 Plane: use equal thrust in tiltrotors when over Q_TILT_MAX 2016-05-11 05:55:24 +10:00
Andrew Tridgell bbb5f68bb7 Plane: added initial support for tiltrotors and tiltwings 2016-05-11 05:55:23 +10:00
Andrew Tridgell 89a2a92885 Plane: support better build time selection of multicopter frame type
makes it possible to do "make sitl-tri"
2016-05-11 05:55:22 +10:00
Andrew Tridgell db5f50e08e Plane: convert tuning to use AP_Tuning library 2016-05-07 18:34:15 +10:00
Andrew Tridgell 0fd044c1f7 Plane: added Q_RTL_MODE parameter
used to switch to VTOL landing on RTL
2016-04-30 14:34:47 +10:00
Andrew Tridgell 66d3668ac4 Plane: rapid climb in QRTL if below target altitude 2016-04-30 14:34:47 +10:00
Andrew Tridgell 4666b25258 Plane: initial implementation of QRTL for quadplane RTL 2016-04-30 14:34:47 +10:00
Andrew Tridgell 460885c478 Plane: refactored quadplane landing controller
allow use in other than AUTO mode
2016-04-30 14:34:46 +10:00
Andrew Tridgell 19a1edcd2b Plane: lower default velocity controller gains for quadplanes
we're getting too many XY velocity controller oscillations. Better to
start with smaller gains
2016-04-29 10:02:45 +10:00
Andrew Tridgell 6f4d66f346 Plane: support building quadplane with forced motors class 2016-04-28 22:40:45 +10:00
Andrew Tridgell 9c0d984a4e Plane: support forced motor class in quadplane 2016-04-28 22:37:24 +10:00
Andrew Tridgell 0aa1ae048d Plane: fixed is_flying() for VTOL flight
otherwise we may disarm mid-flight!
2016-04-23 21:03:46 +10:00
Andrew Tridgell 76400a9959 Plane: support DO_VTOL_TRANSITION as a mission item 2016-04-23 21:03:46 +10:00
Andrew Tridgell a549225e60 Plane: support Y6 frame class in quadplane 2016-04-22 10:28:16 +10:00
Andrew Tridgell de33779382 Plane: added Q_WVANE_MINROLL
this allows for some roll trim without weathervaning
2016-04-21 21:52:25 +10:00
Andrew Tridgell d013878c17 Plane: improved speed limiting on landing approach in VTOL mode 2016-04-20 18:07:04 +10:00
Andrew Tridgell f34af03891 Plane: added Q_WVANE_GAIN
this controls weathervaning in VTOL modes. Defaults to off
2016-04-20 17:12:59 +10:00
Andrew Tridgell e9e43dc016 Plane: added Q_VFWD_GAIN for forward motor in VTOL modes
this allows for velocity control using the forward motor in VTOL modes
2016-04-20 16:25:19 +10:00
Andrew Tridgell 27fb35253c Plane: added in-flight transmitter tuning 2016-04-16 20:26:43 +10:00
Andrew Tridgell 1fe9582ac3 Plane: back to velocity controller for quadplane landing
now with much smoother attitude control thanks to some help from
Leonard
2016-04-10 22:01:19 +10:00
Andrew Tridgell 5f1ad68bd9 Plane: improved velocity controller for quadplane landing 2016-04-04 09:50:35 +10:00
Andrew Tridgell 5cc4b20c73 Plane: smooth out final descent for landing 2016-04-02 22:45:51 +11:00
Andrew Tridgell ae51e51c6a Plane: use velocity controller for initial quadplane landing 2016-04-02 20:54:01 +11:00
Andrew Tridgell 9cf909607f Plane: setup reasonable quadplane defaults 2016-04-01 16:40:06 +11:00
Randy Mackay 52caed2573 Plane: QTUN df messages angle boost field as float 2016-04-01 11:59:30 +09:00
Randy Mackay 70f81ee338 Plane: remove multicopter PID parameters
These have been moved to the AC_AttitudeControl class
2016-04-01 11:59:30 +09:00
Andrew Tridgell f73c8ab8ed Plane: allow testing of all motors in sequence
this makes for an easier startup test for a quadplane, allowing a
single MAVLink command to test that all motors are working correctly
in the right sequence
2016-04-01 11:09:51 +11:00
Andrew Tridgell 4d7beab8cc Plane: added QTUN logging for quadplane 2016-03-25 12:33:19 +11:00
Andrew Tridgell 0a199945a2 Plane: added copter RATE logging for quadplane 2016-03-25 12:13:59 +11:00
Andrew Tridgell 1fa075e7a8 Plane: change default quadplane gains
lower filter frequency, higher I gain for roll/pitch
2016-03-25 10:16:15 +11:00
Andrew Tridgell 89970e4eaa Plane: support motor_test for quadplanes 2016-03-13 10:05:10 +11:00
Andrew Tridgell f4ccf94dfc Plane: added QLAND mode
for VTOL landing. Use for failsafe as well
2016-03-09 18:20:41 +11:00
Andrew Tridgell f35d05e374 Plane: improved quadplane default gains
0.25 is better for an average quadplane for roll/pitch

0.5 is a bit high for accel-z, 0.3 is better
2016-02-29 21:46:27 +11:00
Andrew Tridgell b84b480086 Plane: added PID tuning for quadplane modes 2016-02-20 20:20:27 +11:00
Andrew Tridgell f8d8616598 Plane: support all types of multicopters in quadplane
adds Q_FRAME_CLASS for class of multicopter frame
2016-02-08 11:00:19 +11:00
Andrew Tridgell 3a9ebe3a8a Plane: added Q_TRAN_PIT_MAX 2016-01-19 11:05:56 +11:00
Andrew Tridgell 7e29761b99 Plane: try to smooth auto VTOL transitions 2016-01-19 11:05:56 +11:00
Andrew Tridgell 52c4715c94 Plane: fixed init bug on low memory for quadplane 2016-01-09 07:38:55 +11:00
Andrew Tridgell 787a6994a4 Plane: added Q_THR_MID parameter 2016-01-09 07:38:55 +11:00
Andrew Tridgell b1177521ef Plane: show throttle level in vtol modes 2016-01-09 07:38:54 +11:00
Andrew Tridgell 70018ee0cb Plane: fixed final descent for VTOL auto landing 2016-01-09 07:38:54 +11:00
Andrew Tridgell f259cf4b3f Plane: added Q_YAW_RATE_MAX parameter 2016-01-09 07:38:54 +11:00
Andrew Tridgell 418464ab8c Plane: added quadplane version of is_flying() 2016-01-09 07:38:53 +11:00
Andrew Tridgell f068a8c913 Plane: added support for VTOL_TAKEOFF and VTOL_LAND commands 2016-01-09 07:38:53 +11:00
Andrew Tridgell 5e784ddb5c Plane: consider flying status for throttle_wait 2016-01-09 07:38:53 +11:00
Andrew Tridgell 7afa2a493d Plane: implement VTOL flight stage 2016-01-09 07:38:53 +11:00
Andrew Tridgell 0d6b353bcb Plane: added quad assistance and auto support for quadplane 2016-01-09 07:38:52 +11:00
Andrew Tridgell 48e1a0641f Plane: added throttle wait to quadplane 2016-01-09 07:38:52 +11:00
Andrew Tridgell 2983576067 Plane: added QLOITER mode
quadplane loiter
2016-01-09 07:38:52 +11:00
Andrew Tridgell 00ca292160 Plane: improved quadplane transition 2016-01-09 07:38:52 +11:00
Andrew Tridgell ca85c332d6 Plane: separate QSTABILIZE and QHOVER modes 2016-01-09 07:38:52 +11:00
Andrew Tridgell 6468fc6d93 Plane: Initial implementation of quadplane
adds "HOVER" mode
2016-01-09 07:38:52 +11:00