Commit Graph

103 Commits

Author SHA1 Message Date
Andrew Tridgell 6251d0510a Plane: obey pitch trim and throttle pitch feed forward in new controllers
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-05-05 21:51:09 +10:00
Andrew Tridgell 11ad9d5a2d Plane: auto-invert pitch control when upside down
this helps to recover when flying inverted, for example when in manual
and hitting the lower altitude geofence
2013-05-05 21:51:09 +10:00
Andrew Tridgell 4e2b88f6e6 Plane: added ATT_CONTROLLER option to select attitude controller
set to 1 for the new APM_Control library
2013-05-05 21:51:09 +10:00
Paul Riseborough 8c5b603848 Plane: use new APM_Control API 2013-05-05 21:51:08 +10:00
Andrew Tridgell 9584aa89d9 Plane: replaced constrain() with constrain_float() 2013-05-02 10:27:10 +10:00
Andrew Tridgell 3d7a4d0e6e Plane: added ELEVON_OUTPUT option
this is like the vtail mixer, but for elevons
2013-04-29 12:13:59 +10:00
Andrew Tridgell 0b8c2da4df Plane: support 12 output channels on PX4 2013-04-25 20:10:53 +10:00
Andrew Tridgell 4f225eff57 Plane: if airspeed enabled, require 5m/s to unsuppress throttle 2013-04-25 20:10:53 +10:00
Andrew Tridgell 8f091e70c8 Plane: move elevon variables into a structure 2013-04-15 14:53:56 +10:00
Andrew Tridgell 11eb0cfce1 Plane: update for new AP_Navigation controller class
this switches ArduPlane over to use the L1 navigation controller, via
a generic nav_controller object pointer.

Note that the nav_controller controls all types of navigation now,
including level flight and heading hold. This provides a cleaner
abstraction than the old method of special case navigation handling

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-04-12 12:48:09 +10:00
Andrew Tridgell e58f49aeaf Plane: copy rudder out in TRAINING mode
we were doing rudder mixing in training mode, which shouldn't be done
2013-04-05 19:38:43 +11:00
Andrew Tridgell bd2b9fbe9d Plane: simplify the VTail mixer to be more like a hardware mixer
this should make it easier to trim the vtail
2013-04-05 15:47:51 +11:00
Andrew Tridgell 406921faf1 Plane: added VTAIL_OUTPUT option
this allows for software vtail mixing
2013-04-05 15:22:11 +11:00
Andrew Tridgell 683a2919d1 Plane: prevent stick mixing when throttle is below failsafe threshold
this fixes issue #40
2013-04-02 10:42:56 +11:00
Andrew Tridgell 2506c216dd Plane: added a second type of stick mixing
this changes STICK_MIXING from a boolean to a tri-state. With
STICK_MIXING=1 it now uses FBW style mixing. With STICK_MIXING=2 it
uses the old style of direct stick mixing.
2013-04-02 08:52:56 +11:00
Andrew Tridgell e390726bdd Plane: prevent overflow on large PID gains
this uses get_pid_4500() to prevent overflow of servo_out on large PID gains
2013-04-01 22:17:04 +11:00
Andrew Tridgell dfb14d760b Plane: added HIL_SERVOS option
this allows for real servo output in HIL
2013-03-30 14:38:43 +11:00
Randy Mackay c2055557f5 Plane: add support for GPS fix type 2D 2013-03-27 11:41:51 +09:00
Andrew Tridgell 1d983b3f2e Plane: fixed X accel triggering of auto 2013-03-22 11:53:45 +11:00
Andrew Tridgell 0a385cc0ff Plane: added TKOFF_THR_MINACC option
this is used for triggering auto takeoff with a hand launched plane
2013-03-09 14:41:04 +11:00
Michael Warren 9697ff5d6d Plane: Added extra parameter to specify at what speed in auto-takeoff throttle should engage
This adds TKOFF_THR_MINSPD in m/s
2013-03-09 14:19:48 +11:00
Andrew Tridgell e93888dee9 Plane: make a throttle_cruise of 0 mean always zero throttle
this can be used for parachute landing missions

