diff --git a/OsmAnd-java/src/net/osmand/Location.java b/OsmAnd-java/src/net/osmand/Location.java index 6d4c2bfe72..70b96d3854 100644 --- a/OsmAnd-java/src/net/osmand/Location.java +++ b/OsmAnd-java/src/net/osmand/Location.java @@ -109,12 +109,11 @@ public class Location { mAccuracy = 0; } - private static void computeDistanceAndBearing(double lat1, double lon1, double lat2, double lon2, float[] results) { // Based on http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf // using the "Inverse Formula" (section 4) - + float osmandDist = (float) (net.osmand.util.MapUtils.getDistance(lat1, lon1, lat2, lon2)); int MAXITERS = 20; // Convert lat/long to radians lat1 *= Math.PI / 180.0; @@ -209,8 +208,8 @@ public class Location { results[2] = finalBearing; } } - // TODO leave only for 4.2.1 !!! - results[0] = (float) (net.osmand.util.MapUtils.getDistance(lat1, lon1, lat2, lon2)); + // Should we leave only for 4.2.1? Or keep consistent for all devices? + results[0] = osmandDist; } /**