Repository navigation
Conversation
The arc controller could bank up to max_angle_inclination_rll to hold its radius in wind. With that limit raised to 85 deg for stick feel, windy coordinated turns and loiters banked far beyond the navigation bank. The ceiling is now nav_fw_bank_angle plus a fixed reserve of 30 % more lateral acceleration, still capped by max_angle_inclination_rll. With the defaults (35 / 45 deg) it drops from 45 to 42.3 deg. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoBank ceiling on nav turn arcs follows nav_fw_bank_angle
AI Description
Merge Risk
|
Code Review by Qodo
1. Pilots misjudge navigation bank ceiling
|
The ceiling is read on every PID loop; its trig only depends on two settings. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
RAM / Flash usage vs. base commit
See RAM/flash optimization guide for techniques to reduce usage. |
|
Test firmware build ready — commit Download firmware for PR #12271 252 targets built. Find your board's
|
|
Re the Qodo cross-repo finding: the two documentation pages are updated in iNavFlight/iNavFlight.github.io#38. |
…raft Entering WP mode more than 30 deg off the bearing to the first waypoint planned a corner arc. The leg starts at the aircraft there, so the circle's turn-in tangency lies behind it and the aircraft starts well outside the circle. The arc law then demanded 80-95 deg of bank and the command ran to the bank ceiling (tester log: 73 deg bank, 60 deg heading overshoot). Such a turn now flies the bounded leg capture, limited to nav_fw_bank_angle. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e arc A regular corner can engage marginally late; it should keep its arc. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- Tolerance is the smaller of 10 m and 0.2 R: on a small radius 10 m behind already drives the arc law into the bank ceiling. - Without WP tracking there is no leg line to capture; leave such a turn to the heading controller, which flies straight at the waypoint. - A reset after a pilot-flown phase also clears the last nav roll command, so a stale bank no longer seeds the arc engage or the handback. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
/review |
|
Code review by qodo was updated up to the latest commit 831b478 |
Two related fixes for fixed wing navigation turns in 10.0. Both came out of tester reports of far too steep bank angles in navigation turns.
1. Extreme bank on the first turn after entering WP mode
Problem
When WP mode is entered while the aircraft points more than 30° away from the first waypoint, the turn coordinator plans a corner arc for that first turn. This was not intended: the rule that triggers it was added for loiter exits.
On entry the leg to the first waypoint starts at the aircraft itself. The planned circle therefore has its turn-in point behind the aircraft, and the aircraft starts well outside the circle. The arc control law reacts to that distance and to the heading error and demands far more bank than the turn needs.
From a tester's blackbox log (
nav_fw_bank_angle = 45,max_angle_inclination_rll = 900, entry at 27 m/s ground speed with tailwind, 103° off the bearing to WP1):A higher entry ground speed makes it worse, because the turn radius and with it the initial distance to the circle grow with speed.
Fix
fwArcPlanCornerTurn()now checks where the turn-in point lies along the current course. If it is well behind the aircraft, no circle is engaged:nav_fw_wp_tracking_accuracy> 0) the turn flies the existing leg capture, which is limited tonav_fw_bank_angle.nav_fw_bank_angleas well."Well behind" means more than 10 m or more than 0.2 turn radii, whichever is smaller. The tolerance keeps the arc for a regular corner that engages slightly late.
A reset after a pilot-flown phase now also clears the last navigation roll command. Before, the bank left over from an earlier navigation phase could seed the first command after entering WP mode.
Regular waypoint corners engage with the turn-in point ahead and are not affected. In the same log the 12 regular corners that engage an arc have the turn-in point 19 to 43 m ahead.
The same check also applies to the other cases that plan a corner arc with the turn-in point behind: loiter exits, and waypoints that are reached without turn anticipation. They now fly the bounded capture as well.
2. Bank ceiling on turn arcs and loiter follows nav_fw_bank_angle
Problem
On turn arcs and the loiter circle the navigation may bank beyond
nav_fw_bank_angleto hold its radius in wind. The hard ceiling for that wasmax_angle_inclination_rll.Some pilots raise
max_angle_inclination_rllto 85° or 90° for stick feel in ANGLE/HORIZON. In windy conditions the aircraft then banks far too steeply in navigation turns.Change
The ceiling now follows the navigation bank angle with a fixed reserve of 30 % more lateral acceleration, and is still capped by
max_angle_inclination_rll:nav_fw_bank_angleThis applies to waypoint turn arcs (including the landing approach) and the established loiter circle. Navigation without an active arc is unchanged; it was already limited to
nav_fw_bank_angle.The ceiling is cached and only recomputed when one of the two settings changes.
This is meant as a simple fixed rule for 10.0. A better scheme can follow in 10.1.
Behaviour changes
nav_fw_bank_angle. They fly the leg capture with waypoint tracking enabled and the plain heading controller without it.max_angle_inclination_rlllose bank reserve on arcs. In strong wind the turn widens instead of steepening.No new setting, no parameter group change. The
nav_fw_bank_angledescription anddocs/Settings.mdare updated.The user documentation follows in iNavFlight/iNavFlight.github.io#38.
Testing
maintenance-10.x: MATEKF722SE +192 B flash, +8 B RAM. MATEKF405 +192 B flash, RAM unchanged.🤖 Generated with Claude Code