fleetmap-reports 2.0.173 → 2.0.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/util/trips.js +1 -1
package/package.json
CHANGED
package/src/util/trips.js
CHANGED
|
@@ -133,7 +133,7 @@ function isInsideTimetable (t, userData) {
|
|
|
133
133
|
function updateTrip (device, t, route) {
|
|
134
134
|
route = route.filter(p => p && p.attributes.ignition)
|
|
135
135
|
if (!route.length) { return }
|
|
136
|
-
const distance = calculateDistance(route,
|
|
136
|
+
const distance = calculateDistance(route, true) * 1000
|
|
137
137
|
t.distance = distance
|
|
138
138
|
t.duration = new Date(route[route.length - 1].fixTime).getTime() - new Date(route[0].fixTime).getTime()
|
|
139
139
|
t.maxSpeed = route.reduce((a, b) => Math.max(a, b.speed), 0)
|