Use linear distance instead of haversine function