librespeed/speedtest-go

Distance calculation error

Closed this issue · 2 comments

Steps to reproduce

  • According to ipinfo.io, client is at "loc": "48.9526,2.1452",
  • Server is configured at server_lat=48.87773 server_lng=2.17191
  • distance displayed is 5450 km

Expected behaviour

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

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.

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