Fix a small bug in lat computation in CheapRulerSingleton and update

according to latest master branch.
This commit is contained in:
Phyks (Lucas Verney) 2018-12-11 09:04:13 +01:00
parent 2591f22348
commit 1a2a1164f9
4 changed files with 8 additions and 9 deletions

View file

@ -29,7 +29,7 @@ public class OsmNodeNamedTest {
node.ilon = toOsmLon(2.334243);
node.ilat = toOsmLat(48.824017);
// Radius
node.radius = 30 / 110984.;
node.radius = 30;
// Check distance within radius is correctly computed if the segment passes through the center
lon1 = toOsmLon(2.332559);
@ -39,9 +39,9 @@ public class OsmNodeNamedTest {
double totalSegmentLength = CheapRulerSingleton.distance(lon1, lat1, lon2, lat2);
assertEquals(
"Works for segment aligned with the nogo center",
2 * node.radius * 110984.,
2 * node.radius,
node.distanceWithinRadius(lon1, lat1, lon2, lat2, totalSegmentLength),
0.01 * (2 * node.radius * 110984.)
0.01 * (2 * node.radius)
);
// Check distance within radius is correctly computed for a given circle