-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
mavextra: error in distance estimation #635
Comments
For example, this works:
|
@gitdillo yes that an error. The function is unsafe on lat/long wraping too. |
Hello Pierre, I don't really know how to do that, if you know, could you
please do it?
…On Fri, 25 Feb 2022 at 09:46, Pierre Kancir ***@***.***> wrote:
@gitdillo <https://github.com/gitdillo> yes that an error. The function
is unsafe on lat/long wraping too.
Could you make a PR to update it like
https://github.com/ArduPilot/MAVProxy/blob/d43ee6396f3b38d2c2049adc86ccd65b9b661250/MAVProxy/modules/lib/mp_util.py#L42
and maybe put a comment to this function on mavproxy that is more
maintained ?
—
Reply to this email directly, view it on GitHub
<#635 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE27GWCZWOCBXQUS4BJII3U446VTANCNFSM5OMLHWGA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
I think there is an error in distance estimation in mavextra's distance_lat_lon().
Specifically, latitude and longitude are converted to radians only when taking their difference:
but then the code mixes up radians and degrees when using the difference (in radians) or the actual values (in degrees), i.e.:
In the bit above, dLat and dLon are in radians while lat1, lat2 are in degrees.
Ideally, the conversion should happen to the inputs immediately, as it happens for example in distance_from().
The text was updated successfully, but these errors were encountered: