Commit Graph

569 Commits

Author SHA1 Message Date
Henry Wurzburg e9414d69ff ArduPlane: add failsafe protections to Mode Takeoff 2023-08-09 17:33:58 +10:00
Iampete1 045cde5fcf Plane: output rudder and steering directly removing steering_control struct 2023-08-05 08:41:05 +10:00
Andrew Tridgell 2e2c7b50ad Plane: cope with home altitude change while navigating
this fixes a bug where a change of home altitude would cause a sudden
height demand change. This copes with 3 situations:

 - flying with AMSL alt demand. Changing home altitude makes for no change
 - flying with AGL alt demand. Changing home altitude requires update of next_WP_loc
 - flying with home relative alt demand. Changing home altitude changes demand at end of current navigation leg
2023-08-05 08:31:02 +10:00
Tom Pittenger 606ef1b269 Plane: is_landing/is_taking_off not to req scripting 2023-07-03 22:44:00 -07:00
Iampete1 61682f6551 Plane: implement FLTMODE_GCSBLOCK bitmask 2023-06-28 12:56:25 +01:00
Henry Wurzburg 3f7f7cd3a1 Plane:remove duplication in setting servos in MANUAL 2023-06-27 11:04:53 +10:00
Tom Pittenger 4eeb1f18d3 Plane: fixup is_landing and is_taking_off members 2023-06-26 06:54:56 -07:00
Zach Flathers 6177cbbfe2 Plane: Add is_landing/is_taking_off scripting support 2023-06-26 06:54:56 -07:00
Paul Riseborough c92f71842b ArduPlane: Enable ground speed undershoot correction without GPS
The code had a bug where if GPS fix was lost, the demanded airspeed would be set to the measured or estimated airspeed causing unpredictable variations in the demanded airspeed.
This patch prevents the minimum ground speed protection speed up from running if the ground speed undershoot cannot be calculated.
This patch extends the range of conditions over which the minimum ground speed functionality can be used by enabling the ground speed undershoot to be calculated when the navigation system is able to estimate velocity.
2023-06-15 08:59:02 +10:00
Paul Riseborough 52743787b2 Plane: Fix bug that can cause early exit from loiter to alt and time wp's
The check for the aircraft being lined up for a tangent exit has an early breakout condition if the next waypoint is too close to the loiter circle which can prevent the required ground course to waypoint ever being achieved. This check was using the WP_LOITER_RAD parameter value, not the actual radius being used which can be set differently by the mission plan. If a large value for WP_LOITER_RAD was set and being over-written by the mission plan with a smaller value compatible with the distance to the next waypoint, the aircraft would still exit early.
2023-05-18 02:35:47 -07:00
Iampete1 6111e9d9db Plane: move Stabilize functions into mode 2023-05-02 09:29:40 +10:00
Henry Wurzburg b4c79c9105 Plane:add FlightOptions helper 2023-04-26 17:35:25 +10:00
Henry Wurzburg 1415418d6e Plane:Takeoff on rudder arm only after return to neutral 2023-04-25 09:28:45 +10:00
Peter Barker 57d3ebf123 ArduPlane: make Plane use more of RC_Channel library for mode switching 2023-04-18 09:19:20 +10:00
Peter Barker 43c6bb3864 ArduPlane: AP_Arming ensures mission items present when in auto mode
Co-authored-by: Henry Wurzburg <hwurzburg@yahoo.com>
2023-04-14 07:49:54 +10:00
Peter Barker 98e2782851 Plane: correct compilation when AP_Rally disabled 2023-04-10 16:37:42 -07:00
Tom Pittenger 3ac55f97b1 Plane generalize Aux Switch VTOL abort for any plane abort landings 2023-03-15 13:31:43 -07:00
Iampete1 50eaa1cc54 Plane: move acro stabilization into mode acro 2023-02-21 11:27:24 +11:00
Iampete1 6bb0096b9d Plane: move training stabilize function to training mode 2023-02-21 11:27:24 +11:00
Andrew Tridgell 312d37306e Plane: ensure home is up to date on arming
remove any discrepancy which has crept in over the last few seconds

