diff options
author | Abyss777 <abyss@fox5.ru> | 2016-10-24 17:13:52 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-10-24 17:13:52 +0500 |
commit | 6f4a47f11f52358c6a843da775d855619e2ee4f5 (patch) | |
tree | 458838cdaaf60ea5b609d0162c6e12cd4df27d4c | |
parent | 38c285dc91f0960e3a4bd5804d42c7dd293fc7d3 (diff) | |
download | trackermap-server-6f4a47f11f52358c6a843da775d855619e2ee4f5.tar.gz trackermap-server-6f4a47f11f52358c6a843da775d855619e2ee4f5.tar.bz2 trackermap-server-6f4a47f11f52358c6a843da775d855619e2ee4f5.zip |
Add exclusion for valid positions to CoordinatesHandler
-rw-r--r-- | src/org/traccar/CoordinatesHandler.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/CoordinatesHandler.java b/src/org/traccar/CoordinatesHandler.java index 7d1c43284..ad445bc28 100644 --- a/src/org/traccar/CoordinatesHandler.java +++ b/src/org/traccar/CoordinatesHandler.java @@ -42,7 +42,7 @@ public class CoordinatesHandler extends BaseDataHandler { if (last != null) { double distance = DistanceCalculator.distance( position.getLatitude(), position.getLongitude(), last.getLatitude(), last.getLongitude()); - if (distance < coordinatesMinError || distance > coordinatesMaxError) { + if (distance < coordinatesMinError || distance > coordinatesMaxError && !position.getValid()) { position.setLatitude(last.getLatitude()); position.setLongitude(last.getLongitude()); } |