aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/reports
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-12-14 16:08:25 -0800
committerAnton Tananaev <anton@traccar.org>2022-12-14 16:08:25 -0800
commit3b36ac38a0c4e193ea8085eb5556dffd8205bb17 (patch)
tree45d60d8132bdacac3901282bb8ba09ddb3640c45 /src/main/java/org/traccar/reports
parent836dc4138fdcf560a31c6a90769b19f6a0d0e438 (diff)
downloadtrackermap-server-3b36ac38a0c4e193ea8085eb5556dffd8205bb17.tar.gz
trackermap-server-3b36ac38a0c4e193ea8085eb5556dffd8205bb17.tar.bz2
trackermap-server-3b36ac38a0c4e193ea8085eb5556dffd8205bb17.zip
Handle motion fluctuation (fix #5000)
Diffstat (limited to 'src/main/java/org/traccar/reports')
-rw-r--r--src/main/java/org/traccar/reports/common/ReportUtils.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/reports/common/ReportUtils.java b/src/main/java/org/traccar/reports/common/ReportUtils.java
index 120dadcf5..a7c420095 100644
--- a/src/main/java/org/traccar/reports/common/ReportUtils.java
+++ b/src/main/java/org/traccar/reports/common/ReportUtils.java
@@ -354,7 +354,9 @@ public class ReportUtils {
boolean trips = reportClass.equals(TripReportItem.class);
MotionState motionState = new MotionState();
- motionState.setMotionState(isMoving(positions, 0, tripsConfig));
+ boolean initialValue = isMoving(positions, 0, tripsConfig);
+ motionState.setMotionStreak(initialValue);
+ motionState.setMotionState(initialValue);
boolean detected = trips == motionState.getMotionState();
int startEventIndex = detected ? 0 : -1;