aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/DistanceHandler.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/org/traccar/DistanceHandler.java b/src/org/traccar/DistanceHandler.java
index 5cfb86ea0..99b240150 100644
--- a/src/org/traccar/DistanceHandler.java
+++ b/src/org/traccar/DistanceHandler.java
@@ -56,6 +56,7 @@ public class DistanceHandler extends BaseDataHandler {
position.set(Position.KEY_DISTANCE, distance);
}
totalDistance += distance;
+ totalDistance = BigDecimal.valueOf(totalDistance).setScale(2, RoundingMode.HALF_EVEN).doubleValue();
position.set(Position.KEY_TOTAL_DISTANCE, totalDistance);
return position;