From 49f83d9e08cff020a3a193a82bada30c9fbe15d3 Mon Sep 17 00:00:00 2001 From: Olga Khlopkova Date: Thu, 1 Oct 2020 16:38:33 +0300 Subject: [PATCH] [routing] Show pedestrian notification in 20m before the turn. --- routing/routing_session.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/routing/routing_session.cpp b/routing/routing_session.cpp index 65d7c94783..b29680a1e1 100644 --- a/routing/routing_session.cpp +++ b/routing/routing_session.cpp @@ -28,8 +28,8 @@ int constexpr kOnRouteMissedCount = 10; // @TODO(vbykoianko) The distance should depend on the current speed. double constexpr kShowLanesDistInMeters = 500.; -// @todo(kshalnev) The distance may depend on the current speed. -double constexpr kShowPedestrianTurnInMeters = 5.; +// @TODO The distance may depend on the current speed. +double constexpr kShowPedestrianTurnInMeters = 20.0; double constexpr kRunawayDistanceSensitivityMeters = 0.01; @@ -415,12 +415,13 @@ void RoutingSession::GetRouteFollowingInfo(FollowingInfo & info) const info.m_lanes.clear(); } - // Pedestrian info + // Pedestrian info. m2::PointD pos; m_route->GetCurrentDirectionPoint(pos); info.m_pedestrianDirectionPos = mercator::ToLatLon(pos); - info.m_pedestrianTurn = - (distanceToTurnMeters < kShowPedestrianTurnInMeters) ? turn.m_pedestrianTurn : turns::PedestrianDirection::None; + info.m_pedestrianTurn = (distanceToTurnMeters < kShowPedestrianTurnInMeters) + ? turn.m_pedestrianTurn + : turns::PedestrianDirection::None; } double RoutingSession::GetCompletionPercent() const