From 82e9f257c0d23d0215813a8522ceac5b7cd754bf Mon Sep 17 00:00:00 2001 From: Olga Khlopkova Date: Fri, 11 Dec 2020 17:21:11 +0300 Subject: [PATCH] [routing] Fixed DummyWorldGraph methods for A* heuristic. --- routing/dummy_world_graph.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routing/dummy_world_graph.hpp b/routing/dummy_world_graph.hpp index 47b8a3a9ad..28d30bd6d1 100644 --- a/routing/dummy_world_graph.hpp +++ b/routing/dummy_world_graph.hpp @@ -3,6 +3,7 @@ #include "routing/latlon_with_altitude.hpp" #include "routing/world_graph.hpp" +#include "geometry/distance_on_sphere.hpp" #include "geometry/latlon.hpp" #include "base/assert.hpp" @@ -70,7 +71,7 @@ public: RouteWeight HeuristicCostEstimate(ms::LatLon const & from, ms::LatLon const & to) override { - return RouteWeight(); + return RouteWeight(ms::DistanceOnEarth(from, to)); } RouteWeight CalcSegmentWeight(Segment const & segment, EdgeEstimator::Purpose purpose) override @@ -87,7 +88,7 @@ public: RouteWeight CalcOffroadWeight(ms::LatLon const & from, ms::LatLon const & to, EdgeEstimator::Purpose purpose) const override { - return RouteWeight(); + return RouteWeight(ms::DistanceOnEarth(from, to)); } double CalculateETA(Segment const & from, Segment const & to) override