Increase resolution of imported GPX

First of all, thanks for putting this app together. It’s exactly what I’m looking for - I need TrainingPeaks imports and Strava exports of structured workouts with a BIG HUD running on my tablet while I watch youtube on the big screen on the wall, without having to subsidize features I don’t like (gamification) and a racing league I’m not participating in.

I’ve been experimenting with importing routes into slope mode. Specifically, Alpe du Huez from RideWithGPS. I also have imported several Alpe du Zwift workouts that include power data from Zwift.

The imported workouts populate the workout editor at a resolution of one line per minute. This creates a reasonably decent facsimile of the route, tied to whatever my effort was for that workout. It mostly works, and I see the logic of it, but it’s not the ideal solution. I have to know my target time before I start, and I lose some of the slope detail, especially around the gloriously flatter hairpins.

Importing a TCX or GPX of just the route exported from RideWithGPS populates the workout editor with one line per KM. This is, frankly, not good enough for my needs. First, it completes a 10k warmup and the climb in about 37 minutes. I wish I was that fast.

Stretching out the interval times for the climb in the GPX import can get me to the +/- 70 minutes I usually need to complete the climb, but then all I have are a handful of 4.5 minute intervals of 7-11% grade - and my tired old legs need those flatter hairpins.

I feel like the ideal solution for the current workout builder would be to increase the resolution of the sample size during GPX import. I realize this is the most computationally expensive and therefore operationally costliest part of the operation. I’d be willing to pay an additional premium to do this on your machines. If that’s not possible, is there a tool I can use to convert GPX to the TrainerDay workout format locally? I know about gpsbabel, etc - but they don’t do any slope calculation.

Also, what is the maximum number of lines per workout?

The ultimate solution would be to import a GPX and build a logical model of the slope that is independent of interval time, the way Zwift does it. I suspect that would entail a lot of reengineering on the backend though.

Thanks for the compliment. I don’t see the conversion process as such a problem but yes the number of steps is a problem, people created workouts in the past with 4,000 steps or something and it all started to crash… There is no exact limit but different phones cause different problems and even fast phones have a problem with too many steps. I would guess 500 steps is ok.

So rather than increasing granularity if we just focused on mini slopes meaning if something is relatively the same slope and is 5km long we just create one step and bigger changes you create more steps. I would guess in many cases this might be enough but the logic to do this would be a bit temperamental for different routes.

So to be honest the guys are very busy and we have not had any requests like this but for sure the current solution was just the quick and dirty way. You sound very logical and I would say with ChatGPT and other LLMs these days a logical and determined person could create a python version of making this work and generate a Zwift ZWO file. I would not mind even providing a little help if you can get it mostly working but get stuck with some parts of it. I actually have done a lot of route analysis in Python and know GPT will generate almost everything you need. I am old programmer and GPT almost makes me a real programmer again :slight_smile:

Thanks for getting back to me, much appreciated. I will look into mini-slopes - I should be able to get numbers out of CalTopo for the segments and hairpins. I don’t know if I’ll have the uninterrupted time to sit down and hammer something out in python anytime soon though :frowning:

Some how this stuff sucks up a bunch of time so I fully understand. I estimate 4 hours and 4 days later I am in a deep hole trying to dig my way out :slight_smile: Good luck Yes so gpx with elevation, finding slopes and distances is easy, but then the hard parts are finding a good simplification algorythm and finally converting that to time which should factor in your CDA, total weight, FTP, average intensity level,… the math is all out there and I have done a bunch of it but this simplification is the part I don’t know how to do.