Extract workouts from activity FIT files

I have added support for importing fit file workouts with nested loops. Didn’t know you could do that! The inner loop(s) are unrolled:

- Warmup 20m 50-68% power=3s

3x
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 5m 41-59% power=3s

- Cooldown 15m 41-59% power=3s

Hi David,

Any progress on this one?

Tks

Hi David, thanks, however Garmin actually executed the workout a little differently. The workout was 65 minutes vs 76 because the repeated intervals steps were 4 work with 3 recovery vs 4 work with 4 recovery ("||||" vs "||||_") and likewise with the recovery between the sets. Here’s the full workout as done:

- Warmup 20m 50-68% power=3s

- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 5m 41-59% power=3s

- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 5m 41-59% power=3s

- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s
- 2m 0-59% power=3s
- 0m10s 225-246% power=3s

- Cooldown 15m 41-59% power=3s

Hmm. I wonder what the rule is for that? If recovery step is before cool down then leave it out. I am inclined to leave things as they are without knowing exactly how Garmin are deciding that. 5m recovery before 15m cool down doesn’t really make any difference to the workout.

It seems to me that it’s always the last recovery or rest step for anything repeated, and nested, too. For example, sprint + recover x 4 is translated into 7 vs 8 steps. Likewise, the last recovery between sets is also dropped. This has held true for all the riding and running workout I’ve seen from Garmin, fwiw. It seems like the recovery or rest step is there as long as there’s another of what came before following.

I don’t seem to have the Extract Workout option for a TrainerDay workout synced via Dropbox. Does this work for TrainerDay. Also, if i have previously selected to automatically try to extract workouts, can i turn this off again somewhere?

That should be a question to TD if they store the workout data inside. (Not all app does it)

1 Like

Good point. I’ll ask them

Though… i am not even getting the option in the Action menu to try and extract a workout. Would you expect that?

I just had a look at your most recent indoor ride and extract workout is in the menu. It comes from Garmin Connect and is a FIT file:

This ride from yesterday is from Dropbox and is a TCX file. Those do not contain workouts so the menu option is not present. I should probably keep the menu option and display a message explaining why it won’t work.

Thanks David. The Dropbox file is the one concerned from TrainerDay. I’ll check with Alex why they send a TCX file rather than a FIT file

@david, Alex’s reply seems to say he can send FIT files to Dropbox rather than TCX, but that won’t by default provide the necessary information to allow Intervals to extract the workout structure I believe.

Can you share what is required at his end to get the workout steps into the FIT file? I can pass it on, or you could do it directly.

I have sent him a mail. Tx.

1 Like

Ok David and I chatted, now I understand this is really only something we can do (not him) and it’s a bigger task then just writing the FIT files to dropbox because we don’t put this planned workout info in the fit file at this point making this an even bigger task so less likely to happen any time soon. But really if you have the workout in our calendar with calendar sync to intervals or you have it on intervals calendar as planned WOD then you have this workout anyway. If you just want to select from your workout list in our app, you could just first send it to your calendar for today and then ride from the calendar.

2 Likes

Good point!

1 Like