diff --git a/features/testbot/compression.feature b/features/testbot/compression.feature index 79823ceed..4569b4caa 100644 --- a/features/testbot/compression.feature +++ b/features/testbot/compression.feature @@ -18,5 +18,5 @@ Feature: Geometry Compression When I route I should get | from | to | route | distance | speed | - | b | e | abcdef,abcdef | 589m | 36 km/h | - | e | b | abcdef,abcdef | 589m | 36 km/h | + | b | e | abcdef,abcdef | 588.8m | 36 km/h | + | e | b | abcdef,abcdef | 588.8m | 36 km/h | diff --git a/features/testbot/matching.feature b/features/testbot/matching.feature index a7991d49e..f5337fd4f 100644 --- a/features/testbot/matching.feature +++ b/features/testbot/matching.feature @@ -118,4 +118,4 @@ Feature: Basic Map Matching When I match I should get | trace | matchings | annotation | | abeh | abcedgh | 1:9.897633,0:0,1:10.008842,1:10.008842,1:10.008842,0:0,2:20.017685,1:10.008842 | - | abci | abc,ci | 1:9.897633,0:0,1:10.008842,0:0.111209,1:10.121593 | + | abci | abc,ci | 1:9.897633,0:0,1:10.008842,0:0.111209,1:10.010367 | diff --git a/include/util/web_mercator.hpp b/include/util/web_mercator.hpp index a2bea88d1..89e08e4ec 100644 --- a/include/util/web_mercator.hpp +++ b/include/util/web_mercator.hpp @@ -35,7 +35,7 @@ inline FloatLatitude yToLat(const double y) const double normalized_lat = detail::RAD_TO_DEGREE * 2. * std::atan(std::exp(clamped_y * detail::DEGREE_TO_RAD)); - return FloatLatitude(std::round(normalized_lat * COORDINATE_PRECISION) / COORDINATE_PRECISION - 90.); + return FloatLatitude(normalized_lat - 90.); } inline double latToY(const FloatLatitude latitude)