Commit Graph

106 Commits

Author SHA1 Message Date
Andrew Tridgell 94edcc4654 ArduPlane: change TRIM_ARSPD_CM to AIRSPEED_CRUISE 2024-01-23 15:00:30 +11:00
Mykhailo Kuznietsov b7c040e8bc ArduPlane: Fix some typos
Fixed some typos found in the code.
2023-10-12 18:30:42 +11: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
Andy Piper 761c7a0161 ArduPlane: fix incorrect float conversion 2023-07-18 11:06:02 +10: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
Henry Wurzburg b4c79c9105 Plane:add FlightOptions helper 2023-04-26 17:35:25 +10:00
Andrew Tridgell 6db842e967 Plane: ensure smoothed airspeed is > 0
prevent possible divide by zero
2022-12-06 09:02:44 +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
khanasif786 1fe6d77eeb Plane: Max altitude for FBWB using Fence altitude 2022-10-19 18:28:52 +11:00
Michael du Breuil f183b21fc5 Plane: Support vtol landing options on NAV_VTOL_LAND
This allows the same mission to contain both circular and straight
landing items, and doesn't require on the fly tweaking
2022-08-15 17:05:00 -07:00
Iampete1 ee778dbd3a Plane: Quadplane: add option_is_set helper for Q_OPTIONS 2022-08-09 13:21:00 +10:00
Iampete1 b017fc2196 ArduPlane: allow FBWB alt control option in LOITER
Co-authored-by: Henry Wurzburg <hwurzburg@yahoo.com>
2022-05-22 12:09:43 +10:00
Henry Wurzburg 14700063d2 ArduPlane: convert floating point divides into multiplys 2022-03-18 15:26:44 +11:00
Peter Barker 13fa1e30ad ArduPlane: rename and make enum RC_Channel::ControlType
Type:: is too generic; get_type should probably be get_control_type
2022-02-27 09:55:01 +11:00
Joshua Henderson c1abcfb7c4 Plane: move Airspeed to AP_Vehicle 2022-01-19 18:21:32 +11:00
Samuel Tabor c44fed34d4 AP_Soaring: Override airspeed and flap angle. 2021-12-16 07:12:24 +11:00
Iampete1 b9d240460b Plane: remove SpdHgt and use TECS direct 2021-11-13 08:05:39 +11:00
Peter Barker 3d34e061fe ArduPlane: add and use HAL_QUADPLANE_ENABLED 2021-09-14 11:23:18 +10:00
Iampete1 e6968395c6 Plane: remove none-functional NAV_CONTROLLER param 2021-09-08 20:32:52 +09:00
Andrew Tridgell a7b809d5d4 Plane: added approach and airbrake options
this defaults VTOL landings to have an approach and airbraking stage,
allowing for more efficient landings. Can be disabled by setting
Q_OPTIONS bit 16
2021-06-05 13:05:30 +10:00
Samuel Tabor 4cc92c6b3e Plane: Constrain target_airspeed_cm by min as well as max airspeed. 2021-04-14 06:43:09 -07:00
Samuel Tabor baf31fd825 Plane: Ensure trim airspeed is applied if in auto with no DO_SPEED command received. 2021-04-14 06:43:09 -07:00
Iampete1 e81dc36ed6 Plane: add option do do a VTOL approach RTL 2021-03-29 11:29:12 +11:00
Hwurzburg d15e01d390 Plane: fix DO_CHANGE_SPEED airspeed to impact only AUTO and GUIDED modes 2021-03-16 10:09:34 +11:00
Peter Barker 6baaf03c8c Plane: move auto_throttle_mode to being a method on each mode 2021-01-10 16:04:30 +11:00
Peter Barker a1ea1306a1 Plane: use pure-virtual method for allows_throttle_nudging
In place of a state variable which could become stale
2021-01-10 16:04:30 +11:00
Andy Piper d16872cca5 Plane: compile out ADSB mode if required 2020-09-24 08:22:16 -07:00
Samuel Tabor 10111f92d5 Plane: Rename SOARING_ENABLED to HAL_SOARING_ENABLED and don't compare to ENABLED. 2020-09-24 07:30:48 +10:00
Samuel Tabor ad48394b50 Plane: Add comment to clarify additional 10m in soaring altitude target. 2020-09-10 22:21:41 +10:00
Samuel Tabor 59f4c7a3c0 Plane: Allow auto climb back to SOAR_ALT_CUTOFF when soaring in FBWB or CRUISE modes. 2020-09-10 22:21:41 +10:00
Andrew Tridgell bf0f359445 Plane: fixed LOITER_TO_ALT with terrain target
many thanks to Pompecukor for finding this!

Fixes #14951
2020-08-25 10:39:18 +10:00
Samuel Tabor 334fd4afbc Plane: Remove update_navigation() method. 2020-08-20 13:02:06 +10:00
Samuel Tabor 06eea6ed9f Plane: Move navigation functions into flight mode classes. 2020-08-20 13:02:06 +10:00
Michael du Breuil 99ad126986 Plane: Fix redundant call to SpdHgt_Controller->get_land_airspeed() 2020-08-11 09:47:24 +10:00
Buzz 0f5177b291 Plane: Support a set of offboard MAVLink guided controls with rates
+ 3 rounds of fixes
2020-05-20 15:03:21 +10:00
Samuel Tabor b9daae062c AP_Soaring: Use enum class rather than typedef enum for states and hide details of these. 2020-04-08 09:11:54 +10:00
Samuel Tabor 170b599469 Plane: Required changes for conditional soaring compilation (fmuv2). 2020-04-08 09:11:54 +10:00
Samuel Tabor e1f7122566 AP_Soaring: Improve tracking of enabled/disabled status. 2020-04-08 09:11:54 +10:00
Samuel Tabor e7418637ee Plane: In FBWB make target alt track current if soaring is enabled and suppressing throttle. 2020-04-08 09:11:54 +10:00
Peter Hall a2e72de5ae Plane: move to airspeed_estimate with pointer 2020-01-14 22:34:37 -07:00
Pierre Kancir 65b4ba0539 ArduPlane: use past_interval_finish_line and line_path_proportion from Location 2019-04-23 09:20:43 +10:00
Pierre Kancir 3f5999a6ad ArduPlane: move location_update to Location and rename to offset_bearing 2019-04-06 09:10:28 +11:00
Pierre Kancir 58328da5f3 ArduPlane: move get_bearing_cd to Location and rename to get_bearing_to 2019-04-06 09:10:28 +11:00
Tom Pittenger 0270c57530 Plane: massive refactor and creation of Mode class 2019-04-02 16:28:52 +11:00
Dr.-Ing. Amilcar do Carmo Lucas f430fd14f6 Plane: replace location_offset() and get_distance() function calls with Location object member function calls
This allows removing duplicated code
2019-02-28 11:44:09 +11:00
Peter Barker acafb0f3c1 Plane: adjust for location flags being moved out of union 2019-01-16 11:45:29 +11:00
Michael du Breuil a78bce32c0 Plane: Allow users to force target airspeed in cruise or fbwb 2018-12-18 22:36:55 -08:00
Michael du Breuil 05484c3987 Plane: Support a different landing airspeed for fw quadplane landings 2018-12-18 10:11:22 +11:00
Michael du Breuil 42e67d5849 Plane: Whitespace fixes 2018-12-18 10:11:22 +11:00