Aiming Maths and Calibration

Homography from four points, offset, tilt and distance, calibration routines, and the latency budget.

Firearms

Aiming Maths and Calibration · Deep Dive

Aiming Maths and Calibration

Turning four blobs into a crosshair.

Homography from four points, offset, tilt and distance, calibration routines, and the latency budget.

Photo: Nintendo's Wii Zapper shell with a Wii Remote fitted along its top; the Remote's camera looks out of the gun's front end by Michael Greiner (original); Lipatden (retouched derivative) · CC BY-SA 3.0

Search every volume:

?

How to search

sten gun
pages with both words
"sten gun"
the words together, as a phrase
sten OR sterling
either one (| works too)
sten -replica
leave out pages that mention “replica”

Without quotes, the last word also matches longer words that start with it (sten finds Stenophylla), and close word forms count (rifle finds rifles). Tick Exact words to match whole words only.

Whole deep dives are listed first, then the pages inside them.

    Volumes

    1. Vol 1 From Dots to a Screen Position — the Camera Model, the Boresight and the Lens What the firmware is actually computing when four infrared points become a cursor: the pinhole model in each camera's own units, the one number it must learn by calibration, and the PAJ7025R3's wide lens, with its correction re-derived and its uncorrected error put in millimetres
    2. Vol 2 Naming the Points, and the Models Before the Homography — Two Points, Roll, Scale and What They Cannot Correct How the firmware decides which dot is which, the roll at which that fails, and the two simpler mappings the open firmware family used before it adopted perspective — read from the Samco and Prow source, and measured against the homography in simulation
    3. Vol 3 The Homography — Derivation, the Closed Form OpenFIRE Uses, Conditioning, and What It Costs an RP2040 From the eight-equation direct linear transform to Heckbert's square-to-quad shortcut in Johnny Lee's code, why the 'hourglass' corner order is harmless in v6.2, how float32 fares, the missing guards, and the per-frame cost in cycles on an RP2040 and an RP2350
    4. Vol 4 Calibration — What Each Trigger Pull Actually Solves For OpenFIRE's six-shot routine read line by line and reduced to its six unknowns, the exact proof of why it works, the three places v6.2 gives away accuracy (a second-order offset map, a boresight rotated by the calibration roll, and a mean that is not the centre), and the Samco and Prow routines it replaced
    5. Vol 5 Parallax — Why the Camera and the Sight Line Disagree, and by How Much The error a camera beside the aiming line makes away from the distance it was calibrated at, derived and confirmed in simulation; why tilting the camera cannot fix it; the ESP32 port's dormant dynamic correction and the form it should take; and what it means for where the camera goes in an MP7 shell
    6. Vol 6 Smoothing — Moving Averages, the One-Euro Filter and Kalman, Traded in Milliseconds and Millimetres Every filter the open firmware family uses, read from the source and run in simulation at 209 Hz: how much jitter each removes, how much lag it adds on a slow drift and a fast swing, what happens when the gun stops, an out-of-bounds write in v6.2's averaging, and a proposal for this build
    7. Vol 7 The Budgets — Accuracy from Sensor to Pixel, Latency from Hand to Picture, and Shooting Off the Screen Every error source in the dive gathered into one accuracy budget for the Wii-class camera at living-room distance and the PAJ7025R3 up close; the latency chain from the camera frame to the television with the gun's share bounded; and how off-screen detection and reloading actually work in the code