diff options
author | Mikhail Gorbushin <m.gorbushin@corp.mail.ru> | 2018-09-10 14:24:35 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <bykoianko@gmail.com> | 2018-09-17 12:49:53 +0300 |
commit | 48deff91e538716eaa06204167101eb48fe3bdbd (patch) | |
tree | 23726c83920ce805a62d876161ca11f6cb09695b /drape_frontend | |
parent | 5dff287f0dbd6960bdf2bd08918e560a512db604 (diff) |
[routing] add routing part of speed cameras and tests for it.
Diffstat (limited to 'drape_frontend')
-rw-r--r-- | drape_frontend/my_position_controller.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drape_frontend/my_position_controller.cpp b/drape_frontend/my_position_controller.cpp index 589b39a546..566ffac37a 100644 --- a/drape_frontend/my_position_controller.cpp +++ b/drape_frontend/my_position_controller.cpp @@ -413,11 +413,11 @@ void MyPositionController::OnLocationUpdate(location::GpsInfo const & info, bool m_errorRadius = rect.SizeX() * 0.5; m_horizontalAccuracy = info.m_horizontalAccuracy; - if (info.m_speed > 0.0) + if (info.m_speedMpS > 0.0) { double const mercatorPerMeter = m_errorRadius / info.m_horizontalAccuracy; - m_autoScale2d = mercatorPerMeter * CalculateZoomBySpeed(info.m_speed, false /* isPerspectiveAllowed */); - m_autoScale3d = mercatorPerMeter * CalculateZoomBySpeed(info.m_speed, true /* isPerspectiveAllowed */); + m_autoScale2d = mercatorPerMeter * CalculateZoomBySpeed(info.m_speedMpS, false /* isPerspectiveAllowed */); + m_autoScale3d = mercatorPerMeter * CalculateZoomBySpeed(info.m_speedMpS, true /* isPerspectiveAllowed */); } else { @@ -426,7 +426,7 @@ void MyPositionController::OnLocationUpdate(location::GpsInfo const & info, bool bool const hasBearing = info.HasBearing(); if ((isNavigable && hasBearing) || - (!isNavigable && hasBearing && info.HasSpeed() && info.m_speed > kMinSpeedThresholdMps)) + (!isNavigable && hasBearing && info.HasSpeed() && info.m_speedMpS > kMinSpeedThresholdMps)) { SetDirection(my::DegToRad(info.m_bearing)); m_lastGPSBearing.Reset(); |