Merge pull request #2408 from oxidase/master

Remove latitude rounding in yToLat
This commit is contained in:
Patrick Niklaus 2016-05-16 17:04:49 +02:00
commit 6ed9be31ca
3 changed files with 4 additions and 4 deletions

View File

@ -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 |

View File

@ -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 |

View File

@ -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)