Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Gorbushin <m.gorbushin@corp.mail.ru>2018-09-10 14:24:35 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2018-09-17 12:49:53 +0300
commit48deff91e538716eaa06204167101eb48fe3bdbd (patch)
tree23726c83920ce805a62d876161ca11f6cb09695b /drape_frontend
parent5dff287f0dbd6960bdf2bd08918e560a512db604 (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.cpp8
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();