I am comparing two different ways of calculating a distance between two Points.
Haversine formula found on the page: http://www.movable-type.co.uk/scripts/latlong.html
The following functionality of the geotools library:
GeodeticCalculator geodeticCalculator = new GeodeticCalculator();
geodeticCalculator.setStartingGeographicPoint(lng1, lat1);
geodeticCalculator.setDestinationGeographicPoint(lng2, lat2);
double distance = geodeticCalculator.getOrthodromicDistance();
The result for two coordinates in a range of about 100 meter differs by about 3 meters. And for longer distances (some 1000 km) even more (some kilometers). But it is also hard to check which one is more precise since you don't have a reference that you can really trust. (Don't know for example if google maps is that precise)
Any idea?