aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-08-13 21:57:28 +0500
committerAbyss777 <abyss@fox5.ru>2016-08-13 21:57:28 +0500
commitfec39779b9d84290fc8bcdc3581347d7082103f5 (patch)
treed49d4a80ffe12ee2901de34d2084059e920be16c /src/org/traccar
parent82c2d713d4da71f8eeef3e134b06dbb0abf37633 (diff)
downloadtraccar-server-fec39779b9d84290fc8bcdc3581347d7082103f5.tar.gz
traccar-server-fec39779b9d84290fc8bcdc3581347d7082103f5.tar.bz2
traccar-server-fec39779b9d84290fc8bcdc3581347d7082103f5.zip
Added rounding for total distance
Diffstat (limited to 'src/org/traccar')
-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;