Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StickTiltXY: Fix too high maximum tilt problem #22769

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Feb 16, 2024

Solved Problem

Reported by @alistair-blueflite when MPC_MAN_TILT_MAX is set to close to or 90° the accelerations go insane and I even had it that the stick input reverses direction at 90°.

Fixes #22714

Solution

  • Consider 1° - 70° the recommended useful range. This corresponds to a 3:1 thrust-to-weight ratio.
  • If the pilot sets MPC_MAN_TILT_MAX higher, guard against the calculations leading to a hardly steerable drone.
    Note: In stabilized mode MPC_MAN_TILT_MAX can be up to 180° and the controller will track it.
  • Add unit tests.

Changelog Entry

Fix: Limit maximum tilt in Altitude mode such that close to 90° configuration doesn't cause issues

Alternatives

Having a multicopter tilt to 90° and expect it to hold altitude doesn't make sense, see also this comment: #22714 (comment)

Test coverage

  • I did simulation tests to reproduce the issue and to verify it's solved.
  • I added a unit test to make sure the case stays predictable.

Context

What do you think @alistair-blueflite?

@alistair-blueflite
Copy link

I think that looks good. If the pilot wanted more tilt in stabilized he can do that, while altitude doesn't do anything crazy.

@MaEtUgR MaEtUgR merged commit 51fe435 into main Feb 20, 2024
90 of 92 checks passed
@MaEtUgR MaEtUgR deleted the maetugr/altitude-max-tilt-fix branch February 20, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
3 participants