Commit Graph

93 Commits

Author SHA1 Message Date
Andrew Tridgell
83cac93e85 Plane: allow for any orientation of rangefinder for landing
this is principally for tailsitters where rangefinders would be
orientation with RNGFND1_ORIENT=12 (PITCH_180), but also allows for
custom orientations which will be useful if the rangefinder is tilted
forward
2024-09-14 08:39:51 +10:00
George Zogopoulos
773c91cec1 ArduPlane: Added minimum throttle during TAKEOFF mode
This is a rework so that servos.cpp is responsible for setting the
throttle limits under more circumstances and always notifies TECS when
it does so.

Additionally, the TAKEOFF mode has been improved with a new parameters
TKOFF_MODE and TKOFF_THR_MIN that extend the throttle behaviour.
2024-07-29 15:50:32 +10:00
Ep Pravitra
fe2e75b2a0 Plane: option to immediately climb in AUTO mode (not doing glide slope)
add comment in Parameters.cpp

Update ArduPlane/altitude.cpp

Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>

clarification in FLIGHT_OPTIONS description

change the comment

param comment change

Update ArduPlane/Parameters.cpp

Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
2024-07-25 09:49:07 +10:00
Andrew Tridgell
d4f9843e55 Plane: support MAV_CMD_SET_HAGL
allow for external height above ground estimate
2024-07-17 08:03:18 +10:00
Peter Barker
c14c2d67d4 ArduPlane: make AP_RANGEFINDER_ENABLED remove more code 2024-07-02 09:17:26 +10:00
Jonathan Challinger
9e08a98515 Plane: fix rangefinder correction when terrain follow is off 2024-05-21 11:57:36 +10:00
Andrew Tridgell
a3d622b37d Plans: rename ALT_CRUISE_MIN to CRUISE_ALT_FLOOR 2024-01-23 15:00:30 +11:00
Andrew Tridgell
8151647e04 ArduPlane: convert ALT_HOLD_RTL and ALT_HOLD_FBWCM 2024-01-23 15:00:30 +11:00
Andrew Tridgell
c980e0488e Plane: fixed terrain RTL with rally points
this fixes a bug where if the terrain database cache does not have the
tile for the location of a rally point then RTL to the rally point
with TERRAIN_FOLLOW=1 will not track terrain

The underlying issue is that Location::loc.change_alt_frame() will
return false if the location is not in the terrain memory cache. We
can't just extrapolate as the rally point could be in a totally
different terrain area to the current location. So instead we set it
as terrain_following_pending and fix it as soon as the terrain cache
is filled.

fixes https://github.com/ArduPilot/ardupilot/issues/25157
2023-10-14 10:46:00 +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
Iampete1
76a10d9b26 Plane: relative_ground_altitude allow passing bool for terrain use 2023-01-25 19:34:53 +11:00
Iampete1
4a21af22cb Plane: move mode update_target_altitude to correct files 2022-12-27 10:30:14 +11:00
Iampete1
f28d7a3574 Plane: move adjust_altitude_target functianlity to per mode functions 2022-12-20 10:37:06 +11:00
Iampete1
ab43dadb57 Plane: altitude: add plane. prefix to Plane::adjust_altitude_target to minimise diff 2022-12-20 10:37:06 +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
Andrew Tridgell
72087335f7 Plane: removed terrain home correction 2022-03-10 07:34:20 +11:00
Samuel Tabor
a715472353 Plane: Specify starting location to set_offset_altitude_location 2021-12-27 11:27:52 +11:00
Iampete1
b9d240460b Plane: remove SpdHgt and use TECS direct 2021-11-13 08:05:39 +11:00
Sebastian Quilter
013de11916 ArduPlane: make rangefinder ranges m rather than cm 2021-10-21 21:28:53 +11:00
Iampete1
0549e08c5c Plane: add mehtod to check terrain by mode 2021-09-28 09:31:13 +10:00
Peter Barker
3d34e061fe ArduPlane: add and use HAL_QUADPLANE_ENABLED 2021-09-14 11:23:18 +10:00
Samuel Tabor
65a38b26a4 ArduPlane: altitude: rangefinder correction should be relative to the altitude source being used for navigation. This avoid applying it twice when there is an existing correction saved. 2021-08-19 17:59:33 +10:00
Andrew Tridgell
3bb840f794 Plane: implement slow descent in QRTL approach
this approaches in QRTL at ALT_HOLD_RTL alt, then descends to
Q_RTL_ALT close to the destination
2021-06-05 13:05:30 +10:00
Iampete1
fd2909d53f Plane: change location refence frame correctly 2021-05-02 18:51:27 +10:00
Iampete1
60d26723ae Plane: make TERRAIN_FOLLOW at AP_int32 bitmask, per mode option 2021-03-24 10:15:18 +11:00
Patrick José Pereira
cdc7f891a9 ArduPlane: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Andrew Tridgell
e5d580412e Plane: fixed usage of rangefinder in landing with RNGFND_LANDING=0
this fixes two places where rangefinder can affect landing when
RNGFND_LANDING=0
2020-11-03 10:08:00 +11: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
Henry Wurzburg
4115603f13 ArduPlane: add terrain follow disable switch for CRUISE/FBWB 2020-07-08 13:39:42 +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
ed7e359f4d Plane: Make target altitude track current altitude when gliding. 2020-04-08 09:11:54 +10:00
Peter Barker
6cd4dfba2c Plane: use enum-class for RangeFinder Status 2019-11-09 08:01:53 +11:00
Andrew Tridgell
5c43b18672 Plane: fixed height_above_ground() for case when rangefinder is below min
this prevents a rangefinder that goes below min distance from causing
the calculations that depend on height above ground to fail
2019-09-17 09:36:26 +10:00
Andrew Tridgell
6572700baa Plane: fixed an issue with landing on rising ground
when landing on rising ground we don't want to use the terrain look
fwd correction for the flare calculation as otherwise we will flare
too early (and thus too high)
2019-09-16 12:52:00 +10:00
Andrew Tridgell
1b775c96f5 Plane: added rangefinder correction by terrain data
allows for landing approach with terrain changes
2019-08-06 09:36:02 +10:00
Pierre Kancir
65b4ba0539 ArduPlane: use past_interval_finish_line and line_path_proportion from Location 2019-04-23 09:20:43 +10:00
Tom Pittenger
0270c57530 Plane: massive refactor and creation of Mode class 2019-04-02 16:28:52 +11:00
Andrew Tridgell
2b6210d594 Plane: use WP height for height above ground in vtol landing
this allows for landings above or below the takeoff height without
requiring the use of terrain data. It allows both the use of vfwd
motor for holding against wind, and the correct height for land final
descent rate
2019-03-18 14:47:27 +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
Peter Barker
7fd859da65 Plane: move home state into AP_AHRS 2018-03-19 10:32:37 +09:00
Michael du Breuil
1a3ca43e86 Plane: Don't check FS_SHORT_TIMEOUT if it's disabled
Also renames the check_minimum_altitude() to reflect that it's only used
for FBWB.
2017-11-24 09:58:01 -08:00
Andrew Tridgell
af893ddde7 Plane: implement Q_OPTIONS
this allows for NAV_TAKEOFF to be treated as NAV_VTOL_TAKEOFF in
quadplanes, and for level flight to be maintained during quadplane
transitions
2017-10-30 16:30:10 +11:00