# takeoff-player (lcdjhcot): watch and inspect the three calibrated 8K takeoff clips

Lane: player, Ansel, for BOS-Takeoff-Veillance (8ac6d87f), 2026-10-24/25. Code: `artifacts/takeoff-player/`
(`index.html`, `styles.css`, `js/app.mjs`, `js/data.mjs`, `js/camera.mjs`). No other file of the bead was edited.

Open: https://stephenguerin.live/agents/8ac6d87f-3192-4fdb-a260-583dbee74291/artifacts/takeoff-player/index.html
Deep links: `?clip=115634&t=20&coast=1` (clip, seconds into clip, coast overlay on).

## What it does (v0.1.1)

- **One time axis** at the bottom holds the three clips in time order (115459 runway 4R and climb, 115531 Chelsea
  and Revere, 115634 Lynn and Marblehead), the photo times as ticks, and the rough stretch of 115459 as a red bar.
  Click to go to a time. The clock reads UTC and Boston (EDT); click it and type a time (`15:55:01.6`, or
  `11:55:01 EDT`).
- **Video**: the 960 proxy plays in real time. **Pause, or wheel/pinch zoom, and the view swaps to the 8K still**
  for that second. The chip shows the offset ("8K still +0.3 s"). Drag pans, double-click fits, play swaps back.
  Space plays and pauses; Left and Right step a frame; Shift steps a second; L toggles labels; C toggles the coast overlay.
- **Aircraft labels**: every other aircraft in `aircraft_v5k2m8qt.json` is placed at its interpolated ADS-B
  position at the on-screen UTC and projected through that frame's pose: callsign, type, range. Labels follow the
  picture: on a still they use the still's own time. Beyond 20 km they are drawn quieter; beyond 60 km they are not drawn.
- **Coast (OSM)**: the lane's Overpass cache (`calibration-8k/osm_b8k3t5/coast.json`): coastline, piers and
  breakwaters in red, runways in ochre, projected through the same pose. Use it to judge the pose of any frame by eye.
- **Map** (Leaflet; Esri World Imagery or OSM): UAL414's full-rate adsb.lol track (white), the three recorded
  stretches (red; click to go there), the camera now, the **footprint** (image outline, 10 samples per edge, cast to
  sea level with the solver's curvature and refraction; rays that miss stop at 25 km and are dashed), other aircraft
  now, and the 15 photos (click for the time, a thumbnail, and "go to this time").
- **Calibration readout** per frame: f, kind, sigma_deg, anchor_px, hfov, altitude. On 115459 f0-f300 a caveat says
  "Rough, not verified". The **hold field** control appears only on 115459: it is on by default and swaps in the
  clip's constant hfov 62.92 deg where a row departs from it by more than 2 deg. The rough rows run from 3.7 to 88 deg,
  which contradicts the lane's own one-field-per-clip model.

## Camera model

`js/camera.mjs` copies the solver's model line by line: `cameraFrame` (losalamos-weather calib.js, the frame
image-geo-projection's PinholeCamera builds), `projectDir` with k1 = k2 = 0, f = (w/2)/tan(hfov/2), principal point
at centre, and `pixelOfPoint` from skyfox-pose geo.mjs (tangent frame, R 6371008.8 m, refraction k 0.13). It is copied
rather than imported because those modules are served from redfish.acequia.io, and cross-origin module imports need CORS.
**Checked in Node against skyfox geo.mjs `paneCamera` + `pixelOfPoint`: identical to the last printed digit** (AAL1205 at f60, f330, f420).
ADS-B heights: `altSrc: geom` tracks get +28.6 m (MSL = ellipsoid - N, N = -28.6 m); baro tracks are used as MSL;
zero or ground heights are put at 9 m MSL.

## Verified, and how

Headless Chrome 1500x880 and 390x844 (puppeteer-core with the system Chrome; the DevTools MCP browser was held by
another session):
- No console errors and no page errors. The video plays (currentTime advances; readyState 4). The map tiles render.
  Pause shows the still, with the 'shown' class and the right f_n. Wheel zoom pauses and swaps to the still.
  The typed time 11:57:20 EDT went to 115634 t 44.84 s. Labels and the footprint update on every frame.
- **Coastline**: on 115634 (t 20 s, t 50 s at 2.5x on the 8K still) the projected OSM shoreline lies on the Lynn
  and Swampscott shore to within a few px. On 115531 and 115459 after f330 it is close. The map footprint covers the
  same ground.
- **AAL1205 (115459, rough stretch)**, measured on the 8K stills:
  - still f_2 (t 1.5 s): the A321 is at about (1200, 1944) 8K px. The label lands at (737, 1475) with the raw row
    hfov, about 5.3 deg off, and at (1880, 1727) with the field held, about 5.8 deg off.
  - At the click-ask frame f60 (A321 at about (456, 2184)), the held field puts it at about (68, 1816), about 4.4 deg off.
  - At still f_3 the pose misses it by about 15 deg.
  - So the label lands on the right side of the frame but not on the aircraft: the pose, not the player, is the error,
    as the lane says. No other aircraft within 12 km was in frame in the solved clips except N9871K (GA, 10 km,
    115634 f_59-f_68, too small to see against the ground at 8K), so no aircraft confirms the label in a solved stretch.

## Finding for the producers: the 8K still timing is half a second off

`proxies_q8d4m1zv.json` says "f_n is t = n-1 seconds from clip start". **It is t = n - 0.5 s.** The ZNCC of each
still against the proxy (blurred, 480x270) peaks at +0.50 to +0.53 s on all three clips: 0.995 to 0.999 there, against
0.65 to 0.93 at +0 s. The stills tested were 115634 f_2, 11, 31, 51 and 69, 115459 f_3, 9 and 15, and 115531 f_3, 9
and 15. This is what ffmpeg fps=1 does: it takes the mid-second frame. The player uses n - 0.5 (`STILL_T0` in app.mjs).
Anything else that pairs a still with a pose by n - 1 is half a second (about 15 frames) off.

## Known limits

- 115459 f0-f300: labels and footprint are off by 4 to 15 deg (above). Waiting on the human keyframe, or on ADS-B
  point anchors.
- The stills are 1 per second, so a pause shows a picture up to 0.5 s away from the paused frame (the chip says how
  far). Exact-frame 8K is not available yet.
- No lens distortion, so far corners can be off by 10 to 30 px at 1920. There is no terrain or occlusion test for
  labels: an aircraft behind a hill or a building is still labelled. Baro heights are not corrected for QNH (UAL414's
  baro runs 3 to 24 m above its pose height).
- The coast overlay loads 2.7 MB on first use.
- The pose files' `sigma_deg` reads 0.15 in the rough stretch too, so do not read it as quality there. The caveat is
  the signal.
