Add user preference for filtering of GPX speed data #358
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.
This PR partially addresses #48 (although it's not perfect).
Basically, it adds a new user preference (
use_raw_gpx_speed
) that instructs FitTrackee to passraw=True
to gpxpy'sget_moving_data
method when parsing a GPX file. It works as advertised, but it's not really a perfect solution. Perhaps a better/more flexible solution would be to add a preference that gets passed to that method'sspeed_extreemes_percentiles
parameter, which would allow for tuning of the behavior (including setting it to 0, which would be the same asraw=True
). I could do it that way if it's better.Ultimately, this seems (to me) a limitation of how
gpxpy
implements filtering, which is to calculate all the speeds for the GPX file as-is and then discard some percentage of the top ones. Other GPS applications appear to eliminate actual GPS outlier points (see this part of GPXSee for example)I added translations for the new user preference strings, but they're just from google translate, so they could probably use some review.
Here's what the preference setting looks like: