diff options
author | Anton Tananaev <anton@traccar.org> | 2022-12-14 16:08:25 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-12-14 16:08:25 -0800 |
commit | 3b36ac38a0c4e193ea8085eb5556dffd8205bb17 (patch) | |
tree | 45d60d8132bdacac3901282bb8ba09ddb3640c45 /src/main/java/org/traccar/reports | |
parent | 836dc4138fdcf560a31c6a90769b19f6a0d0e438 (diff) | |
download | trackermap-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.java | 4 |
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; |