[request] Stop sending speed data to strava

IMHO, this is the only sane choice. Some people hate sending the data, some people wouldn’t want to live without it… TR really can’t choose a single path and keep even “most people” happy.

1 Like

@taccca very nice. From a quick review the math looks good. The tricky bit is solving for v. Its much easier to calculate how much power is required to travel at a certain velocity - going the other way where you have a v cubed term makes for the ugly equation. If you want to play with some python - here’s the full equation if you don’t assume you’re riding on a road with 0% grade:

Also yes I considered computing the overall speed and distance by taking some rolling average (to smooth out power spikes etc.) you can do that with the code I posted - instead of taking the average once you read in the FIT file, compute the speed for each time stamp then take the average of those.

1 Like

For everyone who likes it the way it is – you might be lucky that you can use your preferred trainer in a gear similar to what you’d ride outside. However on some smart trainers the floor (how low they’ll go) doesn’t match someones preferred gear selection – so they have to use a lower gear ratio. This can result in unrealistically low speeds / distances being reported.

If TR used a simple physics model it wouldn’t matter what gear ratio folks used. No one would be required to do testing to find the perfect gear combination in order to get realistic speeds / distances.

Also, you can easily adjust for people’s preferences by just letting them set their own CdA. Start with a default in the settings, but if someone really wants to get an ego number, or if they would normally be on on TT bike all the time and know their CdA is a superhuman Johnathan level 0.200 (or was it 0.190?) - then they can over ride the default.

Voila. This isn’t zwift – we aren’t racing each other so it doesn’t matter if you really want to set your own custom CdA in the settings. However, it could actually be useful if you have done some TT position testing (Chung method or the track testing the TR guys did) and would like to get an idea of how fast or far you would have ridden while in aero position. Think of all the folks on the 40K TT plan, or for next season when everyone at TR becomes triathletes.

And for folks who are going to say you can’t make people put in a CdA it will confuse them or be too complicated… 1) By default no one would have to – just pick a middle of the road value like 0.321 – 0.324 for riding on the hoods, this alone would be much better than just hoping that the gear you happen to use matches what you’d do a full ride in outside. 2) We already have everyone put in their weight (which is used to report Watt/Kg and is also part of the physics model). So why not have one more value in the settings for folks who really want to customize things?

4 Likes

We are meaning to transfer everything to .FIT. Smaller files and most can process faster.

You’re not solving for the steady state speed. You’re solving for the speed after applying the power for the sample duration after starting at the initial speed.

So solving for velocity is the wrong equation. You want to solve for acceleration and use that to figure out what the next velocity is… and so on.

1 Like

Just to stoke the fire a little more, apparently Garmin even gives out badges for the “distance” you ride indoors :joy:

Disclaimer: I’m completely ambivalent on this topic…

You’re right – the equations above are solving for steady state speed. That’s the quickest and easiest way to get a reasonable value no matter what gearing the rider was using.

But you did make me curious – if it was modeled using forward integration how different would it be…certainly the basic steady state efforts (threshold workouts) wouldn’t change much, but as I mentioned earlier in the thread I did Gendarme the other night so I looked at that as well.

With typical workouts (sweetspot intervals) that aren’t 30s on / 30s off the difference was less than 1%. With Gendarme the difference was a 0.4 mph difference, in that the steady state model over estimated by about 2% for me. Which does make sense - you would take time in the real world to get up to your higher speed.

Thanks for the encouragement to sit down and look at this – a fun diversion.

I’m posting the code as well if you have any other suggestions - this time a python notebook converted to html as the graphs weren’t rendering correctly using the online notebook viewer.

http://www.robertoneil.com/TrainerRoad/Example_ParseFit2.html

This example also parses tcx files as well as fit files - since I only had the tcx file from TR for this latest workout (I didn’t record it separately on my bike’s computer).

I also updated the code in the link above to show two different ways to do the forward integration - the basic method has issues if the speed goes to 0 (the issue being a divided by 0) - it also tends to get erratic if you get close to zero.

