Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve geodesy calculations and test coverage. #244

Merged
merged 12 commits into from
Nov 23, 2019

Conversation

halmueller
Copy link
Collaborator

@halmueller halmueller commented Nov 21, 2019

Background

The underlying formula in coordinateWithBearing(bearing:distanceMeters:) used incorrect logic for determining the radius of the earth at the given latitude, so that function returned slightly incorrect results. This PR addresses that error, and adds unit test coverage for that function and its supporting functions.

I believe that the implementations of translatedLocation(with:) and translation() are still not quite right. I've added the most basic test coverage possible, with an enormous accuracy bound, but these two functions need some analysis. I'll open a separate issue for that, but will move on for the time being, since they seem to work ok in the field.

Resolves issue #239 (the accuracy part, not the Google Maps suggestion).

Breaking Changes

Any use of coordinateWithBearing(bearing:distanceMeters:), or of translatedLocation(with:), will see slightly different results.

Meta

  • Tied to Version Release(s):

PR Checklist

  • CI runs clean?
  • Appropriate label has been added to this PR (i.e., Bug, Enhancement, etc.).
  • Documentation has been added to all open, and public scoped methods and properties.
  • Changelog has been updated
  • Tests have have been added to all new features. (not a requirement, but helpful)
  • Image/GIFs have been added for all UI related changed.

@halmueller halmueller added the bug label Nov 21, 2019
Copy link
Collaborator

@Pilot-Marc Pilot-Marc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accuracy is immensely improved. I like the idea of a second pair of eyes on this, but I approve.

@halmueller halmueller merged commit 1134549 into AndrewHartAR:develop Nov 23, 2019
@halmueller halmueller deleted the geodesy branch November 25, 2019 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants