Add location accuracy#4414
Draft
iandolge wants to merge 2 commits into
Draft
Conversation
Contributor
Author
|
@freakboy3742 I think I'm settled on the implementation but I still need to go through and update tests beyond the core tests and check things out. I know the naming remains awkward and the altitude now exists in two spots, any feedback would be welcome. |
Member
freakboy3742
left a comment
There was a problem hiding this comment.
I think the main issue here is that the data types we've got here aren't what we need (and that's historical - not something you've introduced). We've separated LatLng from altitude - and that complicates everything we're doing, and ends up with us trying to cram altitude into a LatLng sized hole.
I'm wondering if the solution here is to:
- Rename the
LatLngstructure to something likeGeoPositionthat includes accuracy and altitude components - Modify the
on_changehandler to returnposition,locationandaltitude - Formally deprecate the
locationandaltitudearguments toon_change(and raise warnings when anon_changehandler is set by inspecting the handler that is provided
Does that makes sense?
Contributor
Author
|
I think that makes sense! I'll make another round of updates this weekend. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add altitude and accuracy figures to the LatLon class
This changes the LatLon class to include extra attributes but maintains that this class is comparable to a tuple of (lat, lng). See core/tests/test_types.py for the contract. Each platform that supports location has been modified to populate these values.
Makes accuracy information available for macOS, iOS, Android, and Linux(GTK)
Fixes #3112
PR Checklist:
Assisted-by: