Calculates distance between two points on the surface of a spherical environment