FAQ: How to Auto Generate Laps based on Power changes

A place for the community to help each other out with getting the most out of the Add Time Stamps to FIT, TCX, or GPX Files Tool.
Post Reply
User avatar
fulmar2
Site Admin
Posts: 367
Joined: Wed Nov 25, 2020 4:21 am
Contact:

FAQ: How to Auto Generate Laps based on Power changes

Post by fulmar2 »

A user approached me about structured workouts he had been doing on a Peloton trainer - where he forgot to push the lap key to isolate the different intervals. There have been other people who have alluded to needing this feature, so I added an "auto lap" feature where users can insert laps automatically after the fact. The auto lap feature can be found here:

How to automatically insert laps into your GPS activity file
How to automatically insert laps into your GPS activity file
Screenshot 2025-09-09 at 7.11.55 AM.png (24.16 KiB) Viewed 1673 times

There are two "standard" ways to add laps automatically - by distance and by time. Likely those don't need an explanation. The new "cool" feature is the "auto lap by power inflection" option. Here is a screenshot of what the user's input looks like

An example of a structured interval workout with significant power inflections, but no laps added.
An example of a structured interval workout with significant power inflections, but no laps added.

If you select the auto lap option (above), you can then choose "By Power Inflection" from the dropdown in the new window that pops us. There will be some default values that are pre-populated.. and I think that these values ought to capture most standard structured interval workout power inflections. You're free to edit these values to capture the laps in your particular workout.

This is the settings page where you can configure the parameters that will add laps to your GPS activity
This is the settings page where you can configure the parameters that will add laps to your GPS activity

Min Δ Power (W)
In this box, you need to enter the minimum threshold for a change in power for the position to be considered for a lap key press. Power tends to jump around a lot, and most intervals have a significantly higher power than the refractory period. Essentially, this value is to make sure that prolonged small spikes don't get counted as laps. The default value is 40 W.

Smoothing Window (s)
Again, power tends to be jumpy. So, just to make sure that we are not accidentally inserting laps, the tool lets you specify how many seconds to smooth the data. So, if you set this to the default value of 5 s, that means that the tool will not look at the individual points, but instead examine the average of 5 seconds of data. It's a moving average, so it examines the surrounding points as it iterates through your entire file.

Min Hold (s)
If your intervals are 30 seconds, you're not going to want to accidentally capture an inflection that is only 20 seconds long; that would certainly not be a lap. With the file above (notice how neat and clean the intervals are), you don't need to be too strict. If your intervals are not as perfect as these holds, you might want to make the min hold a little longer and the Min Δ Power a little smaller. The default value is 10s.

Refractory (s)
This is the inverse of the Min Hold above. It tells the tool approximately how long your rests between intervals are. This ensures that we don't automatically capture a new interval during a rest period. The default value is 30 s

Now you can see the laps (gray bars on Strava).
Now you can see the laps (gray bars on Strava).


I hope you enjoy this new feature!
Post Reply