Commit Graph

95 Commits

Author SHA1 Message Date
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
Andrew Tridgell
fce01464b1 APM: added ALT_CTRL_ALG parameter
this allows you to select different altitude control algorithms. The
current choices are for the default (automatic based on if airspeed is
available), or to force a non-airspeed algorithm

The idea is to make it possible to use airspeed for some things (like
wind speed, speed scaling) but not for alt control
2012-08-28 20:18:24 +10:00
Andrew Tridgell
d13d117e61 APM: removed reset_I() and instead auto-reset integrator in PID library
this prevents us resetting key integrators on waypoint change, while
still preventing old integrators being used when a PID starts to be
used again
2012-08-28 20:18:23 +10:00
Andrew Tridgell
dcbd0fbd44 APM: cleanup throttle suppression code and don't use airspeed to unsupress
this removes the throttle suppression when any of the conditions are
met once, as otherwise flying slow below 10m could zero the throttle.

It also removes the use of airspeed for disabling throttle
supression. Otherwise a strong gust of wind can cause ArduPlane to
try to takeoff!
2012-08-28 20:18:23 +10:00
Andrew Tridgell
3c7d7ba228 APM: use airspeed estimate for speed scaling if available 2012-08-25 17:49:26 +10:00
Andrew Tridgell
c35530c362 APM: fixed wheeled takeoff with Jons new controllers 2012-08-22 17:34:01 +10:00
Andrew Tridgell
d445482ace APM: added optional use of new APM_Control library
thanks to Jon Challinger for the new controllers!
2012-08-22 12:45:14 +10:00
uncrustify
d5767ef817 uncrustify ArduPlane/Attitude.pde 2012-08-21 19:19:50 -07:00
Andrew Tridgell
c5b77f3909 APM: reset steering PID integrator in reset_I() 2012-08-21 15:01:01 +10:00