Hey,
As far as I understood, an average speed displaying in the activity takes into account elapsed time, but not moving. I guess it would be great if an average moving speed is also displayed.
The values on top of the activity page are Moving Time, Moving Speed, Moving Pace.
When you make selections on the graphs, you will see elapsed time and avg speed (including zeroes) if they are configured in the Fields.
It is the moving speed calculated by intervals.icu. Just make a selection of the complete activity and check the avg speed⦠It will be lower if there are parts were you stopped.
This isnāt necessarily the same number as Garmin calculates because different suites use different thresholds for moving/not moving. On your recording device you probably have a setting for the speed at which it will pause. That is what is used by Garmin. Intervals has its own threshold and in your case the intervals threshold is lower then whatās configured on Garmin
You need this sort of threshold because otherwise everything will be moving time. The reason is the GPS location instability.
And surely, threshold speed will be different for running/cycling.
Itās one of those numbers that will never match in between different apps just like elevation.
How can I use moving speed in script?
Iād like to bump this one. The above assertion that it is based on moving speed looks incorrect:
using total time:
38.18 / 125.8166 * 60 = 18.2 km/h
using moving time:
38.18 / 118.52 * 60 = 19.32 km/h
In addition, the thresholds for āstoppedā state are not lenient enough in my opinion. It would be amazing if there was some way to adjust this, or even just have better defaults. ie ignore anything below n km/h (using apple watch gps, there are quite regularly non-zero values that are < 1 km/h, for example. i have auto-pause disabled to correctly track recovery periods).
Thanks for the consideration!
I wonder if something changedā¦
For Run/Walk it still is as I said, avg speed/pace in the summary is based on moving time. Selections are based on total time. Double checked just now.
But when I check for rides, I do see the same as you. It is based on total time. To be honest, Iām now unsure if this has always been like that for rides or if it changed somewhere recently. @david ?
This could be the average of the speed stream. Which is sometimes way different then the calculation of distance divided by moving time.
Therefore I created my own custom field āAvg. Speedā:
It calculates distance / moving_time
Iāve edited the summary layout and using the custom field instead of the default value.
The average speed for rides displayed in the summary matches exactly the distance/elapsed time calculation.
For some reason, I was (wrongfully) persuaded that it displayed avg speed based on moving time like it does for Runs.
Very cool, didnāt know you could do that!
Unfortunately, living in a city, even with this equation the base moving time is still noisy with āstoppedā time to the point itās not so useful (an average of 2-3 stops per kilometre adds up quickly >_<), so Iād hope to have a more advanced method of filtering low values.
No, it doesnāt. In my example it was 6h28m elapsed time and 158km. That would be 158/6,5=24,3 km/h. But the default field shows 25.9 (the bottom value), my calculation shows 26.1 (distance/moving_time):
Now Iām completely lost
@MedTechCD I am not 100% sure, but now I think you are partly correct. I think it uses something like ārecorded timeā (= elapsed - not recorded time). So if you do never ever press pause, it is distance/elapsed_time. That is also true for most of my rides, regardless of stops at signs etc.
But for long rides I usually press the pause button for longer breaks, so it is not anymore elapsed time. If I subtract the pause time, these calculations would match my assumption. But itās just a guess.
@Dean_Herbert What would be your idea of ābetterā calculation of moving time? Do you use GPS only or speed sensor?
Now that I know you can make custom scripts, hereās my proposal (public as āAverage speed adjustedā):
distance = streams.get("distance").data
time = streams.get("time").data
minimum_speed = (1 * 1000) / 3600
total_distance = 0
time_moving = 0
for (let i = 1; i < time.length; i++) {
dDelta = distance[i] - distance[i - 1]
tDelta = time[i] - time[i - 1]
if (dDelta >= minimum_speed)
{
time_moving += tDelta
total_distance += dDelta
}
}
total_distance / 1000 / (time_moving / 3600)
With a test ride (flat, only slowdowns were traffic light stops):
base icu value: 23.8 km/h
@R2Tomās version: 24.7 km/h
this version: 26.1 km/h
Hereās how the average look against the effort:
Itās subjective at the end of the day, but seems closer to expectations. For this same ride, ridewithgps shows 27.3 km/h. With an adjusted minimum speed of 8 km/h (instead of the 1 km/h above) we can also get 27.2 km/h here, which looks more like this: