Haversine formula with php
The formula you used, seems to be the arccosine instead of the haversine formula. The haversine formula is indeed more appropriate to calculate the distance on a sphere, because it is less prone to rounding errors. /** * Calculates the great-circle distance between two points, with * the Haversine formula. * @param float $latitudeFrom Latitude … Read more