Filtering for best power after certain amount of work

283 views
Skip to first unread message

Theodor Milkov

unread,
Jan 9, 2017, 4:30:33 AM1/9/17
to golden-cheetah-users
Hello,

I'm looking for a way to find rides where let's say best 5-minute power is more than X watts, but only in the part of the ride after 2000 kJ of work has already been done.

Something like:    Best_2MJ_5_Minute_Power > 200

Basically, I'm going to use this as an assessment of the ability to produce power after some fatigue has already set in.

I have some programming background, so I could try user formulae if this is doable with them.

Mark Liversedge

unread,
Jan 9, 2017, 8:28:55 AM1/9/17
to golden-cheetah-users
This has come up a few times. Its a really interesting problem.

It isn't possible, but the longer term solution would be;

1. create new metric for accrued work - calculated for every interval
2. add the ability to work with intervals in R - GC.season.intervals() to return intervals
3. Create a scatter plot that plotted AP for all intervals found where work done > 2000kJ and AP > X

I've already started on 2 to allow trends type charts to be built that work with intervals not rides.

I think 1 might be a bit trickier to add as a user metric as we only compute for the samples in the interval, not outside it. But we could add that ability quite easily with a new function pre() and post() for iterating over samples before and after the interval.

Sorry if none of this makes much sense, I'm thinking out loud :) !!

Mark

Mark Liversedge

unread,
Jan 10, 2017, 9:21:44 AM1/10/17
to golden-cheetah-users
I've added the before and after functions to user metrics.
This will allow calculation of things like the elapsed time prior to an interval, or the work done leading up to it.

Will try and fix up the R API for retrieving intervals so we can build some charts that use these user metrics in combination with things like AP.

Mark

Mark Liversedge

unread,
Jan 15, 2017, 1:51:28 PM1/15/17
to golden-cheetah-users
OK, so I've added an R api to fetch intervals for an entire season. Below, I'm plotting intervals that are ~10s long (>8 <12) by the accrued work done leading up to them.



This is probably better plotted as a distribution, but you get the general gist :)

Mark

On Monday, 9 January 2017 09:30:33 UTC, Theodor Milkov wrote:

Theodor Milkov

unread,
Mar 19, 2017, 12:22:33 PM3/19/17
to golden-cheetah-users

Thanks, Mark!

And here's a "chart" I found useful  (from another app):




Mark Liversedge

unread,
Mar 19, 2017, 1:19:07 PM3/19/17
to golden-cheetah-users
Oh, if that is all you want to do then you cab choose metrics to list as athlete bests on the trends summary, they are listed ranked for the date range selected.

Theodor Milkov

unread,
Apr 26, 2017, 4:42:19 AM4/26/17
to golden-cheetah-users
Sorry, but I can't find the syntax to use before() and after(). What I'm still looking to get is: skip first 2000kj of a ride, then find best(power, 300) in the remaining part of the ride.

Theodor Milkov

unread,
Jul 8, 2017, 1:19:38 PM7/8/17
to golden-cheetah-users
Anyone?
Message has been deleted

Theodor Milkov

unread,
Jul 9, 2017, 11:50:43 AM7/9/17
to golden-cheetah-users

Here's what I came up with using the R chat:


ride = GC.activity()


i = 0

work = 0

for (pwr in ride$power) {

i = i + 1

work = work + pwr

if (work > 1000000) {

break

}

}


residue = ride$power[i:length(ride$power)]

best=paste(round(max(rollmean(residue, 300))), "W")


plot(rollmean(residue, 300), xlab=best)


Ideally I'd find a way to extract this metric for every ride and then plot it as Mean Max chart to find what my bests are after 1000 kJ of work (as opposed to fresh).

Reply all
Reply to author
Forward
0 new messages