fix(cctv): base the Toronto ground prior on the city's real relief

The pack shipped a flat 90 m. Sampling a DEM at all 336 camera sites puts
the network between 76 m (Queens Quay) and 209 m (Keele & Steeles), mean
116 m: a median error of 14 m against the old value, 88 m at the 90th
percentile and 119 m at worst, with the Allen Road cameras — 170-197 m —
the furthest underground.

No constant fits a city with that much relief; the precomputed ground
heights are what place a camera properly, and until this pack has them the
prior is the fallback for a sidecar miss or an edited pose. The mean is at
least wrong in both directions rather than only one.

This value is not part of the served pose, so it changes no pose hash and
invalidates no precomputed entry.
This commit is contained in:
Cliff Flood committed 2026-10-13 18:54:59 -04:00
1 parent 51b89d3e4a
commit 7bdeff06a9
1 file changed
+6 -4
+6 -4
View File
@@ -298,10 +298,12 @@ export const TORONTO_RESCU_IMAGE_ORIGIN =
export const DEFAULT_TORONTO_MAX_SOURCES = 336;
/** Yonge / Queen: the prioritization anchor. */
export const TORONTO_DOWNTOWN = { lat: 43.6532, lon: -79.3832 };
/** Toronto's lakeshore core sits near 76 m; the ravines and the north of the
* city run higher. This prior only has to be close — the client's one-shot
* ground snap corrects it wherever 3D tiles are loaded. */
export const TORONTO_GROUND_ELEVATION_M = 90;
/** The city climbs from 76 m at the lake to 209 m at Steeles, so no single
* number fits: this is the mean across the 336 camera sites. Placement comes
* from the precomputed ground-height sidecar wherever a camera has an entry;
* this prior is only the fallback for a sidecar miss or an edited pose, and
* the client's ground snap corrects it wherever 3D tiles are loaded. */
export const TORONTO_GROUND_ELEVATION_M = 116;
/** Hard ceiling on the RESCU list body. The whole city is ~336 rows and under
* 60 KB; this only exists so an upstream that streams an unbounded body cannot
* be buffered without limit. */