Commit Graph

156 Commits

Author SHA1 Message Date
Andrew Tridgell c9ebd6a175 Plane: improved RC failsafe handling
this forces all primary control inputs to the trim value on loss of RC
input, and reduces the timeout for loss of RC input to 1 second from 2
2014-03-08 16:20:54 +11:00
Andrew Tridgell 2cf98e476c Plane: added support for a separate steering channel
good for ground steering on larger aircraft
2014-03-05 12:57:50 +11:00
Andrew Tridgell 0d6064034a Plane: use percent_input() for flaps 2014-03-05 09:17:50 +11:00
Andrew Tridgell ae9201342a Plane: allow FLAP_IN_CHANNEL to control k_flap and k_flap_auto too 2014-02-06 14:09:49 +11:00
Andrew Tridgell c3b7e76c28 Plane: added flaperon support
this adds FLAPERON_OUTPUT and FLAP_IN_CHANNEL to allow both manual
and auto flap control for both normal flaps and flaperons
2014-02-06 12:38:59 +11:00
Andrew Tridgell c16e3a035f Plane: fixed disarmed throttle in HIL 2014-01-20 19:41:19 +11:00
Michael Day b0a0316dd6 Plane: Now using AP_Arming library. 2013-12-11 17:29:23 +11:00
Andrew Tridgell 17c9cedac1 Plane: send out HIL servo updates as soon as we can
this improves the servo responsiveness of HIL a lot
2013-11-23 18:50:57 +11:00
Andrew Tridgell 56f574684d Plane: fixed throttle failsafe with reversed throttle 2013-11-17 15:32:53 +11:00
Andrew Tridgell 231b5ab793 Plane: prevent too large combined pitch/roll angles
this reduces the roll limit by cos(pitch) and pitch minimum by
cos(roll). This prevents unreasonable attitudes in all stabilised
modes

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-11-04 21:21:42 +11:00
Andrew Tridgell 035ac3800a Plane: use G_Dt for acro angle integration
also cleanup some other uses of performance timing
2013-10-12 13:30:27 +11:00
Andrew Tridgell 536fbb4a30 Plane: if pilot gives aileron input then disable ground steering
otherwise it would be very tricky to do a low pass!
2013-10-05 07:46:27 +10:00
Andrew Tridgell d32e58db84 Plane: split out the channel stick mixing
makes code a bit clearer
2013-10-05 07:46:27 +10:00
Andrew Tridgell 3be939eb03 Plane: give manual steering when still
useful for servo testing
2013-10-05 07:46:27 +10:00
Andrew Tridgell d275f50539 Plane: added GROUND_STEER_ALT and GROUND_STEER_DPS
this uses the new AP_SteerController steering controller developed for
the rover code to allow for ground steering of planes
2013-10-05 07:46:27 +10:00
Andrew Tridgell 081510d37a Plane: added ACRO_LOCKING parameter
this enables/disables the attitude locking in acro mode, allowing acro
to be a pure rate controller
2013-10-05 07:45:12 +10:00
Kevin Hester 996eda0080 Plane: Report MAV_STATE_ACTIVE if flying, MAV_STATE_STANDBY otherwise
(There are also various error states MAV_STATE_CRITICAL that are unchanged
by this check in).

The is_flying() check is similar to the code in suppress_throttle, but
I wanted to make it very optimistic on thinking we are flying - which is
not what you want for set_throttle...

