aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorjcardus <joaquim_cardeira@hotmail.com>2024-06-01 01:59:59 +0100
committerGitHub <noreply@github.com>2024-06-01 01:59:59 +0100
commit6bfcdcc8640cac20900383dd38b55cfe9225a567 (patch)
treeb02b3fb9548dc03480c2c1f89e46870744d1645d /src/main/java/org/traccar
parentc5833f49feae54b453d667ea02a82fada43a7d46 (diff)
downloadtrackermap-server-6bfcdcc8640cac20900383dd38b55cfe9225a567.tar.gz
trackermap-server-6bfcdcc8640cac20900383dd38b55cfe9225a567.tar.bz2
trackermap-server-6bfcdcc8640cac20900383dd38b55cfe9225a567.zip
check time > 0 in speed filter
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/handler/FilterHandler.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/handler/FilterHandler.java b/src/main/java/org/traccar/handler/FilterHandler.java
index 3bb7ef426..700fdbc13 100644
--- a/src/main/java/org/traccar/handler/FilterHandler.java
+++ b/src/main/java/org/traccar/handler/FilterHandler.java
@@ -153,7 +153,7 @@ public class FilterHandler extends BasePositionHandler {
if (filterMaxSpeed != 0 && last != null) {
double distance = position.getDouble(Position.KEY_DISTANCE);
double time = position.getFixTime().getTime() - last.getFixTime().getTime();
- return UnitsConverter.knotsFromMps(distance / (time / 1000)) > filterMaxSpeed;
+ return time > 0 && UnitsConverter.knotsFromMps(distance / (time / 1000)) > filterMaxSpeed;
}
return false;
}