**Chat log** from Bead: Incident Viewer Taos Engine App · [canonical source](https://redfish.acequia.io/guerin/.agents/cbf8b027-e80c-4b9f-8eb3-91d40af072d5/2026-06-11/chats/2026-06-12-cameras-toa-perimeters-attitude.md) · session 2026-06-11 · discussion: Talk: Incident Viewer Taos Engine App *Verbatim chat log: immutable provenance. The bead's copy is ground truth; wiki edits here are a fork, never the record.*
Verbatim user prompts in order; assistant turns summarized with pointers. Written incrementally.
**User:** > bead-mount the session, then verify cameras + add a ToA debug mode. > > Mount table (replay from namespace.session.json in the write-target bead): > bead-mount -ac incident-viewer-taos-engine-app /ctx → cbf8b027 (write target — read STATE, WORK-QUEUE, log, decisions, notes 10–14 first) > bead-mount -a taos-engine /ctx → c66cbd1d; bead-mount -a catalog /ctx → 90f902e0; bead-mount -a wildfire-imagery-acquisition /cameras → b3461c66. > Working state: app repo c:/Users/steph/Documents/src/incident-viewer/ (master; build npm run build; engine clone pristine; deploy = PUT chunk+index.html to redfish.acequia.io/guerin/apps/incident-viewer/ with the redfish bearer, delete old chunk). CDP verify via tools/cdp-chrome.sh + serve dist on :8123. Catalog at simtable.acequia.io/incidents/stac/. > Tasks, in order: > 1. Run locally + visually verify the alertwildfire cameras render — switch to each incident, fly near the camera positions (Palisades 62, Sandy 30; green octahedra + az wedges; "Cam +ft" default 20 ft above DEM), screenshot up close, confirm markers + wedges + the Sandy 15801 timelapse billboard near the playhead. Fix what's off. > 2. Double-check the ToA decode + add a shader debug option: a gear-panel toggle ("ToA debug: raw RGB") that renders the time-of-arrival raster's raw RGB with no time reaction — straight texture drape — to validate the base-255 decode + orientation against the source PNG (simtable.com/apps/fireProgression/output2026/2026_CAVNC_042326_sandy.png). > 3. Continue the queue: Epic-2 S3 (perimeters: densify ~30–50 m, vertex z = heightAt + drape-lift, time-stepped ≤ playhead per plan-epic-2-viewer.md) and the attitude-convention fix (diagnostics deployed, logging 88.9°/57.7° deviations; note 12 has the chain + hypothesis). > Conventions: master clock owns time; animate in ECEF never world; every ship = commit (Co-Authored-By Claude) + deploy + CDP verify + one log.md line; chat log incrementally; sync the bead at session end. Assistant: mounted the session (read STATE/WORK-QUEUE/log/decisions + notes 10–14 + plan-epic-2-viewer + chat history; replayed the v2 mount table — /ctx write target = this bead, /cameras = b3461c66). **Task 1 — cameras (SHIPPED 7f16af7, deployed):** Built + drove CDP (cdp-chrome.sh + python :8123). Added debug-only `window.__misb` hooks (flyToCam/cameras/camFrames/switchIncident/masterSeek) and `tools/cam-*.mjs` harnesses to fly up close and project the marker pixel. Counts were perfect from the start (Palisades 62 + Sandy 30, 15801 = 666 frames) but the markers were **visually absent** at the projected pixel on oblique close-ups. Ruled out: framing/terrain-streaming (heightAt resolves to 588 m, marker re-anchors), engine model (WGS84 both sides — ring lands on the true point), feature registration (FixedCameras present), push (124 items/frame confirmed via a wrapped update), and culling (forward-transparent pass does none; an opaque-debug test was a red herring since forward_pass filters by `material.transparent`). **Root cause:** the 25 m green octa sitting +6 m (DEM+Cam-ft) is buried in terrain microrelief and reads green-on-green from the near-overhead default view; the flat az wedge also goes edge-on. An against-the-sky shot proved the geometry renders fine. **Fix:** `buildCamGlyphMesh` floats the octa (r=30) 70 m up the local ECEF radial on a thin crossed-quad stem from the true ground point — clears terrain, silhouettes from oblique/level angles, base still marks DEM+Cam-ft; wedge alpha 0.35→0.5. Verified up-close on both incidents + the 15801 billboard near the playhead. Committed, deployed (chunk BjuMn0ty, old B9T9eOEe deleted), **live CDP all-pass / 0 exceptions**, log line written. **Task 2 — ToA debug (SHIPPED 3765562, deployed):** Added a "ToA debug: raw RGB" gear toggle that drapes the source PNG straight onto terrain (opaque, no master-clock recolor, no window gate). Double-checked the decode: base-255 (`val=r·255²+g·255+b`) matches the fireProgression shader; decoded arrivals (23:50→05-23 04:43Z) sit inside the 23:49→05:29Z timestep span; the catalog `toa` asset IS the task's `2026_CAVNC_042326_sandy.png`. CDP raw drape over the bbox matches the source exactly — black ignition on the WEST, green late-arrival on the EAST, north-up (UV u:west→east=L→R, v:north→south=top→bottom). The PNG's white background is genuine (time-decode excludes `r===255`). Live CDP all-pass. **Task 3 — Epic-2 S3 perimeters (SHIPPED 2a371d0, deployed):** Terrain-following perimeter ribbons. Each STAC MultiPolygon ring densified to ≤40 m → `buildTrackMesh` cross-ribbon at z = heightAt + "Perim +m" drape-lift (gear slider, default 8 m), ECEF-anchored + provisional-elevation rebuild. Fire-progression semantics: only perimeters with `datetime ≤ playhead` render, latest bright / earlier embered; untimed aggregate skipped; collection eye wired into the roster. Perimeter datetimes now extend the master span (Palisades timeline spans Jan 7–9 so the playhead can reach the later snapshots — a deliberate whole-burn behavior change, consistent with the Sandy ToA decision). CDP-verified scrub 22:09→21:06 grows 1→4 perimeters (770→15,832 ac), all terrain-draped. Live all-pass. **Task 4 — attitude-convention fix (SHIPPED 333ff08, deployed):** Diagnosed note-12's rotated-projection bug. The chain composed platform pitch + gimbal elevation with NEGATED angles about body-right (`-s.pit`, `-s.rEl`), raising the look above the horizon → boresight 54–87° off the true sensor→frame-center → past the 8° gate → always fell back to lookRotation (arbitrary roll). Solved offline against ground truth for BOTH dialects (`tools/att-solve.mjs`): pitch and elevation are BOTH +ve about body-right → boresight matches to 0.01–0.03°. Live: chain now logs "chain ok (Δ 0.15°/0.17°)" and applies the real sensor roll (−23°/+132°). Image-up convention unchanged; final VISUAL roll confirmation vs burned-in features still recommended (note 12). Live all-pass.
**Conventions honored:** master clock owns time; animate in ECEF; every ship = commit (Co-Authored-By Claude) + deploy (PUT chunk+index.html, delete old) + live CDP verify + log.md line; chat logged incrementally; bead synced at session end. Live chunk after the session: `index-KVD6Tb34.js`. **Debug surface added (all under `window.__misb`, used by the new `tools/*.mjs` CDP harnesses):** flyToCam, flyOver, cameras, camFrames, perims, attSample, switchIncident, masterSeek/masterMs, incidentId.
**User:** > review the last git submission and review why the TOA layer is not properly draping on the terrain. you can use the debug flag to show pure RGB Assistant: reviewed the recent commits (the attitude commit didn't touch the ToA mesh — the defect was in the original ToA mesh from e97d062) and reproduced with the raw-RGB debug flag from a low SE oblique: terrain poked straight through the raster everywhere. Quantified live: current terrain reads 272–696 m across the bbox (424 m relief) while the mesh had latched stale heights. **Root cause (two-fold):** (1) `buildToaMesh` latched `heightsOk` at >50% sampled — up to half the verts froze at the 300 m fallback, and even sampled verts froze at build-time coarse terrain LOD while the displayed terrain kept refining; (2) the 40×40 grid (~125 m cells) let hills poke through between vertices regardless. **Fix (SHIPPED 3ff08c3, deployed chunk RMc-sEhC):** grid 40→120 (~42 m cells), rebuild every ~1 s until ≥99% sampled or 3 no-gain rebuilds, then a 4 s drift sentinel re-drapes when heightAt drifts >3 m from the stored per-vertex heights (newly streamed tiles over old fallback areas read as large drift, so an early no-gain latch self-heals — observed sampledFrac 0.77→1.0 on approach). Verified raw + timed modes both hug terrain on the previously-failing view; live CDP `toaState` = sampledFrac 1.0 / drift 0. Added `__misb.toaState()`.