hrTSS (appoximate TSS for non PM rides) in Golden Cheetah?

6,035 views
Skip to first unread message

Art

unread,
Jun 22, 2016, 5:21:43 AM6/22/16
to golden-cheetah-users
I've seen some very old posts on this, but is there any way GC could calculate an approximation to TSS (hrTSS in TP) for non PM rides like training peaks does.

I've looked at the 3 TRIMP variants but they all come out different to hrTSS. The Zonal model generally correlates most closely, but I'm still unsure about using this for PMC.

With a free TP account your get a figure for hrTSS which I could manually enter as TSS in GC, but if GC could do this that would be great?

Many thanks.

Stefan

unread,
Jun 22, 2016, 10:23:57 AM6/22/16
to golden-cheetah-users
Just a thought, define a new user metric: myTSS. If power data present use Coggan TSS, if not and heart rate is present estimate hrTSS according to Joe Friel and time spent in heart rate zones.

http://home.trainingpeaks.com/blog/article/estimating-training-stress-score-tss

Then build a PMC based on myTSS.
Message has been deleted

Ale Martinez

unread,
Jun 22, 2016, 1:14:39 PM6/22/16
to golden-cheetah-users
El miércoles, 22 de junio de 2016, 11:23:57 (UTC-3), Stefan escribió:
Just a thought, define a new user metric: myTSS. If power data present use Coggan TSS, if not and heart rate is present estimate hrTSS according to Joe Friel and time spent in heart rate zones.

TRIMP Zonal Points metric does just that using the "trimp k" coefficients as points per minute in each zone, those coefficients are configurable on Heart Rate zones panel so they can be chosen to match those of Friel if you prefer them.
Message has been deleted

Pontus

unread,
Jun 23, 2016, 2:05:52 AM6/23/16
to golden-cheetah-users
But TRIMP Zonal Points does not use power data even if this is available, right? I did exactly what Stefan suggested and it works great. Now I get a fair TSS estimation and PMC chart for all my workouts, including MTB, rowing and running where I do not have a power meter.

Art

unread,
Jun 23, 2016, 7:14:21 AM6/23/16
to golden-cheetah-users
Thanks Ale and Stefan.

Is there a reason hrTSS is not included with GC - is a licensing issue - or just the exact formula is unknown? 

I can't get the TRIMP zonal points reliably close to hrTSS provided from my Training Peaks account. And therefore feel reluctant to put much faith in the PMC curve.

Ale - when you say match Friel's - how would you do this exactly? How do you know the coefficients? 

Thanks.

Ale Martinez

unread,
Jun 23, 2016, 9:20:22 AM6/23/16
to golden-cheetah-users
El jueves, 23 de junio de 2016, 3:05:52 (UTC-3), Pontus escribió:
But TRIMP Zonal Points does not use power data even if this is available, right?
Yes, my response was in the context of the other thread by the OP where this was already discussed: https://groups.google.com/forum/#!topic/golden-cheetah-users/mP9xZVJBedM, to add a User Defined Metric is perfectly fine solution.

Ale Martinez

unread,
Jun 23, 2016, 9:23:05 AM6/23/16
to golden-cheetah-users
El jueves, 23 de junio de 2016, 8:14:21 (UTC-3), Art escribió:
Ale - when you say match Friel's - how would you do this exactly? How do you know the coefficients? 

From the article Stefan posted before dividing TSS per hour by 60

Art

unread,
Jun 23, 2016, 10:29:28 AM6/23/16
to golden-cheetah-users
Thanks Ale - can you explain why you divide by 60? I'm not following this!

And even if we divide by 60, what are the heart rate zones used - Friel's zones divided in 7 and here we have ten zones.

Are you saying we define 10 zones and apply these Trimp K constants? In that case the sub divided zones will be arbitrary?

1 20 0.33
1 30 0.50
1 40 0.67
2 50 0.83
2 60 1.00
3 70 1.17
4 80 1.33
5 100 1.67
5 120 2.00
5 140 2.33

Thanks.

Ale Martinez

unread,
Jun 23, 2016, 10:36:35 AM6/23/16
to golden-cheetah-users
El jueves, 23 de junio de 2016, 11:29:28 (UTC-3), Art escribió:
Thanks Ale - can you explain why you divide by 60? I'm not following this!
Because in the table you have TSS per hour and trimp k coefficients are points per minute

