Skip to content

Docs and logging improvements for SITL analysis#11

Closed
mcroomp wants to merge 3 commits into
mainfrom
logging-docs-only
Closed

Docs and logging improvements for SITL analysis#11
mcroomp wants to merge 3 commits into
mainfrom
logging-docs-only

Conversation

@mcroomp

@mcroomp mcroomp commented Jul 17, 2026

Copy link
Copy Markdown
Owner

This PR is the logging/docs-only split from arduloop-anti-windup-fidelity-fix.

Included:

  • SITL IC-start timeline documentation
  • agent guidance updates
  • analysis/logging helper improvements and telemetry schema updates
  • README and analysis-doc refinements

Excluded from this branch:

  • flight-control behavior changes
  • physics/runtime behavior changes
  • stack harness lifecycle changes
  • config changes that alter simulation behavior

mcroomp added 3 commits July 17, 2026 12:30
- arduloop's rate-PID anti-windup 'saturated' gating was architecturally
  present but never actually populated by any caller (always False),
  silently disabling anti-windup across all axes in simtests.
- HeliRateController now self-computes per-axis saturation each tick,
  mirroring AP_MotorsHeli_Single::move_actuators: combined roll/pitch
  cyclic magnitude vs new HeliParams.CYC_MAX_cd (from H_CYC_MAX param,
  default 2500 centi-degrees), plus yaw output-limit saturation. Stored
  as self._prev_saturated and fed into the NEXT tick's update_all(limit=...)
  calls, replicating AP's one-cycle-delayed anti-windup feedback.
- Removed the now-dead external 'saturated' parameter from
  HeliRateController.update() and GuidedAttitudeController.update()
  (no caller ever supplied it; clean cutover per repo convention).
- Fixed a bug in AC_PID debug recording (d.SRate referenced a
  nonexistent self._output_slew_rate; now uses
  self._slew_limiter.get_slew_rate()).
- Added simulation/analysis/arduloop_pid_replay.py: replays real SITL
  PID_TUNING desired/achieved samples through arduloop's own AC_PID to
  isolate controller-math divergence from physics/EKF drift. Confirmed
  P/D/FF terms already matched real AP almost exactly; I-term diverged
  (pitch especially) due to the anti-windup gap fixed here.
- Extended telemetry schema (telemetry_columns.py, telemetry_csv.py,
  mock_ardupilot.py, mediator.py) and compare_pumping_sitl_simtest.py
  with PDmod/SRate columns end-to-end to support this diagnosis.

Validated: full unit suite (467 passed), targeted arduloop/guided/heli/pid
tests (55 passed). Re-ran SITL test_lua_flight_steady_sitl after the fix:
still fails on max_tension (1202N vs 1000N limit), confirming this fix
does not touch the real firmware's tension-spike behavior (that remains
a separate, open issue) -- as expected since arduloop is simtest-only.
@mcroomp mcroomp closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant