tools+docs: the pitch stick sign was inverted - the pilot fires now

Measured, not argued: command a 45-degree-off-the-nose error and watch whether it
shrinks, both axes, both sides, two pulse widths, with the opposite sign as a
control. Yaw's sign is correct (45 -> 11.3/32.7 at 0.6 s, 41.6/33.8 at 1.2 s).
Pitch's is inverted - the pilot's own sign GREW the error every time
(48.3/55.6/70.7/91.7) and the opposite shrank it every time (30.7/41.5/15.7/9.6).

A method artefact is recorded because it gave the opposite answer first: a 3 s
full-deflection pulse overshoots a 45-degree error so far that BOTH signs look
wrong (45 -> 164 and 45 -> 178). A long pulse cannot answer a sign question.

Verified against the game rather than by inspection. Before: fire=1 in 0 of 13521
samples, |aim yaw| pinned at 90.0, target 36-43 km away. After: 43 of 1732, aim
down to 2.3 degrees, range median 6.3 km, and the HUD's own ammunition counters
moving - NOSE BM 06000 -> 05723, MAIN MPM 00300 -> 00298.

Also fixed a leftover of the same FIFO era: pilot.py called pad.f.write("tap A
90") for the target-select double tap, which raised AttributeError once Pad
stopped having an `f`. Pad gained tap()/dpad(); ctrl_probe.py and target_probe.py
still use pad.f and now say so in place.

Still open: YOU KILLED is 0000 after 250 s of firing and REMAINING OB is still
012. The craft shoots, closes and selects; whether it destroys anything is next.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PMRJjbxLqZtsb5Vb7KunPE
This commit is contained in:
Sylpheed RE agent
2026-08-23 22:39:33 +00:00
parent 70497b1606
commit 5a9b16bf03
7 changed files with 212 additions and 4 deletions

View File

@@ -99,6 +99,28 @@ class Pad:
self.buttons.clear()
self._write()
def tap(self, b, secs=0.09):
"""Press and release, blocking for `secs`.
The old FIFO server slept on the *server* side, so callers wrote
`tap A 90` and carried on; `pilot.py` still did that through `pad.f`,
which this class no longer has. Here the caller pays the 90 ms. That is
acceptable only because the one caller — the double-tap that selects a
target — is rate-limited; do not put this in a per-tick path.
"""
self.press(b)
time.sleep(secs)
self.release(b)
def dpad(self, direction, secs=0.06):
"""One d-pad step; `center` releases all four."""
for d in ("UP", "DOWN", "LEFT", "RIGHT"):
self.buttons.discard(d)
if direction.lower() == "center":
self._write()
return
self.tap(direction.upper(), secs)
def vector(self):
return [self.state[k] for k in ("LX", "LY", "RX", "RY", "LT", "RT")]