Skip to content

Disable the oscillator correction: it makes the preview jump at every… - #11

Merged
averagenative merged 1 commit into
mainfrom
fishing-gauge-native-read
Sep 12, 2026
Merged

averagenative merged 1 commit into
mainfrom
fishing-gauge-native-read

Conversation

@averagenative

Copy link
Copy Markdown
Owner

… turn

c3b3479 shipped this unvalidated and it is worse than what it replaced. On a real run the preview leaps between the strongest and weakest shot, which makes the thing it exists to help -- knowing when to release -- harder, not easier.

Measured on a recording of that run: 34 sign flips in cos between consecutive frames and 17 jumps of over 0.5, the worst going +0.946 to -0.955 across one frame boundary as the platform reversed.

The reasoning in that commit was wrong in a specific way. It argued the failure was self-limiting -- "near the turning points the direction cannot be read, but that is also where cos is near zero, so falling back costs almost nothing". That holds only if y0 and amp are right. They are taken from observed min/max, which is outlier-sensitive and drifts as the detector picks different rows of the sliding platform, so at the observed reversal sin was 0.288 rather than ~1, |cos| was 0.957, and the sign flip cost the entire correction twice over.

Recovering cos as sign(dy)sqrt(1-sin^2) is the wrong shape of estimator for this: it is discontinuous exactly where the platform spends most of its visible time. The physics in c3b3479 is still right -- platform height and release velocity really are one oscillator in quadrature -- but the phase has to be estimated as a phase. The period is known exactly (G16[0] += 1.3 per 20ms and phi = 1.1G16[0] deg, so 5.035 s), which makes platY = y0 + Asin(wt) + Bcos(wt) a linear least squares fit over a window, with cos(phi) falling out of A and B continuously and with no sign to guess.

shotA stays derived and the per-flight fit stays on the probe, so the data needed to validate the replacement is still being collected.

… turn

c3b3479 shipped this unvalidated and it is worse than what it replaced. On a
real run the preview leaps between the strongest and weakest shot, which makes
the thing it exists to help -- knowing when to release -- harder, not easier.

Measured on a recording of that run: 34 sign flips in cos between consecutive
frames and 17 jumps of over 0.5, the worst going +0.946 to -0.955 across one
frame boundary as the platform reversed.

The reasoning in that commit was wrong in a specific way. It argued the failure
was self-limiting -- "near the turning points the direction cannot be read, but
that is also where cos is near zero, so falling back costs almost nothing". That
holds only if y0 and amp are right. They are taken from observed min/max, which
is outlier-sensitive and drifts as the detector picks different rows of the
sliding platform, so at the observed reversal sin was 0.288 rather than ~1,
|cos| was 0.957, and the sign flip cost the entire correction twice over.

Recovering cos as sign(dy)*sqrt(1-sin^2) is the wrong shape of estimator for
this: it is discontinuous exactly where the platform spends most of its visible
time. The physics in c3b3479 is still right -- platform height and release
velocity really are one oscillator in quadrature -- but the phase has to be
estimated as a phase. The period is known exactly (G16[0] += 1.3 per 20ms and
phi = 1.1*G16[0] deg, so 5.035 s), which makes platY = y0 + A*sin(wt) +
B*cos(wt) a linear least squares fit over a window, with cos(phi) falling out
of A and B continuously and with no sign to guess.

shotA stays derived and the per-flight fit stays on the probe, so the data
needed to validate the replacement is still being collected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@averagenative averagenative self-assigned this Sep 12, 2026
@averagenative
averagenative merged commit f937209 into main Sep 12, 2026
1 check passed
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