manuelbieh / geolib

Zero dependency library to provide some basic geo functions
MIT License
4.21k stars 341 forks source link

Avoid using a hard coded earth radius in compute destination point #296

Open nacho-skydweller opened 1 year ago

nacho-skydweller commented 1 year ago

This should solve #290

manuelbieh commented 1 year ago

Thanks for your PR!

For some reason the CI fails now: https://app.circleci.com/pipelines/github/manuelbieh/geolib/230/workflows/7f61d9ec-a609-4b96-a02c-fec145178b95/jobs/524

Could you please have a look and check if it's your change that's causing these failed tests? Doesn't really make sense to me but it worked before.

manuelbieh commented 1 year ago

Ok, it does make sense because we have earth radius 6378137 vs. 6371000. So this is technically a breaking change.

nacho-skydweller commented 1 year ago

Indeed, it most certainly is because the tests on computeDestinationPoint are based on that hard coded value of the earth radius. To me it would make sense to use the same value of earth radius across functions, if you agree I can update the tests.

nacho-skydweller commented 1 year ago

@manuelbieh just pushed a commit to fix the tests!