Files
airship-autopilot/files
Sterister f21bcb7b11 Pitch-compensated lift feedforward: hold altitude under forward thrust
Reported symptom: the ship sinks as soon as it moves forward. Confirmed in
code -- altitude.lua had no pitch input at all. Pitch only fed the front/aft
differential; nothing compensated the common-mode lift. So when the propeller
pushes the nose up, the lift vector tilts with the hull and its vertical
component drops ~cos(pitch), and only the slow altitude integrator (~5-10 s)
fought it -> a multi-block sag every time you accelerate.

- altitude.lua takes measured pitch and boosts common-mode lift by 1/cos(pitch),
  bounded by cfg.pitchLiftMax (default 1.5 = full comp to ~48 deg, 1.0 = off).
  Sign-agnostic (cos is even); feedforward adds no loop gain so it can't
  destabilize -- altitude feedback still owns steady-state.
- FLY HUD shows the live boost (liftFF xN.NN); u_sum in fly.log reflects it.

Physically motivated but unverified against the mod's exact lift model: if lift
were world-vertical the ship would climb slightly on accel instead (feedback
corrects it) -- still better than sinking. Tune pitchLiftMax from flight.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 18:13:40 +02:00
..