Skip to content

Commit 43f7fad

Browse files
swissembeddedclaude
andcommitted
fw(nav): drop the forced-poshold RC-alt-adjust guard - measured a bit-identical no-op
The guard blocked adjustFixedWingAltitudeFromRCInput during forced poshold, defending against a real structural feedback (the nav loiter writes rcCommand, this function reads rcCommand[PITCH] as a pilot climb command). A/B on the floor-orbit flight was bit-identical with and without it: the observed orbit climb was the missing-pitot centrifugal compensation, fixed separately. Unproven defensive code is not worth its upstream diff; the feedback class stays documented here. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 56e9f24 commit 43f7fad

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

src/main/navigation/navigation_fixedwing.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,6 @@ void resetFixedWingAltitudeController(void)
111111

112112
bool adjustFixedWingAltitudeFromRCInput(void)
113113
{
114-
#if defined(USE_FW_AEROBATICS) || defined(USE_SOARING)
115-
// Forced poshold (floor orbit / thermal loiter): NO RC altitude adjust.
116-
// The nav loiter WRITES rcCommand to fly the circle, and this adjust
117-
// reads rcCommand[PITCH] - the loiter's own pitch output fed back as a
118-
// "pilot climb command" is a positive feedback loop that rode the
119-
// floor orbit away from its anchor with the sticks untouched
120-
// (measured: smooth pitch 8->23 deg, ~+4 m/s, 60 m past the anchor
121-
// Z while nav actual == estimator Z). The anchor Z is the contract;
122-
// pilot pitch is a TAKEOVER there, not a climb knob - same raw-stick
123-
// lesson as the floor's release detection.
124-
if (posControl.flags.forcedPosholdActive) {
125-
return false;
126-
}
127-
#endif
128114
int16_t rcAdjustment = applyDeadbandRescaled(rcCommand[PITCH], rcControlsConfig()->alt_hold_deadband, -500, 500);
129115

130116
if (rcAdjustment) {

0 commit comments

Comments
 (0)