Commit Graph

4350 Commits

Author SHA1 Message Date
TunaLobster df0a75a0bb Plane: Change throttle_override to pass in current throttle value 2022-05-26 11:30:41 -07:00
TunaLobster 9e26556408 AP_ICEngine: Add redline governor and RPM filter
Adds a top end governor to protect the engine from exceeding design limits. Similar to idle governor.
Adds a LPF at 0.5 Hz for RPM.
2022-05-26 11:30:41 -07:00
Andrew Tridgell 14a3e8b20c Plane: release notes for 4.2.1 2022-05-23 17:37:31 +10:00
Andrew Tridgell fa26b69298 Plane: fixed false positive in landing detector
this fixes a case where we can get false positive on the landing
detector for quadplanes.

The issue happens if we cross the LAND_DESCEND to LAND_FINAL threshold
while pilot repositioning is active, with stale information in
landing_detect.lower_limit_start_ms as we don't run should_relax() in
LAND_DESCEND
2022-05-23 13:05:17 +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 56db91d0c3 Plane: 32 servo conversion 2022-05-22 12:07:37 +10:00
Henry Wurzburg a3336f3d4f Plane: Add P/D only tune sets for quadplanes 2022-05-21 09:10:31 +10:00
Andrew Tridgell 5664f75ced Plane: update release notes for 4.2.1beta1 2022-05-19 17:11:20 +10:00
Andrew Tridgell 53a7866ba3 Plane: cope with QGC retrying AUTO mode
QGC tries several times to enter AUTO even when it is refused. We need
to keep refusing
2022-05-19 06:11:57 +10:00
Andrew Tridgell 86c2404654 Plane: increased safety of guided -> auto quadplane takeoff
when we arm in guided mode then enter a special guided_wait_takeoff
state. We keep motors suppressed until one of the following happens

  1) disarm
  2) guided takeoff command
  3) change to AUTO with a takeoff waypoint as first nav waypoint
  4) change to another mode

while in this state we don't go to throttle unlimited, and will refuse
a change to AUTO mode if the first waypoint is not a takeoff. If we
try to switch to RTL then we will instead use QLAND

This state is needed to cope with the takeoff sequence used by QGC on
common controllers such as the MX16, which do this on a "takeoff"
swipe:

  - changes mode to GUIDED
  - arms
  - changes mode to AUTO
2022-05-18 06:43:16 +10:00
Andrew Tridgell a22e181acb Plane: account for sprung throttle in VTOL throttle suppression
when RC_OPTIONS has been changed to not check throttle for arming then
treat this like a sprung throttle for quadplane throttle suppression
in auto-throttle modes, and only unsuppress when throttle goes above
trim+dz
2022-05-15 21:17:50 +10:00
Andrew Tridgell 20f641de99 Plane: refuse arming if we are in a landing sequence
this helps when the aircraft has gone into a landing sequence due to a
failsafe before it is armed. Arming while in the landing sequence is
very unlikely to be what the user wants
2022-05-15 21:17:50 +10:00
Peter Barker d5fdc2027f ArduPlane: support *10 multipler when storing/retrieving radius in NAV_LOITER_TURNS 2022-05-11 17:40:35 +10:00
Peter Barker 6152b8618f ArduPlane: remove handling of MAVLINK_MSG_ID_SET_HOME_POSITION
We decided to remove this after 4.2 was out in favour of
MAV_CMD_DO_SET_HOME which has been available since 2015.

The gcs-maintainers list was notified in Feburary.
2022-05-10 09:46:22 +10:00
Andrew Tridgell 86d2ccf0e7 Plane: update gyro fft throttle
allows for updating or learned FFT freq
2022-05-10 08:08:56 +10:00
Andrew Tridgell 8aba79b8a0 Plane: release notes for 4.2.0 2022-05-04 10:33:50 +10:00
Peter Barker e2e3e228b3 ArduPlane: tidy includes 2022-05-03 09:14:58 +10:00
Mirko Denecke d6bca7405a ArduPlane: fix auxiliary typo 2022-05-02 10:55:08 +10:00
Andrew Tridgell 12d829e740 Plane: release notes for plane 4.2.0beta6 2022-04-28 18:19:40 +10:00
Peter Barker 91e784f28d Plane: do not use guided waypoint for loiter location
Currently this waypoint is set 10,000m away by the avoidance behaviour

Instead, immediately enter loiter mode
2022-04-21 06:59:39 +10:00
Henry Wurzburg 0d01ac389c Plane: add Q_OPTION for RTL always on RC failsafe for ship landing 2022-04-19 19:58:46 +10:00
Andrew Tridgell 15084cb6f3 Plane: moved harmonic notch update code to AP_Vehicle 2022-04-19 09:39:03 +10:00
Andrew Tridgell 7aafd5cf98 Plane: param conversion for INS_NOTCH to INS_HNTC2 2022-04-19 09:39:03 +10:00
Andrew Tridgell d57abb1230 Plane: support harmonic notch on 2nd RPM sensor 2022-04-19 09:39:03 +10:00
Andrew Tridgell c1d841dd93 Plane: support two full harmonic notch filters 2022-04-19 09:39:03 +10:00
Sanket Sharma 594160daf3 Plane: Updated highest airspeed limit when armed 2022-04-18 14:54:57 +10:00
Andrew Tridgell 627f62d23b Plane: param conversion for INS_NOTCH to INS_HNTC2 2022-04-16 08:14:06 +10:00
Peter Barker fd4a00a654 ArduPlane: stop libraries including AP_Logger.h in .h files
AP_Logger.h is a nexus of includes; while this is being improved over
time, there's no reason for the library headers to include AP_Logger.h
as the logger itself is access by singleton and the structures are in
LogStructure.h

