Question: haversine distance algorithm
Hi,
Looking at the code, it seems the haversine algorithm used in [0] is faster (On My Machine) than the offical algorithm used in [1]. Is there reason it's not the official algorithm? Are there accuracy issues?
[0] https://github.com/uber/h3/blob/6c3c806ffbec16d32013bfa80ceec43b4c7513be/examples/distance.c#L39 [1] https://github.com/uber/h3/blob/6c3c806ffbec16d32013bfa80ceec43b4c7513be/src/h3lib/lib/geoCoord.c#L151
Thanks!
Interesting! I removed [0] because I couldn't find any references for the formula.
I tested two alternatives described here: https://www.movable-type.co.uk/scripts/latlong.html We ended up with the "Haversine" formula [1] on that page.
I recall doing some benchmarking, but not seeing any speed difference between the two, at least on my mac.
How are you doing your benchmarking?