Add minimum GPS accuracy preference for logging #670
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.
Introduces a new user preference to set the minimum required GPS accuracy before starting to record track points. Updates the GPSLogger service to wait until the specified accuracy is achieved, and adds relevant UI strings and preference entry.
📝 Feat: Settings: minimum GPS accuracy to start recording track
🛠️ Issue
🛠️ Related issues (if applicable)
📖 Description
This PR introduces a new user preference to set the minimum required GPS accuracy before starting to record track points.
Changes:
Preferences UI: Added a new EditTextPreference in the GPS Settings menu (prefs_gps_min_accuracy) allowing users to input a value in meters (e.g., 10). Default is 0 (disabled).
Logic Implementation: Updated GPSLogger.java to read this preference.
Strings: Added necessary string resources for the new setting.
Rationale: This prevents the recording of widely inaccurate points (jumping) that often occur immediately after starting the GPS, significantly improving the quality of the track's start, especially for vertical distance computation.
🖼️ Screenshots (if applicable)
✅ Pull Request Checklist
📝 Additional Notes
The logic ensures that we only wait once at the beginning. If the GPS accuracy degrades later (e.g., entering a tunnel), the recording continues uninterrupted to avoid gaps in the track, satisfying the requirement to "wait before starting".