SkyView: Unify stale check for loading the history

When loading the history, the check for stale aircraft tracks is done
differently.
This results in lots of dotted/stale track after opening the web page.
Improve this by using the same 5 second timeout stale criterion to
postions loaded from history. Add an additional check to better detect
stale tracks when loading history positions that are spaced 30 seconds
apart.
This commit is contained in:
Matthias Wirth 2019-07-27 17:50:41 +02:00
parent 5cc04d4ca8
commit 207ca0c401
2 changed files with 17 additions and 6 deletions

View file

@ -444,7 +444,7 @@ function end_load_history() {
console.log("Updating tracks at: " + now);
for (var i = 0; i < PlanesOrdered.length; ++i) {
var plane = PlanesOrdered[i];
plane.updateTrack((now - last) + 1);
plane.updateTrack(now, last);
}
last = now;