Commit Graph

285 Commits

Author SHA1 Message Date
Peter Barker
f6a185a3c3 Plane: factor vehicle's mavlink send_heartbeat 2018-04-03 13:05:19 +01:00
Randy Mackay
548a7f8fcf Plane: add minor comment to quadplane 2018-03-16 13:50:57 +09:00
Leonard Hall
ee745d2cd2 Plane: quad plane uses rate-control control during transitions 2018-03-16 13:50:57 +09:00
Leonard Hall
a16d4ddad7 Plane: quadplane uses poscontrol instead of loiter 2018-03-16 13:50:57 +09:00
Randy Mackay
c5d838125b Plane: quadplane logs PSC message 2018-03-16 13:50:57 +09:00
Randy Mackay
09cad7c59d Plane: quadplane integrates attitude control inertial_frame_reset 2018-03-16 13:50:57 +09:00
Randy Mackay
03c162432e Plane: quadplane provides dt to AC_WPNav::set_pilot_desired_acceleration 2018-03-16 13:50:57 +09: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
Leonard Hall
aa47b19dea Plane: remove quadplane calls to multicopter poscontrol's freeze_ff_xy 2018-03-16 13:50:57 +09:00
Randy Mackay
ddcd08d6b6 Plane: PSC_ACCZ param name shortened 2018-01-31 08:48:21 +09:00
Michael du Breuil
aec7521da4 Plane: Fix truncation of a time interval
Truncating the a millisecond time delta to uint16_t causes it to wrap
every 65 seconds, which could momentarily reset the desired climb rate
2018-01-25 14:30:49 +11:00
Randy Mackay
d579e086cf Plane: quadplane param index comment for moved PIDs 2018-01-24 21:14:53 +09:00
Andrew Tridgell
20b05e4228 Plane: added conversion code for PID layout change
this copes with the move of multicopter PIDs inside the position
controller
2018-01-24 18:23:59 +11:00
Randy Mackay
7b1157e2d8 Plane: remove setting accel_z PID controller's dt
This is handled within pos-controller's set_dt function
2018-01-23 12:00:43 +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
luweikxy
25224cd261 Plane: remove dead code from do_vtol_land 2017-12-14 20:52:18 +09:00
Andrew Tridgell
f7a735b990 Plane: fixed transitions for tailsitters after auto-takeoff
need to use angle wait
2017-11-19 16:06:02 +11:00
Andrew Tridgell
957c1f6d23 Plane: extend QLOITER transition pitch limit
use twice transition time for pitch envelope to reduce QLOITER
transition harshness
2017-11-05 21:35:32 +11: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
e27c54a312 Plane: smooth out fwd tailsitter transition
use Q_TRANSITION_MS and the transition angle to pitch forward more
slowly
2017-11-05 17:25:00 +11:00
Michael du Breuil
d52f5155f0 Plane: Rename rc failsafe state members 2017-11-02 16:46:08 -07:00
nick2204
7d91755bd1 Plane: update Q_OPTIONS docs
Made q_options description a little clearer
2017-11-01 09:38:42 +11:00
Andrew Tridgell
1085069851 Plane: use WP_LOITER_RAD if RTL_RADIUS is 0 for QRTL 2017-10-30 16:52:19 +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
02f8d888c3 Plane: relax controllers when disarmed
this prevents any remaining integrator from a previous flight stage from
affecting flight across a disarm
2017-10-30 16:30:10 +11:00
Andrew Tridgell
92ee05b925 Plane: fixed motor channel handling 2017-10-25 11:39:11 +11:00
Andrew Tridgell
6526ff504d Plane: fix for changes to AP_Motors API 2017-10-22 15:52:50 +11:00
Andrew Tridgell
e008559b6e Plane: support LOITER_TO_ALT in quadplanes 2017-10-21 18:50:01 +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
0aed5a9a57 Plane: prevent controller windup on ground
when on the ground in an auto-throttle mode lik FBWB or CRUISE, we may
have the throttle suppressed. In that case we should not run the
multicopter controller on quadplanes, or it may build up control which
will then apply on takeoff. This is particularly severe for aircraft
that are not level on the ground, such as taildragger quadplanes

Fixes https://discuss.ardupilot.org/t/quadplane-flips-on-takeoff/22095

