Hand the host's live placement the ground under each aircraft

A landing is judged by its height above the ground, which the drawn
height alone does not give at a high airport. Records keep the ground
the warm cache already reads (the surface a grounded contact stands on,
the floor under a low contact near the view or tracked) as groundM, in
the render height's reference, and observeLiveAircraft passes it on; NaN
where the layer does not know it.
This commit is contained in:
Sameh Khamis committed 2026-11-17 19:46:19 -08:00
1 parent 4c90c065be
commit 46d8a19e98
4 files changed
+58 -8

No files matched your search

+7 -4
View File
@@ -283,6 +283,10 @@ export class FlightRecords {
// within GROUND_FLOOR_CLAMP_RADIUS_KM of the viewer — the only ones
// whose burial is visible. Cells warm in one batch after the loop.
// Airborne only (grounded planes keep the surface-cache path above).
// The ground under the contact in its render height's reference, where
// the warm cache knows it: the surface it stands on, or the floor under a
// low contact near the view. A landing is judged above it.
let groundM = onGround ? surfaceM : null;
if (
!onGround &&
renderAltitudeM < GROUND_FLOOR_WARM_MAX_ALT_M &&
@@ -291,10 +295,8 @@ export class FlightRecords {
approxDistanceKm(viewerLatDeg, viewerLonDeg, lat, lon) <=
GROUND_FLOOR_CLAMP_RADIUS_KM))
) {
renderAltitudeM = floorAltitudeM(
renderAltitudeM,
cachedGroundFloor(lat, lon),
);
groundM = cachedGroundFloor(lat, lon);
renderAltitudeM = floorAltitudeM(renderAltitudeM, groundM);
floorWarmPoints.push({ lat, lon });
}
@@ -334,6 +336,7 @@ export class FlightRecords {
geoAltitudeM,
renderAltitudeM,
renderAltitudeInvented,
groundM: Number.isFinite(groundM) ? groundM : null,
onGround,
// Round 7: sticky airborne history — the landed fast-cull only
// applies to contacts that actually flew this session.