Which is better for calculating the distance between two latitude/longitude points, The Haversine Formula or The Vincenty's Formula? Why?


The distance is obviously being calculated on Earth. Does WGS84 vs GCJ02 coordinates impact the calculation or distance (The Vincenty's formula takes the WGS84 axis into consideration)?


The Haversine Formula is used in [Google Map Utils](https://github.com/googlemaps/android-maps-utils), but the Vincenty Formula is used by the android.Location object (Location.distanceBetween()).



Is the Haversine Formula or the Vincenty's Formula better for calculating distance?
The [haversine formula](https://en.wikipedia.org/wiki/Haversine_formula) [no capital, [haversine](https://en.wikipedia.org/wiki/Versine#Haversine) = "halve versed sine" is not the name of a person] calculates the distance between longitude/latitude points assuming a spherical earth. [Vincenty's formula](https://en.wikipedia.org/wiki/Vincenty%27s_formulae) takes into account that the earth is not perfectly spherical, by calculating the ellipsoidal distance between two points on the surface of a spheroid. [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System#A_new_World_Geodetic_System:_WGS_84) refers to a model for the ellipsoidal earth, [GCJ-02](https://en.wikipedia.org/wiki/Restrictions_on_geographic_data_in_China#GCJ-02) is a (crippled) Chinese implementation of the same model. The error made by the spherical earth formula is at most 100 km, for the largest distances. Here you can find a [comparison](http://www.r-bloggers.com/great-circle-distance-calculations-in-r/) of the two formulas for a selection of points on earth.


