aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-10-24 17:13:52 +0500
committerAbyss777 <abyss@fox5.ru>2016-10-24 17:13:52 +0500
commit6f4a47f11f52358c6a843da775d855619e2ee4f5 (patch)
tree458838cdaaf60ea5b609d0162c6e12cd4df27d4c /src/org
parent38c285dc91f0960e3a4bd5804d42c7dd293fc7d3 (diff)
downloadtrackermap-server-6f4a47f11f52358c6a843da775d855619e2ee4f5.tar.gz
trackermap-server-6f4a47f11f52358c6a843da775d855619e2ee4f5.tar.bz2
trackermap-server-6f4a47f11f52358c6a843da775d855619e2ee4f5.zip
Add exclusion for valid positions to CoordinatesHandler
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/CoordinatesHandler.java2
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());
}