This necessitated moving The PID_Info structure out of AP_Logger's
namespace.  This cleans up a pretty nasty bit - that structure is
definitely not simply used for logging, but also used to pass pid
information around to controllers!

There are a lot of patches in here because AP_Logger.h, acting as a
nexus, was providing transitive header file inclusion in many (some
unlikely!) places.
2022-04-08 19:18:38 +10:00
Andrew Tridgell 3bdcff263d Plane: release notes for 4.2.0beta5 2022-04-07 10:07:25 +10:00
Andrew Tridgell 8e37c93e7d Plane: fixed rudder control when ARMING_RUDDER != 2
when rudder disarm is disabled we should allow full yaw control
regardless of throttle level. We should also only disable left yaw
when throttle is at zero, as right yaw does not indicate pilot may be
trying to disarm
2022-04-03 09:12:03 +10:00
Peter Barker 2c42c056d8 Plane: correct EnableLandResponsition->EnableLandReposition 2022-03-31 20:30:55 +11:00
Mark Whitehorn 910406e82d Plane: handle AIRBRAKE RC option 2022-03-29 22:51:10 +01:00
Andrew Tridgell c32a2d542c Plane: added release notes for 4.2.0beta4 2022-03-28 20:55:43 +11:00
Andrew Tridgell 48881eeb55 Plane: fixed yaw on the ground when rudder disarming in AUTO
when a quadplane touches down in an auto throttle mode the pilot may
use rudder to disarm. The check for rudder disarm was only active in
modes without auto-throttle. This expands it to all modes if the
throttle has hit the lower limit
2022-03-24 07:44:40 +11:00
Andrew Tridgell 680162cef0 Plane: added a value for RTL_AUTOLAND to disable arming check
set RTL_AUTOLAND=3 to get go-around but not RTL DO_LAND_START usage
2022-03-23 20:22:58 +11:00
Andrew Tridgell 27cbe5dbbb Plane: prevent rapid RTL/AUTO switching on fence breach
don't switch back to RTL if already in a DO_LAND_START sequence
2022-03-23 20:21:59 +11:00
Andrew Tridgell d82a306cc2 Plane: when shutting down motors force outputs to minimum
this fixes issue #20354 where a long spool time can lead to motors
running without control for an extended period of time.
2022-03-23 18:20:42 +11: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
Peter Barker 1f5165349e Plane: correct compilation when airspeed disabled 2022-03-20 21:47:05 +11:00
Andrew Tridgell 2c22cbc50e Plane: update release notes for 4.2.0beta3 2022-03-18 21:13:54 +11:00
Henry Wurzburg 14700063d2 ArduPlane: convert floating point divides into multiplys 2022-03-18 15:26:44 +11:00
Andrew Tridgell 6ebefbdb16 Plane: added airspeed based pitch limit check
prevent using too much pitch when at low airspeed, which can lead to
severe instability in SLT quadplanes
2022-03-18 13:36:16 +11:00
Andrew Tridgell eabdaae1e7 Plane: use set_lean_angle_max_cd()
allows for a wider range of Q_TRANS_DECEL while landing on the desired
landing point
2022-03-18 13:36:16 +11:00
Andrew Tridgell cc6fc2b130 Plane: improvements to POSITION1 controller
this improves 4 things in the POSITION1 controller based on logs from
4.2.0beta2. The changes are designed to increase the tolerance to
an incorrect value for Q_TRANS_DECEL, reducing landing overshoot

1) we fix the initialisation of the acceleration. The
   init_xy_controller() function assumes zero accel, so we need to
   call set_accel_desired_xy_cmss() just after that init to get the
   correct accel. Thanks to Leonard for this fix

2) if we decel more than expected due to too low Q_TRANS_DECEL we
   need to reduce the target speed, rather than putting the nose down

3) lower the default Q_P_JERK_XY to a value more appropriate for most
   quadplanes (Leonard suggested a value of 2)

4) fixed the pitch envelope from Q_BACKTRANS_MS to start after the
   airbrake phase is complete
2022-03-18 13:36:16 +11:00
Andrew Tridgell 3772029450 Plane: fixed pitch envelope after AIRBRAKE
we need to setup last_fw_mode_ms and last_fw_nav_pitch_cd when we
enter POSITION1 mode so that the expanding envelope pitch limit from
Q_BACKTRANS_MS is applied correctly
2022-03-18 13:36:16 +11:00
Andrew Tridgell 8b16b5ca94 Plane: adjust throttle mix for auto landing
use mix-max during landing approach and initial descent, use min in
land final. As discussed with Leonard
2022-03-18 13:35:46 +11:00
Peter Barker d93449ac28 ArduPlane: split AP_HAL_SITL and HAL_SIM_ENABLED 2022-03-17 14:39:55 +11:00
Tim Tuxworth 21ec47f184 Plane: Display Fence Breach message in GCS
Send a "Geofence breach" message to the Ground Control Station. Without this when the fence is breached and if anything happens as a result, such as RTL, it will happen silently.
2022-03-16 18:04:19 +11:00
Andrew Tridgell a1856c5c22 Plane: added an arming check for Q_ASSIST_SPEED
Q_ASSIST should really be enabled for all non-tailsitter
quadplanes. This arming check will help users remember to configure it
2022-03-16 09:29:14 +11:00
Andrew Tridgell 82937ca778 Plane: check that RTL_AUTOLAND is set if using DO_LAND_START 2022-03-14 09:52:41 +11:00