many thanks to Sriram for reporting
2017-10-20 15:41:04 +11:00
Andrew Tridgell
1a95dcbdd7 Plane: update docs for Q_YAW_RATE_MAX 2017-10-20 15:40:58 +11:00
Andrew Tridgell
f5b4d8d99c Plane: added frame type 11 for FlreFlyY6 2017-10-06 11:36:34 +11:00
Ferruccio Vicari
85ab3edc5f Plane: Smoother transition to QLOITER and QLAND
Use estimated stopping position
2017-09-21 07:57:38 +10:00
mirkix
7c6be7c421 Plane: change format of reset alt target message 2017-09-20 20:28:53 +10:00
mirkix
b682f3f6d9 Plane: fix parameter units 2017-09-19 11:34:26 +10:00
Andrew Tridgell
35c1a732a6 Plane: allow takeoff in guided then fw loiter
this allows for quadplane takeoff in GUIDED with Q_GUIDED_MODE=0. The
takeoff will be VTOL, but subsequent guided points will be fixed wing
2017-09-18 10:21:53 +10:00
Tom Pittenger
85b7f1bbb4 Plane: guided takeoff success should return true 2017-09-13 14:46:22 -07:00
Andrew Tridgell
600a5c44d2 Plane: allow changing of target altitude in GUIDED 2017-09-09 08:14:09 +10: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
b6809655d4 Plane: smooth the transition to LAND_FINAL in quadplanes
this makes for a much smoother change to LAND_FINAL, without a jerk as
it changes vertical speed
2017-09-09 08:14:09 +10:00
Andrew Tridgell
8411ac5c57 Plane: fixed a problem with descent rate in landings for quadplanes
use xy controller instead of xyz controller, which prevents calling z
controller twice, which led to poor height control
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
909f109b3f Plane: don't start a transition while disarmed
this can caused flooding of the GCS console while disarmed in FBWA
mode
2017-07-30 12:39:36 -07:00
Peter Barker
c058fba5ac Plane: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Peter Barker
5a8f01c19c Plane: use send_text method on the GCS singleton 2017-07-09 17:17:29 -04:00
Pierre Kancir
5d0972f589 Arduplane: fix implicit cast to double warning in quadplane 2017-06-14 12:40:47 +01:00
Andrew Tridgell
1455c23230 Plane: fixed docs for tailsitter 2017-06-10 18:41:34 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas
2f5f8eb323 Plane: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +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
7ea0f65590 Plane: removed incorrect comment 2017-04-24 16:56:23 +10:00
Andrew Tridgell
06b0742481 Plane: fixed jump in qhover on takeoff
Z controller PID is from -1 to 1

thanks to Leonard for spotting this
2017-04-24 16:55:41 +10:00
Andrew Tridgell
aab20317a0 Plane: fixed position control in QLAND_FINAL 2017-04-24 16:55:41 +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
d5ec7b0aad Plane: fixed a sign error in the angle assist code
thanks to Leonard for finding this!
2017-04-18 22:09:22 +10:00
Andrew Tridgell
b15b11e32d Plane: always stabilize with tailsitters 2017-04-14 12:48:08 +10:00
Andrew Tridgell
46d910539c Plane: fixed a warning 2017-04-11 17:34:40 +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
0cf571d338 Plane: moved Z altitude target reset
reset alt target whenever we have not run Z controller for 2s
2017-04-09 16:45:19 +10:00
Mark Whitehorn
7679b758b0 Plane: add parameter RUDD_DT_GAIN for dual motor tailsitter
controls rudder to differential thrust mixing in FW mode
2017-04-06 08:29:44 +10:00
Andrew Tridgell
acaef22416 Plane: improve transition from QSTABILIZE to FBWA or QHOVER 2017-04-05 20:00:29 +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
af97a3974b Plane: initialise target height correctly on quadplane transition
this fixes a bug where a plane in QSTABILIZE would drop suddenly if
switched to FBWA when the target altitude had not been initialised
2017-03-22 21:34:40 +11:00
Andrew Tridgell
bb158a437e Plane: handle bad Q_FRAME_CLASS
default to quad with a warning. This prevents users getting stuck
without being able to set Q_ENABLE=1

thanks to Leonard for noticing
2017-03-18 22:10: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
4ff5bf5af5 Plane: zero integrators and set throttle mix
this zeros fixed wing integrators during TRANSITION_AIRSPEED_WAIT and
uses a zero throttle mix during TRANSITION_TIMER. This should allow
the fixed wing controller more time to adapt to forward flight
2017-02-26 09:20:51 +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
d5a3f844f1 Plane: changes for AC_WPNav 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
0fc04b0158 Plane: setup plane frame type parameter flags 2017-02-14 19:50:01 +11:00
Andrew Tridgell
c294519925 Plane: lower default Q_M_SPOOL_TIME to 0.25 2017-02-14 09:23:17 +09:00
priseborough
013eb254a2 Plane: use standard unit descriptor for milliseconds 2017-01-27 16:57:42 +09:00
Andrew Tridgell
07cedd8a66 Plane: prevent stability shutdown in transition
this prevents the vertical motors from shutting down while
transitioning if the desired throttle was too low at the start of the
transition
2017-01-25 19:01:15 +11:00
Andrew Tridgell
0d4405106f Plane: removed forcing of trim for motors in quadplane
this caused problems with tricopter tail servos
2017-01-25 19:01:15 +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
586f8a9ca8 Plane: fixes for tilt quadplane after rebase 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
Andrew Tridgell
b83f50be0f Plane: use new SRV_Channels API 2017-01-12 17:39:37 +11:00
Andrew Tridgell
1c4bf77cf6 Plane: added custom conversion of Q_FRAME_CLASS parameter 2016-12-31 10:56:01 +09:00
Randy Mackay
934ef55338 Plane: quadplane instantiates motor matrix outside of case
Thanks to khancyr for noticing this
2016-12-31 10:55:23 +09:00
Randy Mackay
c6dec5c3f6 Plane: quad plane uses consolidated multicopter classes 2016-12-31 10:55:23 +09:00
Pierre Kancir
da1f784e78 Plane : quadplane change to float to avoid the loss of a fractional part 2016-12-05 12:39:31 -08:00
Tom Pittenger
f556f705e6 Plane: move various g params to aparms 2016-11-25 19:07:30 -08:00
expntly
0d1e50b50b Plane: fix typo, check wp_nav is initialized 2016-10-27 14:39:50 +11: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
Andrew Tridgell
0445b51143 Plane: fixed throttle slew rate in manual for quadplanes 2016-10-12 09:55:37 +11:00
murata
b3eecb87ac Plane: To define the same wording. 2016-10-06 10:03:23 -07:00
Andrew Tridgell
cb61840ad2 Plane: tell TECS to use synthetic airspeed during transition 2016-10-05 11:52:52 +11:00