Closed MaxScorpio closed 3 years ago
Hmmm, I looked into this briefly today, but no real ideas yet. The TCX file that gets generated does not actually have Total Work anywhere in the data. That appears to be calculated on the fly by Garmin. Here's a snippet of the "summary" fields that are captured in the TCX file.
<TotalTimeSeconds>1800</TotalTimeSeconds>
<DistanceMeters>11973.5</DistanceMeters>
<MaximumSpeed>8.225515555555555</MaximumSpeed>
<Calories>249</Calories>
<AverageHeartRateBpm><Value>141</Value></AverageHeartRateBpm>
<MaximumHeartRateBpm><Value>165</Value></MaximumHeartRateBpm>
<activityExtensions:AvgSpeed>6.660879444444445</activityExtensions:AvgSpeed>
<activityExtensions:MaxBikeCadence>123</activityExtensions:MaxBikeCadence>
<activityExtensions:AvgWatts>84</activityExtensions:AvgWatts>
<activityExtensions:MaxWatts>135</activityExtensions:MaxWatts>
While the Peloton API does expose Total Work in the data, the Garmin TCX specification does not seem to have a field we can use to capture Total Work. That could make it tricky to fix this if there is no way for us to send that data field in the TCX file.
Now what's really interesting, is that I also have a ride from this past Monday using the latest version of this script and my total work looks consistent across Peloton and Garmin. So I'm not sure yet what could be causing a discrepancy in your case.
Thanks for looking into this!
I had this happen twice to me in a row and then the last 3 rides have been fine. The two rides I had this issue were a 60 minute and 45 minute ride. My recent 30, 20, and 15 minute rides have had the correct Work. I was starting to think it was an issue with longer rides, but your ride posted was 45 minutes and perfectly fine.
Recent 60 minute ride
Recent 30 minute ride
On Peloton, do you happen to see this message under the HR graph? And is it also present on workouts where the Total Work does match?
Today my Total Work was slightly off, and I noticed this message for the first time. Wondering if the missing 6 seconds could be a factor. Today my total work was off by 4kj.
Hello,
My 60 min Power Zone Endurance Ride with MATT WILPERS has a very small part of the class missing (see below)
However, my 45 min Power Zone Ride with DENIS MORTON does not have any part of the class missing.
Both of these classes were off from a total work amount.
Hello again,
I just had another case of the total work numbers being wildly off. I'm not sure if this is an issue with older classes (this one was from Sat 20/4/19. I haven't had this issue since I last posted. Seems very intermittent.
Here is a pic of the metrics from the class.
Here is a pic of what was uploaded to Garmin.
Thanks for the extra data! This bug has been sitting at the back of my mind, but I'm still struggling to come up with a theory on the root cause, especially given how intermittent it is.
I've merged a tweak that I think may resolve this issue by explicitly setting the TotalWork value in the TCX file to match what Peloton publishes.
However, please feel free to re-open this issue if you see the discrepancy again on the latest code.
Hi, I've noticed on my last few rides that the total work is not uploading correctly to Garmin. I'm not sure if it is just me or others are having this problem. I had this problem a few months ago and updating to the latest version seemed to fix the issue, but it started occurring again in the last week.
Here is an example of my ride. https://connect.garmin.com/modern/activity/embed/5637509450
Here you can see the total work as 358 kJ but the ride should actually be 394 kJ according to the Peloton bike. If you do the math, an average power of 146W would be 394 kJ as well.