From fec39779b9d84290fc8bcdc3581347d7082103f5 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Sat, 13 Aug 2016 21:57:28 +0500 Subject: Added rounding for total distance --- src/org/traccar/DistanceHandler.java | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3