thomaschampagne / elevate

A sport app to "Elevate" your training experience and goals! Track your fitness and progressions over time. Analyse deeper your activities. And more...
https://thomaschampagne.github.io/elevate-docs/
Mozilla Public License 2.0
1.28k stars 175 forks source link

[Desktop][Web-Ext][Bug] Swimming Stress Score differs between web, desktop, and trainingpeaks #1160

Open chrisfosterelli opened 1 year ago

chrisfosterelli commented 1 year ago

⚠ BEFORE ANYTHING: Are you in the right place?

This is potentially related or dupe of https://github.com/thomaschampagne/elevate/issues/1116 but I don't have crazy high stress scores as in that issue and my issue is more generally about the mismatch rather than a specific value.

Describe the bug Swimming stress scores do not match between elevate web, elevate desktop, or training peaks for the same activities with the same athlete settings.

For example, here are my swims from this week:

Activity Elevate Web SwimSS Elevate Desktop SSS Trainingpeaks sTSS
Mar 25 2023 48 63 57
Mar 23 2023 37 60 51
Mar 21 2023 36 61 51

The issue appears to apply to all of my swimming workouts (this is just an example of this week). At least they appear to trend the same way which is nice, but they don't appear to match.

My threshold is set to 1:29/100m in Trainingpeaks:

image

as well as in elevate:

image

Athlete settings were directly imported from elevate web to elevate desktop, so they should match. I haven't changed my swim threshold since late last year.

To Reproduce Steps to reproduce the behavior:

  1. Record a swim activity
  2. Upload swim activity to strava
  3. Sync activity to trainingpeaks and elevate
  4. Review SwimSS column under the "Fitness analysis table" of elevate web
  5. Review SSS field under the activity details of elevate desktop
  6. Review sTSS field under the activity details in trainingpeaks
  7. Observe that the values do not match

Expected behavior The user documentation says that SSS is equivalent to sTSS® from TrainingPeaks™, so since they are intended to be equivalent calculations I would expect that the values for equivalent workouts would also have equivalent values.

Screenshots Screenshots show Mar 25 example in all three applications:

image

image

image

Environment

Additional context My weight may differ slightly between training peaks and elevate web / desktop since trainingpeaks syncs with my scale daily and elevate I only update when I get a chance. Not sure if this has an effect. For Mar 25 I'm 65.5kg in trainingpeaks but 64.8kg in elevate so the fact that elevate had a higher stress score but lower weight makes me think weight is not the driving factor of error.

chrisfosterelli commented 1 year ago

The part that makes me suspect this is related to #1116 with the rests or interval treatment at least in some way is that, while I don't have a very high max pace entry for rest intervals, the one workout I did a couple weeks back that had no rests had an almost exact match across all three apps (67 sTSS in training peaks, 67 SwimSS in elevate web, 68 in elevate desktop)

chrisfosterelli commented 1 year ago

Ahhh some additional insight to note: the reason that Elevate Desktop and Elevate Web differ is because of the connector used.

For Elevate Desktop, I used the "speed up first synchronization" guidelines which involves downloading an export from Strava and then pointing it at the directory. Elevate Desktop comes up with different swim stress score values using the file connector than the Strava connector. For unrelated reasons (I use elevation correction on a lot of activities and the file connector ignores Strava's elevation correction) I wiped Elevate Desktop and did a full sync via the Strava connector. When I do this, I noticed that Elevate Desktop and Elevate Web now have (almost) the exact same swim stress score values. In some cases they differ by 1 which is maybe a rounding issue.

This is nice to know but actually a little less than ideal since Elevate Web SwimSS seems to differ more from TrainingPeaks than Elevate Desktop's SSS from the file connector did.

I'm happy to provide any strava JSON or workout files that might help with debugging here. It definitely does seem that files with more or longer rests are wider apart in the result so I think that it is likely interval / rest related.

chrisfosterelli commented 1 year ago

I had one today with a very significant difference. Training peaks came in at 44 sTSS but Elevate only has it at 13 SSS. Attached is the original workout file.

11031553936.zip

chrisfosterelli commented 1 year ago

I believe the issue is that Elevate is erroneously using the total time rather than the moving time. This swim had a total time of 56:24 but lots of rests -- the moving time was 30:08. Training peaks says that TSS should be calculated ignoring rest time.

image

chrisfosterelli commented 1 year ago

BTW I have compared this to intervals.icu and it appears to calculate it correctly (i.e. like trainingpeaks does)