Live average or current average along a ride?

72 views
Skip to first unread message

Ignacio Sanz

unread,
Apr 2, 2026, 11:38:57 AM (4 days ago) Apr 2
to golden-cheetah-users
Hello, I would like to create a metric that shows the average of a metric up to that moment throughout a ride?
For example, for a 6 hour ride, that it shows the average speed when I had covered the first hour, the average after two hours, the average for three hours and so on...
Nowadays this is more or less what I see with TSS in the "stress" tab for cycling, I can see how TSS "acumulates" throughout the ride, is this possible for average power or speed for example?
Thanks

Ale Martinez

unread,
Apr 2, 2026, 12:01:43 PM (4 days ago) Apr 2
to golden-cheetah-users
Yes, the easiest way is to add a User Data curve to Activitiy chart as explained in https://github.com/GoldenCheetah/GoldenCheetah/wiki/UG_ChartTypes_Activities#user-data-curves,
in this case the formula in km/h can be something like: 3600*DISTANCE/SECS 

Joachim Kohlhammer

unread,
Apr 3, 2026, 4:05:42 AM (3 days ago) Apr 3
to golden-cheetah-users
I have a User Chart with formulas all like

{

relevant {

Data contains "P";

}


finalise {

xx <- samples(SECS);

s <- samples(POWER);

yy <- sapply(s, { sum(head(s, i)) / i; });

}


x { xx; }

y { yy; }

}


Ale Martinez

unread,
Apr 3, 2026, 5:01:41 AM (3 days ago) Apr 3
to golden-cheetah-users
El viernes, 3 de abril de 2026 a la(s) 5:05:42 a.m. UTC-3, tiefgara...@gmail.com escribió:
I have a User Chart with formulas all like

{

relevant {

Data contains "P";

}


finalise {

xx <- samples(SECS);

s <- samples(POWER);

yy <- sapply(s, { sum(head(s, i)) / i; });

this can be vectorized for better performance as: yy <~ cumsum(s)/xx;  

Joachim Kohlhammer

unread,
Apr 3, 2026, 8:32:17 AM (3 days ago) Apr 3
to golden-cheetah-users
This is awesome! The chart is now basically instant :)
Reply all
Reply to author
Forward
0 new messages