mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
Keep a landed aircraft on the ground, not at its approach height
A grounded row with no altitude fell back to the aircraft's sticky altitude, which straight after a landing is still the approach height. Military contacts then hung there for as long as they stayed on the ground (the grounded floor only ever raises a height); civil contacts held it until the ground cell under them warmed, which for a contact far from the viewer is never. The 3D model is ground-snapped on its own, so the plane dropped when the model took over. A grounded contact with no altitude now uses only an altitude it gave on the ground, else the ground fallback. Labels, the tracked readout and the follow distance read "On the ground" / no flight level instead of the approach altitude.
This commit is contained in:
1 parent
20620e89bf
commit
9b10489454
8 files changed
+145
-26
No files matched your search
@@ -365,7 +365,9 @@ export function createTracking({
|
||||
parts.queries._toCleanText(info?.registration) || t('Reg unknown');
|
||||
const operator =
|
||||
parts.queries._toCleanText(info?.operator) || t('Operator unknown');
|
||||
const altitude = parts.queries._formatAltitude(info?.altitudeFt);
|
||||
const altitude = info?.onGround
|
||||
? t('On the ground')
|
||||
: parts.queries._formatAltitude(info?.altitudeFt);
|
||||
const speedKt = info?.speedMps ? Math.round(info.speedMps * 1.944) : null;
|
||||
const tail = speedKt ? `${altitude} · ${speedKt} kt` : altitude;
|
||||
return [
|
||||
@@ -1124,7 +1126,11 @@ export function createTracking({
|
||||
// renderer's default follow distance is far too tight. It gets a calibrated
|
||||
// viewFrom — behind + above, distance scaled to altitude — for a readable
|
||||
// initial frame with surrounding context. (ENU: east=+X, north=+Y, up=+Z.)
|
||||
const altM = info?.altitudeFt ? info.altitudeFt * 0.3048 : 1500;
|
||||
const altM = info?.onGround
|
||||
? 0
|
||||
: info?.altitudeFt
|
||||
? info.altitudeFt * 0.3048
|
||||
: 1500;
|
||||
const followRange = Math.min(Math.max(altM * 1.1 + 2500, 3000), 30000);
|
||||
const viewFrom = vec(0, -followRange * 0.8, followRange * 0.55);
|
||||
|
||||
|
||||
Reference in new issue
Block a user