From 2e7de34b95c0ef0ec68a8a0a91df30db7da58422 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Sun, 13 Oct 2019 15:38:38 +0200 Subject: [PATCH] avoid problem with ground targets report 0 kts --- html/planeObject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/planeObject.js b/html/planeObject.js index b9ebf90..ce38ac4 100644 --- a/html/planeObject.js +++ b/html/planeObject.js @@ -259,7 +259,7 @@ PlaneObject.prototype.updateTrack = function(now, last) { var distance = ol.sphere.getDistance(this.position, this.prev_position); var derivedMach = (distance/(this.position_time - this.prev_time + 0.2))/343; var filterSpeed = on_ground ? positionFilterSpeed/10 : positionFilterSpeed; - filterSpeed = (this.gs != null) ? positionFilterGsFactor*this.gs/666 : filterSpeed; + filterSpeed = (this.gs != null) ? positionFilterGsFactor*(this.gs+3)/666 : filterSpeed; // ignore the position if the object moves faster than positionFilterSpeed (default Mach 3.5) // or faster than twice the transmitted groundspeed