Fixed rain radar and aircraft path

This commit is contained in:
2026-06-25 00:30:10 -04:00
parent 1d3a3be225
commit e91876b7b7
2 changed files with 21 additions and 38 deletions

View File

@@ -25,8 +25,8 @@ export async function getAirTraffic() {
const key = a.hex.toLowerCase()
if (!history.has(key)) history.set(key, [])
const trail = history.get(key)
trail.push({ latitude: a.lat, longitude: a.lon, altitude: a.alt_baro || 0, ts: Date.now() })
if (trail.length > MAX_HISTORY) trail.shift()
trail.unshift({ latitude: a.lat, longitude: a.lon, altitude: a.alt_baro || 0, ts: Date.now() })
if(trail.length > MAX_HISTORY) trail.shift()
}
return { data: aircraft }