Travel distance on indoor bike

Hello, this may already be possible but I am not able to figure it out. I am using a Keiser bike and capturing the cadence, power and HR. The distance reported on Intervals does not match that of the bike. Most likely, the assumption about the circumference of the wheel is incorrect. Total distance should be cadence * time * wheel circumference. So by specify the wheel radius, I could get the correct distance. How do I do this?

The distance reported is a nonsense.
As far as I can see, the Keiser bike is a fixie, that is it has only one gear. So the speed of the rear wheel is determined by your cadence. Note: cadence is not the speed of rotation of the rear wheel, but the speed of rotation of your pedals – only if these are the same is cadence equal to the speed of rotation of your wheel.
Furthermore as far as I can see, the resistance is determined by a control [knob] external to your cycling. Increasing the resistance is like increasing the gear ratio – going to a “higher” gear or lower down the rear cassette. How are you going to account for this?

But to answer your question. The circumference of the wheel is 2 x pi x radius, where pi = 3.14159 approximately. Measure of radius of the wheel in centimeters. If cadence is also the speed of rotation of the wheel, usually measured in rotations per minute, then the distance travelled by the rear wheel in z minutes is
2 x pi x radius x cadence x z centimeters. Divide by 100000 to get the answer in kilometers.

Personally, however, if I know average power for the duration of the ride, I would consult An interactive model-based calculator of cycling power vs. speed which tells me the distance travelled on [say] flat land if I ride at this power. This would be a more useful data point for you.

Thanks for taking the time to answer. I agree that the distance traveled is 2PIRCadenceElapse Time. This means that bikes with different wheel radii will travel different distances. Of course, a different wheel size will also change the required power to travel that distance. The Keiser M3I is not a fixie, it simulates gear ratios by allowing the resistance to be varied with a lever (with changes the magnetic resistance). Keiser computes and reports the power by using a calibration which is a function of the chosen gear (magnetic resistance) and the cadence. It doesn’t measure it directly. Power and Cadence (and gear number) are then broadcast via bluetooth (which I capture and send to Intervals.icu), but they also show traveled distance in miles on the display. So they have an internal calibration for the distance too (i.e. they assume a certain wheel size). What I am asking is if there is a way to specify the wheel radius within Intervals, so that the distance calculated by Intervals matches that of Keiser’s display (currently it’s off by a factor 2 approximately). Not a huge deal but my OCD kicks in sometimes.

I like your suggestion of using an interactive model-based calculator. I could try to match that calculator with the Keiser calibration (they likely have their own internal model) to determine the radius they assume, but I still would need to inject that value into the formula that Intervals uses to calculate the distance, right? I should get the same value for the distance as Keiser displays, if their model is correct, actually.

No, they assume plenty of things. Distance doesn’t make sense unless you assume gradient of the road and wind resistance.
It’s exactly the same as outdoors. On a climb you go slower compared to a flat road. In a headwind you go slower compared to a tailwind. Total distance traveled within a same time span hugely varies with elevation and wind.
If you simulate a course, like Zwift, myWhoosh, etc, then you get a distance that is calculated from power, elevation profile and in most cases a Cr factor that is derived from your height and weight.
Wheel circumference has nothing to do with it. The same power output will make you move just as fast on a small or a big wheel.
So unless you simulate a course profile, distance on an indoor bike doesn’t make any sense. 100W on a downhill can result in 60km in an hour while on an uphill, that same 100W will result in 12km (totally made up numbers, but it should give you an idea).
The total truth is that you exactly moved 0m :wink:

Actually, you can change the distance intervals offers you. On the Activity page, click on the distance number and a pop up box invites you to enter whatever distance you want.

But remember all the points that both of us have made.

OK, I thought this over and my assumptions were incorrect. The RPM reported is not the angular velocity w of the wheel but that of the crank. The traveled distance is indeed 2 * PI * R * w * time. The value w is a function of the crank angular velocity and the gear ratio. That gear ratio is also what determines the power required at the crank. So going backwards, knowing the power output, we can infer the gear ratio. Combining gear ratio and crank angular velocity gives wheel angular velocity and distance (using time and wheel radius).

On a normal bike the speed is the result of the cadence (rpm) x gear ratio x pi x d (wheel diameter) x 60 divided by 1000 if you use metric and want result in km/h.
The distance is the same formula but total number of crank revolutions iso cadence. And that is only correct if you remain in the same gearing.
The power is the product of the force exerted on the pedal and the pedal speed. This means that crank arm length also comes in to the equation.
Your Keiser indoor bike does NOT change gear ratio. It changes the resistance on the axis of the flywheel. Like putting on the brakes more or less.
What you’re trying to do is impossible because you don’t know what the resistance is.
Don’t waste your time in trying to make a model/formula. First invest some time to learn the physics and you will understand why it is impossible. You can come up with any number for distance, no one would be able to tell you if it is correct or not. So it is nonsense…

95% of all indoor bikes do it that way. The number of smarttrainers/indoor bikes with a real power meter is very low, and those who have it are very expensive. It’s a formula describing the relation between flywheel speed and resistance setting. Each resistance setting has a similar curve but adjusted vertically with a fixed offset per resistance setting. The higher quality ones have a device specific formula, calibrated per unit. The cheaper ones all come with the same formula which is an average over a couple dozen units.

And now I rest my case :zipper_mouth_face:

Since there is power data. You don’t need to know the resistance setting of the bike. Just use the power data and convert power to speed.

The only thing which may not be taken into account is speed when going up / down hill, so that means the speed is not gonna change. So you’re also back to square 1.

Your real travel distance is always 0 on the trainer. I’ve tried it many times, but didn’t move anywhere. :slight_smile:

To track your efforts, imo it’s really better to compare hours. If I go only downhill, then there will be big distances, in short time, with no effort. If I go only uphill, then there is nearly no distance in huge time. This doesn’t make it easy to compare distances. Adding a virtual distance to this equation makes things even harder.

1 Like

For indoor rides where you’re not really using algorithms to determine your distance (like Zwift), I just SWAG it based on effort. I know you’re probably counting the miles to estimate your total mileage (or is it kilometerage not in USA??? :grinning_face:) as I do, so it’s close enough.

This is why I prefer my cooling fan to be positioned behind me when using my indoor trainer.

As well as cooling me very well, the tailwind increases the distance I cover in each session.

Doesn’t it? :grinning_face:

8 Likes

Just come across this tread. For a while I’ve been estimating the distance of indoor ride using the same average cadence and the gear ratio (I use a Swift cog to the gear ratio doesn’t change). To simply things I create a Custom Field to calculate it for me in Intervals. Recently I’ve been trying to update it to auto update the Distance field but it doesn’t seem to be working. I’ve tried updating the activity.icu_distance and activity.distance but neither send to be affecting the distance. Any idea where I’m going wrong?

if (activity.type = "Virtual Ride") {
    const circum = ((45 * 2 + 622) * Math.PI) / 1000000 // Tyre circumference in metres;
    const duration = activity.moving_time / 60;
    const gratio = (40 / 14) // gear ratio chainring/sproket;

    const result = circum * (gratio * (activity.average_cadence * duration));
  
if (!activity.icu_distance) {
    activity.icu_distance = result;
}
if (!activity.distance) {
    activity.distance = result;
}
result;
}

Try this field for distance

 activity.icu_distance = result;

Hmm, just tried it, and it won’t update :thinking:

@david I assume distance is not calculated during analysis, so it is not changeable with a custom field?

Yeah tried that and activity.distance but neither seem to change the value Intervals is using :man_shrugging: