docs(autotune): fix fixed-wing autotune docs to match actual behavior#11677
docs(autotune): fix fixed-wing autotune docs to match actual behavior#11677sensei-hacker wants to merge 1 commit into
Conversation
Roll/pitch/yaw rates are described as a fixed ceiling autotune respects; in reality, with the default fw_autotune_rate_adjustment setting, autotune actively rewrites roll_rate/pitch_rate/yaw_rate while flying. The doc also claimed autotune sets P and I gains, which hasn't been true since gain the P/I/D-from-FF formula was removed in 2021. Neither yaw nor the MANUAL-mode no-op were mentioned. Rewrites the pre-flight parameter table and flying instructions to describe what the code actually does: FeedForward is tuned on all three axes, P/I are never touched, rate tuning depends on flight mode and fw_autotune_rate_adjustment, and AUTOTUNE has no effect at all in MANUAL mode.
PR Summary by QodoFix fixed-wing AUTOTUNE docs to match current tuning behavior
AI Description
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. LIMIT rate can rebound
|
| roll_rate | Starting roll rate for your airplane. Unless you set `fw_autotune_rate_adjustment` to `FIXED` (see below), AUTOTUNE will change this value while you fly - it's a starting point, not a ceiling it respects | ||
| pitch_rate | Starting pitch rate for your airplane. Same caveat as `roll_rate` | ||
| yaw_rate | Starting yaw rate for your airplane. Same caveat as `roll_rate` | ||
| fw_autotune_rate_adjustment | Controls whether/how AUTOTUNE changes `roll_rate`/`pitch_rate`/`yaw_rate` while tuning. `AUTO` (default) raises or lowers rates to match what the plane can achieve. `LIMIT` only ever lowers them, never above what you started with. `FIXED` leaves rates untouched - use this if you want AUTOTUNE to tune FeedForward only |
There was a problem hiding this comment.
1. Limit rate can rebound 🐞 Bug ≡ Correctness
The docs say fw_autotune_rate_adjustment=LIMIT "only ever lowers" rates, but the implementation can also increase a previously-lowered rate again (while still capping it at the initial rate). Users may therefore still observe roll_rate/pitch_rate/yaw_rate increases during a LIMIT autotune flight, contradicting the doc.
Agent Prompt
## Issue description
`docs/Autotune - fixedwing.md` currently states that `fw_autotune_rate_adjustment=LIMIT` "only ever lowers" the rates. In the code, rate adjustment can step up or down by 10 dps based on measured capability; in LIMIT mode it is merely *capped* at the starting rate (and can rise back toward that cap).
## Issue Context
This is documentation-only, but it can still mislead users who choose LIMIT expecting a strictly one-way decrease.
## Fix Focus Areas
- docs/Autotune - fixedwing.md[27-27]
Suggested wording example:
- Replace "LIMIT only ever lowers them" with something like "LIMIT will not increase rates above the starting values (but may raise a previously-lowered rate back up to that cap)."
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
The fixed-wing AUTOTUNE documentation no longer matched the current implementation in src/main/flight/pid_autotune.c. A user reported confusion after their rates changed significantly during an AUTOTUNE flight, which they didn't expect based on the docs.
Changes
Corrected the pre-flight parameter table: roll_rate/pitch_rate/yaw_rate are described as fixed limits AUTOTUNE respects, but by default (fw_autotune_rate_adjustment = AUTO) AUTOTUNE actively rewrites them while flying. Documented all three fw_autotune_* settings that control this.
Removed the claim that AUTOTUNE sets P and I gains - that formula (P/I/D derived from FF) was removed from the code in 2021 (9dcf985, "Don't change P, I and D during autotune"). AUTOTUNE only ever tunes FeedForward gain and, conditionally, rate.
Added yaw to the flying instructions - the code tunes yaw identically to roll/pitch (own FF, own rate, own minimum rate floor), but the doc only described roll/pitch maneuvers.
Documented the flight-mode dependency: rate is tuned in ACRO/HORIZON but not ANGLE mode (FF still is), and AUTOTUNE has no effect at all - not even FeedForward - while flying in MANUAL mode (pid.c:881).