(AC has similar MAV_STATE_ACTIVE vs MAV_STATE_STANDBY behavior now)
2013-09-21 21:57:07 +10:00
Andrew Tridgell e455ee0a94 Plane: fixed throttle suppression for AUTO_FBW_STEER=1 2013-09-20 17:20:06 +10:00
Andrew Tridgell 1869cd52e1 Plane: fixed AUTO_FBW_STEER stick mixing 2013-09-20 17:20:06 +10:00
Andrew Tridgell 328e900364 Plane: changed TKOFF_THR_DELAY default to 2
this makes it safer for hand launch with pusher props
2013-09-19 21:42:21 +10:00
Paul Riseborough 43cf0736a3 Plane: Auto Takeoff Check updates
Adds additional launch angle protection and protection against early
exit from auto causing unexpected motor start on re-entry
2013-09-19 21:37:31 +10:00
Andrew Tridgell 43ffe91546 Plane: added FS_ACTION of 2 for glide
this allows people without specified settings in their receiver for
failsafe to choose FBWA zero throttle glide on throttle failsafe. That
can be a better choice when flying at a R/C club field
2013-09-15 15:05:39 +10:00
Andrew Tridgell cc6acac1dd Plane: added AUTO_FBW_STEER option
this is an unusual option that gives FBWA flight control in AUTO
mode. It is being added to support use of APM in an aerial robotics
competition where students need to pilot the plane, but they still
need waypoint triggering of payloads
2013-09-13 14:38:09 +10:00
Andrew Tridgell f6688582a6 Plane: added FENCE_ACTION=3 behaviour
this makes it safer to enable the geofence as a receiver failsafe
mode. It retains manual throttle control, so if it triggers on the
ground due to the receiver losing signal from the transmitter then the
throttle can be kept low, preventing an unexpected takeoff.
2013-09-08 07:31:10 +10:00
Andrew Tridgell accfd46633 Plane: update for new APM_Control API 2013-08-14 14:57:41 +10:00
Andrew Tridgell 890b77447a Plane: allow integrator in stabilize mode when no stick input
fixes issue #472
2013-08-02 21:55:34 +10:00
Andrew Tridgell 233b033e8c Plane: removed old speed/altitude control algorithms
Use TECS only. This makes the code a lot simpler and easier to
properly document
2013-07-22 13:28:11 +10:00
Andrew Tridgell 29c854e676 Plane: remove unused function 2013-07-22 12:50:02 +10:00
Andrew Tridgell 51b9cf3e76 Plane: move failsafe variables into a structure
this makes the logic a bit easier to follow
2013-07-22 12:50:00 +10:00
Andrew Tridgell 608345415b Plane: pass aircraft parameters to attitude controllers
also cope with rename of airspeed min/max variables

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-07-18 14:53:37 +10:00
Andrew Tridgell dbd47b2a30 Plane: make TECS the default speed/height controller 2013-07-15 11:12:24 +10:00
Andrew Tridgell dc024d425a Plane: re-do roll hanging in ACRO mode
this avoids the euler angle zeros of the previous method by using a
gyro integrator on the roll axis

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-07-13 21:45:58 +10:00
Andrew Tridgell b37f79d307 Plane: update for new APM_Control API 2013-07-13 21:45:58 +10:00
Andrew Tridgell 113bc20f8a Plane: added a new CRUISE flight mode
See
http://diydrones.com/group/apmusergroup/forum/topics/feature-request-hold-heading-mode

this fixes issue #438
2013-07-13 21:45:58 +10:00
Andrew Tridgell cc57bfcf12 Plane: fixed handling of deadzone in ACRO mode
RC_Channel norm_input() does not take account of the dead zone
2013-07-12 17:54:51 +10:00
Andrew Tridgell fc67f51901 Plane: added ACRO_ROLL_RATE and ACRO_PITCH_RATE parameters
default to 180 degrees/second, which seems reasonable
2013-07-11 09:10:41 +10:00
Andrew Tridgell 608007361b Plane: added initial implementation of ACRO mode
rate based control with attitude locking
2013-07-11 09:10:41 +10:00
Andrew Tridgell 3c97fad2ec Plane: changes for GPS field changes 2013-07-10 14:04:22 +10:00
Andrew Tridgell 7aa360b176 Plane: added relative_altitude helper functions
prevents some code duplication
2013-07-10 14:04:22 +10:00
Andrew Tridgell 1355b6d89d Plane: break-up scheduling into smaller pieces
ensure mavlink sends don't push us over a scheduling boundary
2013-07-05 18:05:27 +10:00
Andrew Tridgell d30dd7c3f1 Plane: only run TECS when in an auto-throttle mode
this prevents integrator buildup in user controlled modes
2013-07-05 14:55:22 +10:00
Andrew Tridgell a5bda3ffef Plane: changed to using a "aircraft parameters" structure
this structure can be passed to libraries to give them easy access to
critical user parameters
2013-07-04 16:56:57 +10:00
Paul Riseborough d62636d309 Plane: added new TECS altitude controller
Includes improvements to takeoff/launch detect logic to support hand
launching for X-8 flight
2013-07-04 16:56:57 +10:00
Andrew Tridgell 75ef7c26e1 Plane: update takeoff course when conditions met
This allows for change of heading before the final takeoff conditions
are met

thanks to Greg Fletcher for suggesting this
2013-07-01 17:05:13 +10:00
Andrew Tridgell 570ecea6c6 Plane: added secondary rudder support 2013-06-29 17:31:03 +10:00
Andrew Tridgell 056e0ca40d Plane: APM2 doesn't have channel 9 PWM output 2013-06-24 13:06:54 +10:00
Andrew Tridgell a1f64d606a Plane: fixed remaining places where primary channel ordering was assumed
should now use rcmap for all inputs
2013-06-03 16:23:48 +10:00
Andrew Tridgell fb9bf21522 Plane: allow channel mapping of first 4 channels
this makes it easier to support DSM and SBUS radios
2013-06-03 16:23:48 +10:00
Andrew Tridgell bb3171ab5f Plane: zero attitude integrators on the ground 2013-06-01 22:29:38 +10:00
Andrew Tridgell cd55ed45e2 Plane: removed the old roll/pitch/yaw PID controllers
use the new controllers, with auto parameter conversion
2013-05-31 14:06:56 +10:00