this also ensures that relative_altitude is updated, and copes with
the EKF refusing the resetHeightDatum call
2023-02-19 10:45:42 +11:00
Andrew Tridgell 99f997161a Plane: holdoff auto takeoff till rudder neutral
when arming with rudder we need to hold off the takeoff until the user
has released the rudder stick or we can yaw badly during the takeoff
2023-02-09 07:02:32 +11:00
Andrew Tridgell 2989e2deba Plane: added support for NAV_PACKAGE_PLACE mission item
this works in conjunction with a lua script to allow for a wide
variety of package place options
2023-02-09 07:02:12 +11:00
Peter Barker 648a13d3f7 ArduPlane: add and use AP_ADVANCEDFAILSAFE_ENABLED 2023-02-08 19:00:13 +11:00
Andrew Tridgell 7735614634 Plane: implement set_rudder_offset() 2023-02-08 16:25:39 +11:00
Iampete1 d928e8b002 Plane: stop passing speed_scaler all over the place 2023-02-07 10:17:09 +11:00
Peter Barker f0e17957f4 ArduPlane: avoid using struct Location
clang reports this could be a problem when compiling under some EABIs.  Remove it from most places as it is just noise, replace with class where we want to avoid including Location.h
2023-02-04 22:51:54 +11:00
Henry Wurzburg 10b69e1c1f Plane:expand yaw autotune to other modes 2023-01-31 10:02:16 +11:00
Iampete1 76a10d9b26 Plane: relative_ground_altitude allow passing bool for terrain use 2023-01-25 19:34:53 +11:00
Peter Barker 9edac79db8 ArduPlane: use relay singleton in Parachute 2023-01-03 10:19:54 +11:00
Peter Barker 0cf56ea320 ArduPlane: make and use AP_LANDINGGEAR_ENABLED 2022-12-14 18:30:23 +11:00
Peter Barker de4dda2d17 ArduPlane: change namespace of MultiCopter and FixedWing params
this stops the libraries knowing anything about AP_Vehicle
2022-11-09 19:04:37 +11:00
Henry Wurzburg a84f6b6dee Plane: added AUTOTUNE_AXES function to normal tune
Co-authored-by: Peter Hall
2022-11-08 10:54:36 +11:00
Andrew Tridgell 41fbbd92bc Plane: zero error on release of sticks
this locks the attitude at exactly the stick release position on each
axis

thanks to Adrian Nagy for feedback
2022-11-02 07:55:37 +11:00
Andrew Tridgell 499fe79221 Plane: implement quaternion based ACRO mode
when ACRO_LOCKING=2 this implements a quaternion based ACRO
controller, which allows for accurate rolls and knife edge
2022-11-01 15:00:26 +11:00
Andrew Tridgell 500ac9b99c Plane: cleanup abort of NAV_SCRIPT
use the same enable flag for tricks and auto NAV_SCRIPT_TIME and
ensure we disable if the script stops controlling
2022-10-29 21:22:29 +11:00
Andrew Tridgell 90459ed6f4 Plane: two more arguments to NAV_SCRIPT_TIME 2022-10-23 18:11:15 +11:00
khanasif786 1fe6d77eeb Plane: Max altitude for FBWB using Fence altitude 2022-10-19 18:28:52 +11:00
Andrew Tridgell 1c043bde9a Plane: log TECS target alt
log the target alt we pass into TECS to help debug a CRUISE height
issue
2022-10-18 06:49:46 +11:00
Peter Barker 9e0894c93a ArduPlane: add AP_GRIPPER_ENABLED 2022-10-04 10:58:34 +11:00
yaapu e958c313a1 ArduPlane: fixed roll and pitch for OSD VTOL view 2022-09-27 10:04:10 +10:00
Peter Barker dabf78c61f ArduPlane: add and use AP_CAMERA_ENABLED 2022-09-21 11:58:38 +10:00
Peter Barker e596f7ce83 Plane: add and use AP_RPM_ENABLED 2022-09-20 09:28:27 +10:00
Peter Barker 81c138e0a4 Plane: remove logging of CMDI
This is a duplicate of the data logged into "MAVC"
2022-09-14 17:44:50 +10:00
Peter Barker 0d19d7646f ArduPlane: rename OpticalFlow class to AP_OpticalFlow
Brings us in-line with other classes in ArduPilot.

Removes ambiguity with AP_HAL::OpticalFlow which can cause compilation errors as we start to make code more portable across targets
2022-08-18 14:24:01 +10:00
Iampete1 2b0492e6aa Plane: disalow mode change during fence recovery if option is set 2022-08-17 17:21:30 +10:00
Joshua Henderson a9da91bc8d Plane: add TECS Logbitmask to TECS constructor 2022-08-09 09:44:50 +10:00
Henry Wurzburg fcf29539de Plane: fix attitude/AOA logging and rates 2022-08-02 10:52:52 +10:00
Iampete1 a592f76282 ArduPlane: change AC_FENCE to AP_FENCE_ENABLED 2022-07-27 19:04:56 +10:00
Iampete1 2b8958f931 Plane: Fence moved to vehicle 2022-07-27 19:04:56 +10:00
Iampete1 dd2221338b Plane: fence: do not re-trigger if mode change for expected reason 2022-07-19 09:44:36 +10:00