From 7bdeff06a937550046c1e1b66aa976542ad1b565 Mon Sep 17 00:00:00 2001 From: Cliff Flood Date: Wed, 16 Sep 2026 19:22:18 -0400 Subject: [PATCH] fix(cctv): base the Toronto ground prior on the city's real relief MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- server/providers/cctv/constants.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/providers/cctv/constants.js b/server/providers/cctv/constants.js index 6f896be59..9c817a02b 100644 --- a/server/providers/cctv/constants.js +++ b/server/providers/cctv/constants.js @@ -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. */