Art

unread,
Jun 23, 2016, 11:33:10 AM6/23/16
to golden-cheetah-users
Many thanks Ale. So if I stick to zones 1-5 and average I get:

1 0.50
2 0.92
3 1.17
4 1.33
5 2.00

This is quite different (at threshold and above) to the values in GC: 0.9,1, 1.1, 2 and 5 respectively. Where do these GC values come from? It would account for any high intensity (mountain bike) workouts getting very high Trimp zonal values.

Art

unread,
Jun 23, 2016, 11:40:30 AM6/23/16
to golden-cheetah-users
Sorry also now I've changed the values - nothing has changed. The date is set way back - should GC auto recalculate the TRIMP zonal values?

Thanks.

Ale Martinez

unread,
Jun 23, 2016, 1:38:13 PM6/23/16
to golden-cheetah-users
El jueves, 23 de junio de 2016, 12:40:30 (UTC-3), Art escribió:
Sorry also now I've changed the values - nothing has changed. The date is set way back - should GC auto recalculate the TRIMP zonal values?

I'm afraid there is a limitation (bug?) and trimp k coefficients change don't trigger a refresh, change date or LTHR back and forth to force the recalculation.

Mark Liversedge

unread,
Jun 23, 2016, 2:26:39 PM6/23/16
to golden-cheetah-users
Ooh, we should fix that !
TRIMP coefficients are not included in the HR zone fingerprint, right?

Mark 

Ale Martinez

unread,
Jun 23, 2016, 5:15:49 PM6/23/16
to golden-cheetah-users
El jueves, 23 de junio de 2016, 15:26:39 (UTC-3), Mark Liversedge escribió:
TRIMP coefficients are not included in the HR zone fingerprint, right?
 
Yes, that seems to be the problem

Art

unread,
Jun 25, 2016, 8:13:06 AM6/25/16
to golden-cheetah-users
Yes sorted that night by deleting and reinstating HR zones.

Thanks.

Ale Martinez

unread,
Jun 25, 2016, 9:17:57 AM6/25/16
to golden-cheetah-users
El sábado, 25 de junio de 2016, 9:13:06 (UTC-3), Art escribió:
Yes sorted that night by deleting and reinstating HR zones.
 
It is fixed for the next development build.

Adrian Chapela

unread,
Jul 28, 2016, 2:31:38 AM7/28/16
to golden-cheetah-users
Hello! I am trying to find a way to have hrTSS in Golden Cheetah to have my PMC graph complete. Could you help me with that? I can't find a way to add a metric and the most important thing, what is the calculation I should use? Is there included in the last development source code?

Regards! 

Pontus

unread,
Jul 29, 2016, 4:50:33 AM7/29/16
to golden-cheetah-users
Seems what you are looking for is just what is described above. I have created a new metric, myTSS, like this:

