From 6eec8f6cb0f8a240244233f5f65a63fc15012732 Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Sat, 17 Oct 2026 12:12:00 +0400 Subject: [PATCH] fix(qa): floor verification finds a contact's model by its icao24 getNearby returns the contact's label as `id` (the callsign when it has one) and its key as `icao24`; the drawn rows are keyed by icao24, so the model lookup missed and every contact was measured at its sprite. Under a 3D model that sprite is hidden and keeps the pre-floor height by design (T7): the "buried at -27 m" contacts on Cesium (the geoid at AUS) were those hidden sprites, at HEAD and on 7c7422e2, whose script measured every sprite. The Cesium report also gives each contact's model state and the floor cell the layer reads. AUS, 100 s after enabling flights, both engines: 3 low contacts, 0 buried; N3752 / DAL848 drawn by their models at 130.2 / 135.4 m over a 123.5 / 128.6 m mesh, the DEM-prior cell warm (123.5 / 128.6 m). --- scripts/qa-floor-verify.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/qa-floor-verify.mjs b/scripts/qa-floor-verify.mjs index 2bcfcf1c9..b7a8a80da 100644 --- a/scripts/qa-floor-verify.mjs +++ b/scripts/qa-floor-verify.mjs @@ -108,7 +108,7 @@ const report = await page.evaluate(async () => { // is hidden and keeps the pre-floor height by design, T7). const drawnRows = new Map((gev.layers.drawn('flights') ?? []).map((row) => [row.id, row])); const drawnAt = (p) => { - const model = drawnRows.get(p.id)?.model; + const model = drawnRows.get(p.icao24 ?? p.id)?.model; return model?.show && model.ready && model.position ? model.position : null; }; for (const p of nearby) { @@ -166,7 +166,7 @@ const report = await page.evaluate(async () => { walk(v.scene.primitives); const drawnRows = new Map((gev.layers?.drawn('flights') ?? []).map((row) => [row.id, row])); const drawnAt = (p) => { - const model = drawnRows.get(p.id)?.model; + const model = drawnRows.get(p.icao24 ?? p.id)?.model; return model?.show && model.ready && model.position ? model.position : null; }; const out = []; @@ -185,6 +185,13 @@ const report = await page.evaluate(async () => { drawnBy: modelAt ? 'model' : 'sprite', meshM: meshH != null ? +meshH.toFixed(1) : null, aboveMeshM: meshH != null ? +(c.height - meshH).toFixed(1) : null, + // A contact whose sprite hides under a model that is not (yet) drawn. + model: drawnRows.get(p.icao24 ?? p.id)?.model + ? { show: drawnRows.get(p.icao24 ?? p.id).model.show, ready: drawnRows.get(p.icao24 ?? p.id).model.ready } + : null, + spriteShown: drawnRows.get(p.icao24 ?? p.id)?.show ?? null, + // The coarse floor (mesh cell ?? DEM prior) the layer reads here. + demFloorM: gev.surfaceServices?.groundFloor.cachedGroundFloor(latDeg, lonDeg) ?? null, }); } // Visibility census (round 6): getNearby only returns contacts a sprite or a