librespeed / speedtest-go

Go backend for LibreSpeed
GNU Lesser General Public License v3.0
706 stars 153 forks source link

Distance calculation error #10

Closed mildis closed 3 years ago

mildis commented 3 years ago

Steps to reproduce

Expected behaviour

Computed distance from https://www.movable-type.co.uk/scripts/latlong.html is 8.551 km which is correct.

maddie commented 3 years ago

I can't reproduce this issue, I tried to use the values you've provided with the function in speedtest-go and https://github.com/umahmood/haversine, both give result 10 km (rounded to 5), and 8.55 km when not rounded.

mildis commented 3 years ago

I've just rebuild master (with haversine calculation) and I now have the correct result. Thanks.