The throttle feedback compared an unfiltered total energy rate setpoint
with an estimate low-passed by FW_T_STE_R_TC. On a setpoint change the
lag between the two showed up as a phantom error that the proportional
and integral paths acted on, pushing the throttle beyond what the
feedforward already demanded. Filter the error instead: setpoint and
estimate then see the same lag and only true tracking errors reach the
feedback, while the feedforward keeps acting on the unfiltered setpoint.
The airspeed-less altitude step test no longer needs to disable the
filter: on the step up the phantom error sped the vehicle up by 3 cm/s,
beyond the test's airspeed tolerance, and now it stays within it.
Assisted-by: Claude Fable 5.1
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Use one altitude and one airspeed step size for all step tests, so the
tests are easier to compare:
- ALT_STEP chosen to not saturate throttle while sinking or climbing
- Altitude step up test added (disabled, see comment)
- AIRSPEED_STEP = 1 m/s
- Only effective change is gliding (previously 2 m/s steps)
- FastDescend drops the altitude setpoint, which does not affect it, and
checks the throttle is exactly at its minimum
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Balduin <balduin@auterion.com>
Stop mixing up previous and current steps:
- _pitch and _throttle hold the last TECS command, which the plant
applies until the next update (drop the _prev naming)
- reorder logging, so each row pairs a state with the command
computed from it:
- find control input
- sim stats, csv output
- advance simulation
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Balduin <balduin@auterion.com>
The test drives TECSControl, not the outer TECS class, so name it after
the class under test like TECSTest.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Balduin <balduin@auterion.com>