Improve the accuracy of auto-captured place visits #327
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.
What has changed
This patch introduces a dynamic auto-capture vicinity threshold based on the accuracy of the coordinates. Auto-capture is now skipped if the coordinate accuracy is greater than 50 meters. Additionally, the place is corrected before checking for recency.
Why it was changed
These changes were implemented to improve the accuracy and efficiency of auto-capture (#313). The previous fixed threshold did not account for coordinate accuracy, potentially leading to duplicate moments being captured. By dynamically adjusting the threshold, we ensure that auto-capture is triggered only when the user is in close proximity to a known place. Correcting the place before the recency check ensures that the appropriate place is used in that check, further enhancing accuracy.