calculates the distance between two points, in longitude and latitude