diff --git a/src/route_planner.cpp b/src/route_planner.cpp index ac953385..445a02e1 100644 --- a/src/route_planner.cpp +++ b/src/route_planner.cpp @@ -89,7 +89,7 @@ void constructPath(std::vector &path, RouteModel::Node *curren } // Tips: -// - This method should take the current (final) node as an argument and iteratively follow the +// - This method should take the current (final) node as an argument and iteratively follow the // chain of parents of nodes until the starting node is found. // - For each node in the chain, add the distance from the node to its parent to the distance variable. // - The returned vector should be in the correct order: the start node should be the first element @@ -101,6 +101,8 @@ std::vector RoutePlanner::ConstructFinalPath(RouteModel::Node std::vector path_found{}; constructPath(path_found, current_node, distance); + + distance *= m_Model.MetricScale(); // Multiply the distance by the scale of the map to get meters. return path_found; }