Fixed rain radar and aircraft path
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user