SamR1/FitTrackee

GPX speed and altitude track has incorrect units on x-axis when imperial

jat255 opened this issue · 2 comments

Noticed this today. Here's a plot of speed and elevation from a 3.766 mile walk I recorded:

image

The x-axis goes up to 6.06, which happens to be exactly the distance of the walk in kilometers, so it looks like it's not labeling correctly based on the user setting.

If I switch my profile to use metric units, everything looks good:

image

If I had to take a guess, I think this isn't working because of this line in workouts.ts: https://github.com/SamR1/FitTrackee/blob/master/fittrackee_client/src/utils/workouts.ts#L39; It looks like that rather than data.distance, it should be convertStatsDistance('km', data.distance, useImperialUnits), but this is just from inspecting the code, so I haven't tested that.

SamR1 commented

thanks for the issue and the PR.

SamR1 commented

released in v0.7.15