mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
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).
This commit is contained in:
1 parent
71b7177dc0
commit
6eec8f6cb0
1 file changed
+9
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user