Thanks to Chris Miser for the suggestion
2013-03-09 13:48:39 +11:00
Michael b9a5be6c8b Plane: added secondary elevator support 2013-02-05 08:57:58 +11:00
Andrew Tridgell 9058949558 Plane: fixed some warnings 2013-01-16 14:19:25 +11:00
James Bielman 5631f865b2 Update floating point calculations to use floats instead of doubles.
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Andrew Tridgell 4cdb3cd390 Plane: use GRAVITY_MSS 2013-01-02 14:45:08 +11:00
Andrew Tridgell feca411943 Plane: added new TRAINING mode
this mode gives manual control when the roll or pitch is within the
set limits (the same limits as FBW mode), and prevents the pilot from
flying beyond those limits, essentially a "attitude limited manual"
mode
2012-12-20 22:41:58 +11:00
Andrew Tridgell cf18534163 Plane: use new functions 2012-12-20 14:53:22 +11:00
Pat Hickey f8dec9ae4a ArduPlane: fixes to use CONFIG_HAL_BOARD instead of CONFIG_APM_HARDWARE 2012-12-20 14:51:37 +11:00
Pat Hickey 92b0c302f2 ArduPlane: Ported to AP_HAL 2012-12-20 14:51:36 +11:00
Andrew Tridgell f5abc2c25e Plane: switch to an enum for flight modes 2012-12-01 08:08:54 +11:00
Andrew Tridgell 0260559147 Plane: fixed throttle slew limit code
starting at 1000 is a very bad idea - a petrol engine could cut out
2012-11-28 12:13:09 +11:00
Andrew Tridgell 697c386075 Plane: use correct throttle range in slewrate 2012-11-28 11:42:05 +11:00
Andrew Tridgell 92cd631ce5 Plane: added THR_PASS_STAB parameter
this allows direct passthru of throttle in STABILIZE and FBWA, which
is useful for nitro planes wher you have a throttle cut switch that
drops the throttle below normal minimum.
2012-11-26 23:33:05 +11:00
Andrew Tridgell 61f2e18e2e APM: allow ailerons to move fully during servo demo 2012-11-21 13:34:27 +11:00
Andrew Tridgell fcbd3a823b APM: added a new type of auxilary aileron, with rc input
a AileronWithInput assumes you have setup your RC transmitter to give
the right trim and input on the secondary aileron
2012-11-21 13:34:26 +11:00
rmackay9 ef727bbb3c ArduPlane: move to use new INS library instead of IMU library 2012-11-07 19:21:03 +09:00
Andrew Tridgell c7b47a0e47 APM: allow for arbitrary ranges and reversal on 2nd aileron
this ensures you can setup a 2nd aileron with different reversal from
main aileron
2012-11-05 23:37:58 +11:00
Andrew Tridgell 81d507d39e APM: fixed differential spoilers in manual mode
make them follow the elevons
2012-10-31 12:43:53 +11:00
Andrew Tridgell 8c0296b27a APM: fixed additional aileron channels in manual mode 2012-10-31 12:43:53 +11:00
Xichen Shi 8c46fced16 APM: Added functionality to use differential spoilers in elevon mode
spoiler 1 and 2 are connected to 2 auxiliary channels, functions are
set to 16 on left wing and 17 om right wing respectively. Worked in
FBW + mode (auto etc.). No manual mode supported yet (need more
channels in my case).
2012-10-31 12:43:42 +11:00
Andrew Tridgell d5c35fcc8b APM: fixed stick mixing for STABILISE mode
this is embarrassing
2012-09-24 07:14:30 +10:00
Andrew Tridgell 56c354eb4f APM: fixed stick mixing in CIRCLE mode on throttle failsafe
Many thanks to Andke for finding this bug!
2012-09-23 19:27:42 +10:00
Andrew Tridgell 6bae5ecd51 APM: added THR_SUPP_MAN option
this allows for manual throttle control during auto throttle
suppression. This is useful for keeping a petrol engine idling before
takeoff
2012-09-22 20:17:06 +10:00
Andrew Tridgell 12dc2e79cf APM: save 100 bytes of memory
remove flight_mode_strings array
2012-09-18 13:58:49 +10:00
Andrew Tridgell bad73b0686 APM: fixed elevon mixing
this was broken in 2.61
2012-09-13 12:01:40 +10:00
Andrew Tridgell c9a299665c APM: added speed scaling to wheeled steering
this allows for a larger amount of steering control at low speeds
without causing osciallation after takeoff
2012-09-11 13:37:34 +10:00
Andrew Tridgell 49468953a3 APM: updated for new RC_Channel_aux API 2012-09-08 15:14:41 +10:00
Andrew Tridgell dec12c7370 APM: use ahrs.airspeed_estimate() in two more places
this applies the wind constraint
2012-09-08 11:37:11 +10:00
Andrew Tridgell e2b8817a89 APM: added the ability to forcibly crash the plane on OBC failsafe breach
this allows a user to setup the OBC failsafe system to forcibly crash
the plane (surfaces at limits, zero throttle) when the failsafe system
triggers. This is to allow APM to be used in the Outback Challenge. In
the OBC an external failsafe board also does this using the heartbeat
control pin, so this is an extra safety mechanism.

To prevent users accidentially triggering a crash, this code only
activates if FS_TERM_ACTION is set to to the magic value 42.
2012-08-28 20:18:24 +10:00