Remove latitude rounding in yToLat
This commit is contained in:
parent
73a608895a
commit
3bbd3a8a65
@ -18,5 +18,5 @@ Feature: Geometry Compression
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | distance | speed |
|
| from | to | route | distance | speed |
|
||||||
| b | e | abcdef,abcdef | 589m | 36 km/h |
|
| b | e | abcdef,abcdef | 588.8m | 36 km/h |
|
||||||
| e | b | abcdef,abcdef | 589m | 36 km/h |
|
| e | b | abcdef,abcdef | 588.8m | 36 km/h |
|
||||||
|
@ -118,4 +118,4 @@ Feature: Basic Map Matching
|
|||||||
When I match I should get
|
When I match I should get
|
||||||
| trace | matchings | annotation |
|
| 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 |
|
| 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 |
|
||||||
|
@ -35,7 +35,7 @@ inline FloatLatitude yToLat(const double y)
|
|||||||
const double normalized_lat =
|
const double normalized_lat =
|
||||||
detail::RAD_TO_DEGREE * 2. * std::atan(std::exp(clamped_y * detail::DEGREE_TO_RAD));
|
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)
|
inline double latToY(const FloatLatitude latitude)
|
||||||
|
Loading…
Reference in New Issue
Block a user