SamR1 / FitTrackee

Self-hosted outdoor activity tracker :bicyclist:
https://samr1.github.io/FitTrackee
GNU Affero General Public License v3.0
642 stars 38 forks source link

Improve speed display (chart vs max speed) #48

Open SamR1 opened 4 years ago

SamR1 commented 4 years ago

Max speed is calculated by gpxpy, which removes GPS errors by excluding extreme values.

Chart displays data from gpx without any cleaning, so some points exceed calculated max speed.
Example: snapshot

Note: FitTrackee uses an old version of gpxpy (1.3.4, see #35).

gorgobacka commented 2 years ago

Without knowing anything about your shown ride. I think there is an additional issue here.

The peak around 0.78 km is likely to be wrong and I agree that this is not the max speed. But what about the long period between 10 and 11 km? This looks very naturally. (See also the discussion here: https://github.com/tkrajina/gpxpy/issues/137 )

Would be better to use the raw data for max speed and close this issue? (or as user option)

If you still want to use a calculated max speed, maybe draw the line above the value in a different color (e.g. in a discreet red).

SamR1 commented 2 years ago

I agree, the part between 10 and 11km looks correct since it matches a downhill (it was mountain biking).

Max speed returned by gpxpy is used to calculated records. So to avoid unreliable records, for now I keep calculated max speed by gpxpy. But I agree it's not the best solution.

Ideally I would like to display raw speed and let the user edit data to remove invalid points (#7). But it needs to refactor gpx file processing first (#194).

In the meantime, I can indeed add a preference to let user choose if he wants raw speed instead of calculated one since the last version of gpxpy allows it. (the line on the screenshot was just to illustrate the difference between the raw data and the calculated maximum speed)

jat255 commented 1 year ago

In the meantime, I can indeed add a preference to let user choose if he wants raw speed instead of calculated one since the last version of gpxpy allows it.

I think this is a good short term fix. In my case, my GPS devices seem to be doing a pretty good job (and since I'm loading them via Strava, I think Strava does some filtering on their end as well).

As a part of this, it could be handy to have a script or tool that would "reprocess" existing GPX files with the new setting (to properly reset any records, for example). I could probably whip up something to do that as a helper script.

For another instance of the problem, here's an example of a ride I did recently where I got up to 40+mph, which is shown in the plot:

image

But the max speed gets filtered down to ~18 mph, which is pretty disappointing (I like seeing that I went fast! :smile: ), but also makes the "records" tool not super useful in my case:

image