aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorlukasha12 <66280366+lukasha12@users.noreply.github.com>2020-10-12 23:04:15 +0200
committerGitHub <noreply@github.com>2020-10-12 23:04:15 +0200
commit5f33f3d5848bb764fd5a676b83f882b78a636d09 (patch)
tree673f01d303712b079937a1afb847efbaba722585 /src/main/java/org
parent852c87ba428274772ffc29cfe4ec9920184f4c38 (diff)
downloadtrackermap-server-5f33f3d5848bb764fd5a676b83f882b78a636d09.tar.gz
trackermap-server-5f33f3d5848bb764fd5a676b83f882b78a636d09.tar.bz2
trackermap-server-5f33f3d5848bb764fd5a676b83f882b78a636d09.zip
FIX distance calculation.
Fixing distance calculation condition.
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/reports/ReportUtils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/reports/ReportUtils.java b/src/main/java/org/traccar/reports/ReportUtils.java
index 9a22b5f9b..af686ba20 100644
--- a/src/main/java/org/traccar/reports/ReportUtils.java
+++ b/src/main/java/org/traccar/reports/ReportUtils.java
@@ -97,7 +97,7 @@ public final class ReportUtils {
double firstOdometer = firstPosition.getDouble(Position.KEY_ODOMETER);
double lastOdometer = lastPosition.getDouble(Position.KEY_ODOMETER);
- if (useOdometer && (firstOdometer != 0.0 || lastOdometer != 0.0)) {
+ if (useOdometer && firstOdometer != 0.0 && lastOdometer != 0.0) {
distance = lastOdometer - firstOdometer;
} else if (firstPosition.getAttributes().containsKey(Position.KEY_TOTAL_DISTANCE)
&& lastPosition.getAttributes().containsKey(Position.KEY_TOTAL_DISTANCE)) {