But if you use this equation you can do all the forward integration bits with one equation and not have that divide by 0 and other issues:

See the code in the link above to see it used and compared with the basic steps for forward integration as well.

2 Likes

It makes the math easier. Just solve for rolling resistance and aero drag at last speed sample. Subtract those off applied power for net power and use net power to get an acceleration from mass. Apply acceleration over time sample… boom cheap discreet integration.

The most irritating part of the whole thing is the Fit SDK has a poor API, so you’re going to be squatting on the thread the entire time.

1 Like

That’s what @rob0 does in his alternative method as can be seen below

Now we just need to take into account the gradient/elevation of some fictional course, bike/wheel combo, rider position and if the surface is variable… hey, maybe a game could even be made out of it :wink:

3 Likes

Also, if anyone is interested in some peer review reading on where a bunch of the mathematics and assumed values come from have a look at the following journal articles:

1998 - Validation of a Mathematical Model for road cycling power.pdf (98.0 KB) (Martin, Milliken, Cobb, McFadden & Coggan)

1999 - Comparing cycling world hour records, 1967-1996, modeling with empirical data.pdf (1.8 MB) (Bassett, Pasfield, Broker & Burke)

2006 - Modeling Sprint Cycling Using Field-Derived Parameters and Forward Integration.pdf (224.9 KB) (Martin, Gardner, Barras & Martin)

2011 - Validation of a model and a simulator for road cycling on real tracks.pdf (1.3 MB) (Dahmen, Byshko, Saupe, Roder & Mantler)

2018 - A mathematical model for simulating cycling - applied to track cycling.pdf (1.4 MB)

The 1998 paper by Martin et al. provides an excellent introduction to the physics/mathematics and a set of equations to use when the effort is effectively steady state and/or consistent climb

In the 2006 paper Martin et al. update their model while also simplifying some of the mathematics using some sound assumptions. They found using the new forward integration calculated speed/distance
equations accurately predicted measured athlete speed (y=x, r^2 = 0.989) The cyclists in this study were olympic level sprinters and the power delivery was far from steady state (one peaking at over 2000w)

3 Likes

I apologize for posting on an older thread before finding this one, but anyways, I realize I’m not the center of the world and everyone uses their numbers differently, but seeing the distance show up for the first time really frustrated me.

Any update on this? I’ve never ever recorded distance for indoor rides, and I just switched from a dumb trainer to a smart one and now I’m getting distance, and I don’t like the ways its skewing my stats.

I like seeing the hours counted, but the distance is not something I’d want to see counted on strava. There has to be a feature to block this. Since I’ve been using strava for over 14 years, and using a dumb trainer for 10 of them of them or so, it really changes the stats in a way that I cant compare apples to apples.

2 Likes

No roadmap updates at the moment, sorry for the trouble. I can definitely empathize that its frustrating to see inaccurate speed/distance data. :frowning:

1 Like

I just adjust the gearing on the bike to simulate about the speed/distance that i would get riding outside for that workout/power output. Gearing will adjust the speed, erg keeps power the same regardless of gearing.

2 Likes

I get where you coming from
But at the end, it doesn’t matter. Power is king and speed and distance indoors is silly concept anyway

5 Likes

I have my Strava set to upload as private then after I’ve reviewed them added pictures etc. I make them visible to my friends or the public. I could simply hide the stats relating to speed or distance from other people of I wanted to.

If you ran on a treadmill 10 hours a week would you not count the mileage? Trainer mileage IS real mileage. Your legs don’t know that you didn’t actually go anywhere.

3 Likes

If you ran in a treadmill 10 hours, well you ran 10hrs.

Distance or time, it’s all just a measurement. It really doesn’t matter.

1 Like

It absolutely isn’t, in no way is it even remotely relevant or comparible

5 Likes

exactly, so don’t send that data at all; or at least give users the option to strip/omit it.

2 Likes

How is that? My legs can’t tell the difference. Maybe one could argue trainer miles are more difficult.