Commit Graph

70 Commits

Author SHA1 Message Date
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
rmackay9 6d489947cf ArduPlane: replaced many "int" with "int16_t", "long" with "int32_t" 2012-08-18 18:26:13 +09:00
Andrew Tridgell 6300fa7399 math: more abs() fixes
abs() is 16 bit
2012-08-16 15:17:42 +10:00
Andrew Tridgell 1252ddfe0c APM: rename RDRSTEER to WHEELSTEER
thanks to Jon for the suggestion
2012-08-15 16:28:59 +10:00
Andrew Tridgell e26e8b3b67 APM: added RDRSTEER_ PID for steering on ground
this allows for rolling takeoff with steering, and use of rudder in
landing
2012-08-15 12:39:35 +10:00
Andrew Tridgell e2c8ec2c9e APM: removed THROTTLE_REVERSE option
Better to use RC3_REV
2012-08-09 10:04:44 +10:00
Andrew Tridgell e133900c68 APM: Added STICK_MIXING option
this replaces the compile time option. Disabling during long distance
flights when the transmitter may be out of range is useful.
2012-08-09 08:53:29 +10:00
Andrew Tridgell 2114acddf1 APM: fixed default flap speed
the default of 255 translates to -1 as a AP_Int8, so use zero to mean
no flaps
2012-08-08 13:04:21 +10:00
Andrew Tridgell 5bfd1200d6 APM: change variables to use _cm, _cd and _ms suffix for units
this makes it less likely that we mix up units
2012-08-08 12:12:30 +10:00
Amilcar Lucas 9c1ac2d9e6 More work on ch9, 10 and 11 2012-08-04 19:44:41 +02:00
Andrew Tridgell 6bcfe913f7 APM: added a SCALING_SPEED parameter
this allows users to adjust the base speed used for scaling roll/pitch
PIDs. This can be used to make PIDs work for both airspeed and
non-airspeed control
2012-07-26 11:30:23 +10:00
Andrew Tridgell 7e697e4abd APM: switch back to old nav_roll calculation
the old nav_roll will be used for the 2.50 release to prevent the need
for re-tuning. For the release after that we will use the new
calculation
2012-07-26 10:03:36 +10:00
Andrew Tridgell d6e370886f APM: rename airspeed_cruise to airspeed_cruise_cm to make the units clearer
it is in cm/s, not m/s
2012-07-19 11:50:41 +10:00
Andrew Tridgell 1cf5057c61 APM: Use g.airspeed_cruise for turn rate calculation if the airspeed sensor is disabled.
This gives our best approximation for auto flight
2012-07-19 11:50:41 +10:00
Jonathan Challinger c7da63509b APM: Removed unused YAW_DAMPENER code.
YAW_DAMPENER was defined as zero
2012-07-19 11:50:21 +10:00
Jonathan Challinger d9d055ef78 APM: Removed incorrect nav_gain_scaler from nav_roll calculation.
nav_gain_scaler was originally added due to a perceived improvement in
loiter performance, but is incorrect for navigation. Turn rate is a
function of airspeed and bank angle, ground speed has no effect on
that.
2012-07-19 11:50:06 +10:00
Andrew Tridgell de3c9ce56d Airspeed: change APM to use new AP_Airspeed library
the next step is AHRS dead reckoning
2012-07-16 11:21:50 +10:00
Andrew Tridgell f6d7d1bc59 APM: changed PID library to do automatic deltat calculation
this fixes a problem with the HDNG2RLL PID, which was using the wrong
time base and prevents similar bugs from happening in the future
2012-07-06 19:59:18 +10:00
Pat Hickey 1c00d1ffe3 ArduPlane: Fix effect of ELEVON_REVERSE
* Previously, the ELEVON_REVERSE parameter was equivelant in function to the
  ELEVON_CH1_REVERSE parameter. These parameter values are found in
  g.reverse_elevons and g.reverse_ch1_elevon, and used to map to the radio_out
  channels in ArduPlane/Attitude.pde
* It seems the author's intent was for ELEVON_REVERSE to change the sign for
  the combination of pitch & roll into ch1 & ch2, as there are already
  parameters which change just the sign of ch1 and just the sign of ch2.
* Discovered this bug because I happened to build an elevon airframe which was
  not possible to setup with the existing ELEVON_ and RCn_REV parameters.
* This will break existing elevon setups if the user used ELEVON_REVERSE
  instead of ELEVON_CH1_REVERSE, since they were previously interchangable.
2012-05-27 22:15:08 -07:00
Andrew Tridgell b3aa704c49 AirSpeed: added parameter ARSPD_USE
setting ARSPD_ENABLE to 1 and ARSPD_USE to 0 allows the airspeed
sensor to be initialised and logged without it being used for flight
control. This is very useful when initially testing an airspeed sensor
in a new plane. It also makes it possible to enable/disable the use of
the airspeed sensor during a flight at any time.
2012-05-22 20:02:23 +10:00
Andrew Tridgell 8afd196907 APM: adapt ArduPlane for AHRS framework 2012-03-19 17:29:02 +11:00
Phil 9242c157ee APM: Fix rudder in elevon mode.
elevon planes can have rudders too
2012-02-16 14:43:24 +11:00
Doug Weibel a5df59eba3 Remove old debug print 2011-12-24 14:26:35 -07:00
Doug Weibel 7879efb8ae Fix scaling on "turn coordination" yaw PID so that P gain values fall in "usual" range 0.1 to 10. 2011-12-24 14:26:35 -07:00
Andrew Tridgell 3b148c87d5 geofence: main geo-fence code
this implements the primary logic of geo-fencing
2011-12-16 20:11:51 +11:00
Andrew Tridgell 2bd18e937c throttle: only use throttle slew in auto throttle modes
we don't want STABILISE and FBWA to have throttle change limits
2011-12-12 15:14:55 +11:00