mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
fix(flights): an aircraft with no ground track faces its true heading, not north
readsb rows (adsb.lol and a local dump1090 receiver) often send no track for an aircraft on the ground, only its true heading. The track then read as missing and the aircraft was drawn facing north, so one taxiing south looked like it was moving backwards. Each normalizer now falls back to true_heading, never the magnetic heading.
This commit is contained in:
1 parent
3934be9ff9
commit
fd06272e37
6 files changed
+65
-3
No files matched your search
@@ -248,7 +248,8 @@ export function normalizeDump1090Aircraft(json, nowMs, { band = '1090' } = {}) {
|
||||
lon: hasPosition ? position.lon : null,
|
||||
altitudeFt: altitude,
|
||||
groundSpeedKt: finiteOrNull(entry.gs),
|
||||
trackDeg: normalizeTrack(entry.track),
|
||||
// No track (parked, slow): the true heading, where the nose points.
|
||||
trackDeg: normalizeTrack(entry.track ?? entry.true_heading),
|
||||
verticalRateFpm: readAdsbVerticalRateFpm(entry),
|
||||
lastPositionAt: hasPosition
|
||||
? receivedAt - Math.max(0, seenPosS) * 1000
|
||||
|
||||
Reference in new issue
Block a user