diff --git a/features/step_definitions/routability.js b/features/step_definitions/routability.js index ce3e2c753..e3ecd3185 100644 --- a/features/step_definitions/routability.js +++ b/features/step_definitions/routability.js @@ -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; diff --git a/profiles/lib/handlers.lua b/profiles/lib/handlers.lua index ee8bd366b..c108463bb 100644 --- a/profiles/lib/handlers.lua +++ b/profiles/lib/handlers.lua @@ -320,10 +320,10 @@ function Handlers.handle_penalties(way,result,data,profile) if properties.weight_name == 'routability' then if result.forward_speed > 0 then - result.forward_rate = result.forward_speed * penalty + result.forward_rate = (result.forward_speed * penalty) / 3.6 end if result.backward_speed > 0 then - result.backward_rate = result.backward_speed * penalty + result.backward_rate = (result.backward_speed * penalty) / 3.6 end if result.duration > 0 then result.weight = result.duration / penalty