Improve distance formula to consider the Earth's ellipticity.