Haversine formula for position distance