Commit Graph

376 Commits

Author SHA1 Message Date
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 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
Peter Barker 0cf56ea320 ArduPlane: make and use AP_LANDINGGEAR_ENABLED 2022-12-14 18:30:23 +11:00
Andrew Tridgell 289f76ac9c Plane: added FAST_TASK() for key scheduler tasks
this will be needed with #22298 as that now relies on integrating
position based on loop times
2022-12-06 11:17:04 +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
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 ff5b4f1b13 Plane: unlock cruise/loiter heading while doing a scripted trick
and reset height
2022-10-29 21:22:29 +11:00
Peter Barker 3400d5e4a5 ArduPlane: use fence singleton in afs check 2022-10-25 11:31:14 +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 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
Peter Barker 3f4a472899 ArduPlane: move call to compass cal update up to AP_Vehicle 2022-08-16 10:06:44 +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
Peter Barker b0bee613d4 ArduPlane: add and use AP_ICENGINE_ENABLE 2022-07-22 08:48:16 +10:00
Andrew Tridgell 25e317d6b1 Plane: check G_Dt to catch startup errors
this catches cases where constructors lead to G_Dt being incorrect
2022-07-21 14:21:17 +10:00
Peter Barker cfff881013 Plane: let AHRS update orientation in its own time 2022-06-12 17:32:11 +10:00
Peter Barker 2784f8fa7f Plane: remove persistent guided_WP_loc state
So instead of updating plane.guided_WP_loc and then calling
set_guided_WP(void) to copy that state into plane.next_WP_loc we pass
the new location in the call to set_guided_WP(const Location &loc).

avoidance was the only place which was not entirely over-writing
plane.guided_WP_loc.  However, plane.next_WP_loc was updated to be the
current location when we entered guided mode.  If we update the
horizontal/vertical avoidance now it is relative to the current
location, not the guided wp location, which could be quite important.
2022-03-22 10:14:40 +11:00
Andrew Tridgell 3fe9a55269 Plane: added APIs for lua ship landing 2022-03-10 07:34:20 +11:00
Peter Barker 266d384ca7 ArduPlane: rename AP_AHRS::get_position to get_location 2022-01-25 10:47:22 +11:00
Joshua Henderson c1abcfb7c4 Plane: move Airspeed to AP_Vehicle 2022-01-19 18:21:32 +11:00
Peter Barker 0cf4254290 ArduPlane: move RPM sensor logging into AP_RPM 2022-01-11 11:09:26 +11:00
Iampete1 d473344177 Plane: add video stab log bit and log in ahrs_update 2022-01-05 19:56:03 +11:00
Peter Barker 89e3e27d3d ArduPlane: move INS notch filter logging into INS 2022-01-05 16:34:36 +11:00
Peter Barker 173f36c145 ArduPlane: make vehicles write notch log messages 2022-01-05 16:34:36 +11:00
Peter Barker e55eea961f ArduPlane: create and use AP_OPTICALFLOW_ENABLED 2021-12-29 18:12:03 +11:00
Michel Pastor 685d34d615 Plane: fix bug causing wrong thr max and slew to be used during takeoff
Fix bug introduced in 3d34e061fe which causes flight_stage to be
FLIGHT_NORMAL instead of FLIGHT_TAKEOFF during takeoff stage causing
itself at least the use of THR_MAX and THR_SLEWRATE instead of
respectively TKOFF_THR_MAX and TKOFF_THR_SLEW and perhaps has other
consequences.

Could be really bad if TKOFF_THR_MAX needs to be much higher
than THR_MAX or if TKOFF_THR_SLEW needs to be much lower than
THR_SLEWRATE and cause a crash on takeoff due to low airspeed or torque
roll
2021-11-17 19:37:39 +11:00
Peter Barker 17395f362e ArduPlane: allow specification of Scheduler table priorities 2021-11-17 19:00:04 +11:00
Peter Barker 70562021ac ArduPlane: move from ENABLE_SCRIPTING to AP_SCRIPTING_ENABLED 2021-11-15 20:27:40 +11:00
Peter Barker 203103bae5 ArduPlane: ensure ENABLE_SCRIPTING is always defined 2021-11-15 20:27:40 +11:00
Iampete1 b9d240460b Plane: remove SpdHgt and use TECS direct 2021-11-13 08:05:39 +11:00
Peter Barker 554e7f8d1c ArduPlane: move EFI to AP_Vehicle 2021-11-05 09:22:17 +11:00
Bob Long 84a89b0b94 Plane: fix units in Plane::get_wp_distance_m() 2021-09-21 09:40:00 +10:00
Andrew Tridgell baec0d83f2 Plane: moved accel cal update to vehicle code 2021-09-17 14:07:14 +10:00
Peter Barker 3d34e061fe ArduPlane: add and use HAL_QUADPLANE_ENABLED 2021-09-14 11:23:18 +10:00
Iampete1 b18da48f39 Plane: remove AUTO_FBW_STEER 2021-09-12 22:12:32 -05:00
TunaLobster d31f3eb4c5 Plane: Add TRIM_PITCH_CD FLIGHT_OPTIONS bits for GCS and OSD 2021-08-31 09:32:10 +10:00
Peter Barker bfe9208849 ArduPlane: add and use HAL_BUTTON_ENABLE 2021-08-25 19:03:42 +10:00
Andrew Tridgell 497a7c9819 Plane: fixed EKF fly-forward flag for tailsitters
for tailsitters that are always using the VTOL controllers (forced
QAssist) we need a different way to determine the fly-forward flag
2021-08-17 20:48:36 +10:00
Andrew Tridgell d1d0ab41d6 Plane: added option to log PIDs at full rate
useful for tuning quadplanes
2021-08-10 10:13:36 +10:00
Tom Pittenger 7f9bbc9cfd Plane: fix ADSB stall speed units. Was accidently using meter/s instead of cm/s 2021-08-04 07:08:24 -07:00
Peter Barker 435988a300 Plane: don't reset home on GPS startup on watchdog reset 2021-08-03 10:36:50 +10:00
Hwurzburg 1e4a6c9236 ArduPlane: Correct OSD horizon for VTOL modes and TRIM_PITCH_CD in Fixed Wing 2021-08-03 10:09:28 +10:00
Peter Barker c348f602d9 ArduPlane: use AP::compass().available in place of enabled() 2021-07-30 12:19:42 +10:00
Peter Barker 85e8b362a7 ArduPlane: stop using AHRS as conduit for Compass pointer 2021-07-30 12:19:42 +10:00