{


init { myVal <- 0; }


sample{

if(Data contains "P")

myVal <- TSS;

else myVal <- TRIMP_Zonal_Points;

}

value { myVal; }


I then went on creating a new PMC chart using myTSS as Long, Short term stress and Stress balance.


-Pontus

Adrián Chapela Cordeiro

unread,
Jul 29, 2016, 10:26:05 AM7/29/16
to Pontus, golden-cheetah-users
Hello, I am trying to add the custom metric with the last dev version and seems that it is not working. I could added the metric but it seems that it is not calculated for old activities and also I can't add it to the summary tab... ummm I could add it but it isn't shown at the tab... really weird for me!

Could you help me ? 

--
_______________________________________________
Golden-Cheetah-Users mailing list
golden-che...@googlegroups.com
http://groups.google.com/group/golden-cheetah-users?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "golden-cheetah-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golden-cheetah-users/ElrZ_MhUwHc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golden-cheetah-u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Liversedge

unread,
Jul 29, 2016, 10:27:55 AM7/29/16
to golden-cheetah-users
This would be faster:

{
    value() {
        Data contains "P" ? TSS : Trimp_Zonal_Points;
Message has been deleted

Adrián Chapela Cordeiro

unread,
Aug 1, 2016, 2:29:03 AM8/1/16
to Serban Mestecaneanu, golden-cheetah-users
Hi, 

I am still with problems.

I had verified that the Trimp Zones are there, using this: https://github.com/GoldenCheetah/GoldenCheetah/wiki/UG_Preferences_Athlete_Training-Zones , Zones are defined in the Trimp k column, right?

I am trying the last user defined metric and the last development release from July.

It is weird...  the example works perfect.. (My Average Power)

Regards


2016-07-31 19:34 GMT+02:00 Adrián Chapela Cordeiro <adrian....@gmail.com>:
Hello all,

your problem could be that you need an extra } at the end. See the last custom metric:

{

    value() {

        Data contains "P" ? TSS : Trimp_Zonal_Points;

}

}


Also, I can't make it working, Do I need to define Trimp_Zonal_Points? I think that it is done automatically when you define the HR zones.


Regards


2016-07-31 14:53 GMT+02:00 Serban Mestecaneanu <serba...@gmail.com>:
Could someone (Mark or Pontus) tell me what is exactly the syntax to put into the User defined metric?

I tried Pontus first, but pressing TEST gives me zero values.

Thanks,
Serban

--

Serban Mestecaneanu

unread,
Sep 6, 2016, 8:09:59 AM9/6/16
to golden-cheetah-users, serba...@gmail.com
Could I ask something which bothers me?

I am using this PMC as stated above (the Pontus version as I could not make Mark's faster method to work).

However, it seems that TRIMP_Zonal_Points gives a different value than TRIMP Points for my workouts - usually lower values. I should mention that I have left to defaults the Trimp k coeficients in Heartrate zones.

Is it ok?

Thanks,
Serban
To unsubscribe from this group and all its topics, send an email to golden-cheetah-users+unsub...@googlegroups.com.

DHR

unread,
Oct 21, 2016, 12:24:55 PM10/21/16
to golden-cheetah-users
Hi,

I can see in this thread several references about creating your own user defined metrics. I have version 3.3 installed and I don't see that option, should I get the 3.4 version? should I get the code and create my user defined metric from code itself?

I'm a developer myself but new to this project and still trying to find my whereabouts.... so excuse the slightly off-topic but I also want to create my_hrTSS whenever Powerdata is not available.

Mark Liversedge

unread,
Oct 21, 2016, 12:26:40 PM10/21/16
to golden-cheetah-users
On Friday, 21 October 2016 17:24:55 UTC+1, DHR wrote:
I can see in this thread several references about creating your own user defined metrics. I have version 3.3 installed and I don't see that option, should I get the 3.4 version? should I get the code and create my user defined metric from code itself?

I'm a developer myself but new to this project and still trying to find my whereabouts.... so excuse the slightly off-topic but I also want to create my_hrTSS whenever Powerdata is not available.

Its in 3.4, we released RC1 a month ago and the full release is likely to be November.
We're gonna push out RC2 in the next couple of weeks, so your call to wait or not :)

Mark 

DHR

unread,
Oct 21, 2016, 12:57:36 PM10/21/16
to golden-cheetah-users
I can give it a go to RC1 and see if the user defined metrics help .... thanks for your quick response btw!

Eager to get my hands in the November release though :D

Scott Michaels

unread,
Dec 1, 2016, 7:42:57 PM12/1/16
to golden-cheetah-users
Just a quick question regarding this: I've got my PMC chart pulling training load from either power data, TRIMP(100) if that's unavailable, or RPE if heart rate is unavailable as well, but my chart doesn't feature the exponential decay between points you see on the default PMC charts. Along with this, the default PMC charts appear to use some sort of peak-find when picking which points to highlight (if that option is selected), whereas my chart does not and just picks the highest valued points. Anyone got any idea what I've missed?


Adrián Chapela Cordeiro

unread,
Dec 2, 2016, 8:46:35 AM12/2/16
to Scott Michaels, golden-cheetah-users

How did you create the chart?


El 2 dic. 2016 1:42 a. m., "Scott Michaels" <sc...@sdmichaels.com> escribió:
Just a quick question regarding this: I've got my PMC chart pulling training load from either power data, TRIMP(100) if that's unavailable, or RPE if heart rate is unavailable as well, but my chart doesn't feature the exponential decay between points you see on the default PMC charts. Along with this, the default PMC charts appear to use some sort of peak-find when picking which points to highlight (if that option is selected), whereas my chart does not and just picks the highest valued points. Anyone got any idea what I've missed?


--
_______________________________________________
Golden-Cheetah-Users mailing list
golden-cheetah-users@googlegroups.com

Scott Michaels

unread,
Dec 4, 2016, 10:21:55 AM12/4/16
to golden-cheetah-users, sc...@sdmichaels.com
I created a user metric called Backup_TSS which I assigned to TRIMP(100)_POINTS if available, otherwise calculated from RPE. I then created a chart which plots (from formula) sts, lts and sb from TSS if data includes power, or Backup_TSS if it doesn't


On Friday, December 2, 2016 at 8:46:35 AM UTC-5, Adrian Chapela wrote:

How did you create the chart?

El 2 dic. 2016 1:42 a. m., "Scott Michaels" <sc...@sdmichaels.com> escribió:
Just a quick question regarding this: I've got my PMC chart pulling training load from either power data, TRIMP(100) if that's unavailable, or RPE if heart rate is unavailable as well, but my chart doesn't feature the exponential decay between points you see on the default PMC charts. Along with this, the default PMC charts appear to use some sort of peak-find when picking which points to highlight (if that option is selected), whereas my chart does not and just picks the highest valued points. Anyone got any idea what I've missed?


--
_______________________________________________
Golden-Cheetah-Users mailing list

Russell Gordon

unread,
Nov 10, 2017, 1:54:47 PM11/10/17
to golden-cheetah-users
Hi
I am really NOT a programmer so can't really follow this thread, how do I get hrTSS in my PMC chart when no power data is available? I have GC 3.4.

jeroen mermans

unread,
Jan 1, 2018, 5:39:22 AM1/1/18
to golden-cheetah-users

hi,

I've got this to work(calculate tss on power if present, otherwise on base of HR)
But if I have 2 workouts in one day, the calculated tss is way to low. looks like it avereges the tss's of the multiple workouts of that day.

is there a way to fix this?

thanks 
jeroen 

Mark Liversedge

unread,
Jan 1, 2018, 5:58:30 AM1/1/18
to golden-cheetah-users
Make the metric type total not average - then it will aggregate as a sum not mean.

Mark

jeroen mermans

unread,
Jan 3, 2018, 3:40:02 AM1/3/18
to golden-cheetah-users
Mark,

thanks!

Chris Bini

unread,
Apr 21, 2019, 6:34:22 AM4/21/19
to golden-cheetah-users
I was able to create myTSS metric just like you did. However, I can't find documentation on how to define a time based formula, as required to compute ATL and CTL.

How do you tell GC to use "yesterday's" ATL/CTL in calculating today's ATL/CTL?

Ale Martinez - No direct email please

unread,
Apr 21, 2019, 8:18:48 AM4/21/19
to golden-cheetah-users
El domingo, 21 de abril de 2019, 7:34:22 (UTC-3), Chris Bini escribió:
> I was able to create myTSS metric just like you did. However, I can't find documentation on how to define a time based formula, as required to compute ATL and CTL.
>
>
> How do you tell GC to use "yesterday's" ATL/CTL in calculating today's ATL/CTL?

See https://github.com/GoldenCheetah/GoldenCheetah/wiki/UG_Special-Topics_Formula-Syntax-and-Expressions#pmc-functions

BTW, in last 3.5 dev build TriScore is BikeScore when power is available and TRIMP Zonal Points otherwise, without the need to define custom metrics and charts.

Gilles Foucault

unread,
Dec 9, 2019, 7:55:55 AM12/9/19
to golden-cheetah-users
Hello, 

Ale, in your answer to my issue on github https://github.com/GoldenCheetah/GoldenCheetah/issues/3249 , you mentionned some improvements to get my code working...

The TriScore metric is null on rides (sport=Bike) without power data... 

Therefors, the updated hrTSS code does not work as expected :

{

init { myVal <- 0; }

sample{

if(Data contains "P")

myVal <- TSS;

else

myVal <- TriScore;

}

value { myVal; }

}


Thanks

Gilles

Gilles Foucault

unread,
Dec 9, 2019, 8:46:32 AM12/9/19
to golden-cheetah-users
I reply to myself :

The following user metrics works in GC-3.5-RC2 downloaded from https://github.com/GoldenCheetah/GoldenCheetah/releases/tag/V3.5-RC2X


{

init { myVal <- 0; }

sample{

if(Data contains "P")

myVal <- BikeStress;

else

myVal <- TRIMP_Zonal_Points;

}

value { myVal; }

}


Ale Martinez (Please don't email or cc me)

unread,
Dec 9, 2019, 8:50:59 AM12/9/19
to golden-cheetah-users
El lunes, 9 de diciembre de 2019, 9:55:55 (UTC-3), Gilles Foucault escribió:
Hello, 

Ale, in your answer to my issue on github https://github.com/GoldenCheetah/GoldenCheetah/issues/3249 , you mentionned some improvements to get my code working...

The TriScore metric is null on rides (sport=Bike) without power data... 

On v3.5 TriScore for Bike workouts is computed as follows: BikeScore when BikeScore > 0 otherwise TRIMP Zonal Points, hovering the mouse over the metric explain this.
If that is good enough for you there is no need to use a Custom Metric, any TriScore based chart will have the fallback included and, if you want to exclude no power ride you can use a BikeScore>0 filter at the chart or global level.

Therefors, the updated hrTSS code does not work as expected :

{

init { myVal <- 0; }

sample{

if(Data contains "P")

myVal <- TSS;

else

myVal <- TriScore;

}

value { myVal; }

}


As I commented in GitHub in v3.5 TSS is no longer available due to copyright issues on the acronym, it was replaced by BikeStress, so you could get your code working again just replacing TSS by BikeStress.

My comment about improvements is: it makes no sens to use a sample() function, which is called for EACH sample -typically one per second- to compute a value which always the same and it can be computed just once in the value function, I don't know from where is ugly code comes but I've seen it copied again and again. A much simpler and efficient replacement is:

{

value { BikeStress>0 ? BikeStress : TRIMP_Zonal_Points; }

}


Even simpler is to use just TriScore without a custom metric if you don't mind to use BikeScore instead of BikeStress/TSS.

Gilles Foucault

unread,
Dec 9, 2019, 9:19:41 AM12/9/19
to golden-cheetah-users


Le lundi 9 décembre 2019 14:50:59 UTC+1, Ale Martinez (Please don't email or cc me) a écrit :
El lunes, 9 de diciembre de 2019, 9:55:55 (UTC-3), Gilles Foucault escribió:
Hello, 

Ale, in your answer to my issue on github https://github.com/GoldenCheetah/GoldenCheetah/issues/3249 , you mentionned some improvements to get my code working...

The TriScore metric is null on rides (sport=Bike) without power data... 

On v3.5 TriScore for Bike workouts is computed as follows: BikeScore when BikeScore > 0 otherwise TRIMP Zonal Points, hovering the mouse over the metric explain this.
If that is good enough for you there is no need to use a Custom Metric, any TriScore based chart will have the fallback included and, if you want to exclude no power ride you can use a BikeScore>0 filter at the chart or global level.


Thanks for the explanation. Unfortunately :
- when power data is available : TriScore = BikeScore which differs from BikeStress (TSS). In my case, BikeScore < BikeStress, and BikeStress is the reference value (=TSS)
- when power data is NOT available : TriScore is correct (=TRIMP Zonal Points)

Therefore, TriScore does not gives expected results...
 

My comment about improvements is: it makes no sens to use a sample() function, which is called for EACH sample -typically one per second- to compute a value which always the same and it can be computed just once in the value function, I don't know from where is ugly code comes but I've seen it copied again and again. A much simpler and efficient replacement is:

{

value { BikeStress>0 ? BikeStress : TRIMP_Zonal_Points; }

}



Thank you very much for this code improvement ! 
 

Even simpler is to use just TriScore without a custom metric if you don't mind to use BikeScore instead of BikeStress/TSS.


 TriScore <> BikeStress, then it does not do want I expected...

Ale Martinez (Please don't email or cc me)

unread,
Dec 9, 2019, 1:31:10 PM12/9/19
to golden-cheetah-users

Paulo Cenachi

unread,
Jan 2, 2022, 8:36:53 AM1/2/22
to golden-cheetah-users
Hi Gilles,

Do you have a PMC chart using BikeStress and TRIMP Zonal Points? Can you share it?

Thank you in advance,

Paulo

Reply all
Reply to author
Forward
0 new messages