Help with a custom metric

162 views
Skip to first unread message

Rohan

unread,
Oct 13, 2021, 11:23:24 PM10/13/21
to golden-cheetah-users
I'm trying to add a metric for an estimated VO2max score for a ride as per: https://alancouzens.com/blog/VO2Scores.html

I'm only getting zeroes in the metrics CSV file so I have clearly gone wrong somewhere. Any tips on how to get this working would be greatly appreciated.

estimate.png

Ale Martinez

unread,
Oct 14, 2021, 1:32:37 AM10/14/21
to golden-cheetah-users
El jueves, 14 de octubre de 2021 a la(s) 00:23:24 UTC-3, Rohan escribió:
I'm trying to add a metric for an estimated VO2max score for a ride as per: https://alancouzens.com/blog/VO2Scores.html

I'm only getting zeroes in the metrics CSV file so I have clearly gone wrong somewhere. Any tips on how to get this working would be greatly appreciated.

The most flagrant error is the use of multiple relevant functions, define just one and use && operator to combine the conditions.


estimate.png

 

Ale Martinez

unread,
Oct 14, 2021, 6:47:08 AM10/14/21
to golden-cheetah-users

Rohan

unread,
Oct 14, 2021, 9:36:26 PM10/14/21
to golden-cheetah-users
I have it working now. Thanks for your suggestions.

VO2maxScore.png

Ale Martinez

unread,
Oct 14, 2021, 9:57:56 PM10/14/21
to golden-cheetah-users
El jueves, 14 de octubre de 2021 a la(s) 22:36:26 UTC-3, Rohan escribió:
I have it working now.

Not so, relevant still is wrong and not doing what you expect according to the comments, see my first post.
Message has been deleted

Rohan

unread,
Oct 14, 2021, 10:22:55 PM10/14/21
to golden-cheetah-users
I just changed it to this:

# only calculate for rides that contain power and heart rate

relevant {(isRide) && Data contains "P" && Data contains "H"; Time_Moving > 2700;}


Ale Martinez

unread,
Oct 15, 2021, 2:59:12 AM10/15/21
to golden-cheetah-users
El jueves, 14 de octubre de 2021 a la(s) 23:22:55 UTC-3, Rohan escribió:
I just changed it to this:

# only calculate for rides that contain power and heart rate

relevant {(isRide) && Data contains "P" && Data contains "H"; Time_Moving > 2700;}

Closer, but still wrong, it only checks for Time_Moving > 2700.

I thin we need to explain blocks and sequential execution in the wiki…

Mark Liversedge

unread,
Oct 15, 2021, 4:04:07 AM10/15/21
to golden-cheetah-users
I've updated the wiki:

userfunc.png

Rohan

unread,
Oct 15, 2021, 7:33:40 PM10/15/21
to golden-cheetah-users
Well spotted. I didn't notice that I had left out the final &&.

I have also removed low IF rides as they were skewing the results.

{

# only calculate for rides that contain power and heart rate

relevant {(isRide) && Data contains "P" && Data contains "H" && Time_Moving > 1800 && aPower_Relative_Intensity > 0.5;}

# calculate metric value at end

value {

(xPower/75*1000/Athlete_Weight/((Average_Heart_Rate-config(rhr))/(config(maxhr)-config(rhr))));

}

}

Reply all
Reply to author
Forward
0 new messages