convert speed to meters per second when used to set rate
This commit is contained in:
committed by
Patrick Niklaus
parent
1c25070572
commit
140f1ad923
@@ -117,7 +117,7 @@ module.exports = function () {
|
||||
if (r.route.split(',')[0] === util.format('w%d', i)) {
|
||||
r.time = r.json.routes[0].duration;
|
||||
r.distance = r.json.routes[0].distance;
|
||||
r.rate = Math.round(r.distance / r.json.routes[0].weight)
|
||||
r.rate = Math.round(r.distance / r.json.routes[0].weight);
|
||||
r.speed = r.time > 0 ? parseInt(3.6 * r.distance / r.time) : null;
|
||||
} else {
|
||||
r.status = null;
|
||||
|
||||
Reference in New Issue
Block a user