diff --git a/map/extrapolation/extrapolator.cpp b/map/extrapolation/extrapolator.cpp index 4fb3d80303..cf15f635c9 100644 --- a/map/extrapolation/extrapolator.cpp +++ b/map/extrapolation/extrapolator.cpp @@ -15,8 +15,8 @@ namespace // If the difference of values between two instances of GpsInfo is greater // than the appropriate constant below the extrapolator will be switched off for // these two instances of GpsInfo. -double constexpr kMaxExtrapolationSpeedMPS = 85.0; -double constexpr kMaxExtrapolationDistMeters = 120.0; +double constexpr kMaxExtrapolationSpeedMPS = 75.0; +double constexpr kMaxExtrapolationDistMeters = 100.0; double constexpr kMaxExtrapolationTimeSeconds = 2.1; class LinearExtrapolator @@ -63,12 +63,6 @@ location::GpsInfo LinearExtrapolation(location::GpsInfo const & gpsInfo1, e.Extrapolate(gpsInfo1.m_horizontalAccuracy, gpsInfo2.m_horizontalAccuracy); result.m_altitude = e.Extrapolate(gpsInfo1.m_altitude, gpsInfo2.m_altitude); - if (gpsInfo1.HasVerticalAccuracy() && gpsInfo2.HasVerticalAccuracy()) - { - result.m_verticalAccuracy = - e.Extrapolate(gpsInfo1.m_verticalAccuracy, gpsInfo2.m_verticalAccuracy); - } - // @TODO(bykoianko) Now |result.m_bearing| == |gpsInfo2.m_bearing|. // In case of |gpsInfo1.HasBearing() && gpsInfo2.HasBearing() == true| // consider finding an average value between |gpsInfo1.m_bearing| and |gpsInfo2.m_bearing| diff --git a/map/extrapolation/extrapolator.hpp b/map/extrapolation/extrapolator.hpp index 0eeba5d148..4ae20fe2fb 100644 --- a/map/extrapolation/extrapolator.hpp +++ b/map/extrapolation/extrapolator.hpp @@ -38,7 +38,7 @@ public: // |kMaxExtrapolationTimeMs| is time in milliseconds showing how long location will be // extrapolated after last location gotten from GPS. - static uint64_t constexpr kMaxExtrapolationTimeMs = 1000; + static uint64_t constexpr kMaxExtrapolationTimeMs = 2000; // |kExtrapolationPeriodMs| is time in milliseconds showing how often location will be // extrapolated. So if the last location was obtained from GPS at time X the next location // will be emulated by Extrapolator at time X + kExtrapolationPeriodMs. diff --git a/map/extrapolation_benchmark/extrapolation_benchmark.cpp b/map/extrapolation_benchmark/extrapolation_benchmark.cpp index 117eaf05d3..9d58eba729 100644 --- a/map/extrapolation_benchmark/extrapolation_benchmark.cpp +++ b/map/extrapolation_benchmark/extrapolation_benchmark.cpp @@ -276,6 +276,7 @@ int main(int argc, char * argv[]) auto const & iter = followedPoly.GetClosestProjectionInInterval( posSquare, [&extrapolatedMerc](FollowedPolyline::Iter const & it) { + ASSERT(it.IsValid(), ()); return MercatorBounds::DistanceOnEarth(it.m_pt, extrapolatedMerc); }, 0 /* start segment index */, followedPoly.GetPolyline().GetSize() - 1);