aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/ReportUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/reports/ReportUtils.java')
-rw-r--r--src/org/traccar/reports/ReportUtils.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/reports/ReportUtils.java b/src/org/traccar/reports/ReportUtils.java
index 1e004beae..cd30a61c4 100644
--- a/src/org/traccar/reports/ReportUtils.java
+++ b/src/org/traccar/reports/ReportUtils.java
@@ -220,7 +220,12 @@ public final class ReportUtils {
>= tripsConfig.getMinimalNoDataDuration()) {
return false;
}
- return positions.get(index).getSpeed() > speedThreshold;
+ if (positions.get(index).getAttributes().containsKey(Position.KEY_MOTION)
+ && positions.get(index).getAttributes().get(Position.KEY_MOTION) instanceof Boolean) {
+ return positions.get(index).getBoolean(Position.KEY_MOTION);
+ } else {
+ return positions.get(index).getSpeed() > speedThreshold;
+ }
}
public static Collection<BaseReport> detectTripsAndStops(TripsConfig tripsConfig, boolean ignoreOdometer,