Calculated Fields

by camel

Downloads: 23,628 (9) • Reviews: 4

Version:

1.2.9.4

Updated:

Apr 11, 2011

Slowest split

Slowest split

Postby headwind » Sun Jun 26, 2011 9:15 am

Is it possible to calculate the slowest active split in an interval workout? For instance, if I do a workout of eight 400 meter intervals and my splits range from 90 seconds to 95 seconds, I would like to write a formula that would yield the 90 second split. The average, and fastest split would also be interesting. I've looked at all of the peak value and range functions and also the split functions, but they don't seem to do quite what I'm looking for.
headwind
 
Posts: 3
Joined: Sun Jun 26, 2011 8:55 am

Re: Slowest split

Postby camel » Sun Jun 26, 2011 11:01 am

If you will post me an detailed description what exactly do you want we will see if it could be calculated.

You want to calculate slowest etc active 90 seconds or you want to do those calculations with exact splits, that you have in activity?

Or could we make calculations related to distance for example that 400m
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Re: Slowest split

Postby headwind » Sun Jun 26, 2011 5:12 pm

Sorry, I think my original post was confusing because I asked for the slowest split but gave you an example of the fastest split.

I see that I can calculate things like the slowest/fastest 90 seconds in an activity. What I want is something that reports the slowest split, no matter what distance the splits are. I typically pre-program these types of workouts into my Garmin using the Garmin Fitness plugin, so I will automatically get the active splits broken out with the correct distance. So for example:
1. Workout is eight 400 meter intervals, with two minutes rest between. The active splits in seconds are 89, 91, 90, 92, 95, 93, 94, 92.
The SlowestSplit function should return 95 seconds.
2. Workout is four 800 meters intervals, with 90 seconds rest between. The active splits in seconds are 192, 194, 199, 195.
The SlowestSplit function should return 199 seconds.

I'm most interested in SlowestSplit, but AverageSplit and FastestSplit would also be interesting to see.
headwind
 
Posts: 3
Joined: Sun Jun 26, 2011 8:55 am

Re: Slowest split

Postby camel » Mon Jun 27, 2011 2:53 am

Almost all could be created with relative hidden DataTrack feature... (still nearly all harder calculations are in background calculated inside CF plugin with this feature)

So here it is:
Average Split not median but average time. This could be calculated simpler with avgactivetime bla bla.

{DATATRACKACTIVE}.GroupBy(o => o.LapNumber).Select(o => o.Count()).Average(o => o)

Fastest split:
{DATATRACKACTIVE}.GroupBy(o => o.LapNumber).Select(o => o.Count()).Min(o => o)
Slowest split:
{DATATRACKACTIVE}.GroupBy(o => o.LapNumber).Select(o => o.Count()).Max(o => o)

Of course this is only time in seconds, you can obtain hr or pace values too in theory.

Just an very simple explanation what I'm doing with this calculation:
I will take only points from activity that are active.
Than I will group them by split number.

And then get their count, what is in fact time in seconds (be carefult this applies only if you have set resolution of DataTrack feature to 1000 in CF settings)
If you will set resolution to 100, that return more accurate results. Than you need to divide result by 10.

Simply 1000 is 1000ms and 100 is 100ms etc...

Peter
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Re: Slowest split

Postby headwind » Mon Jun 27, 2011 9:45 am

That worked perfectly.

Thanks for a great plugin!
headwind
 
Posts: 3
Joined: Sun Jun 26, 2011 8:55 am


Return to Calculated Fields

Who is online

Users browsing this forum: No registered users and 1 guest