Calculated Fields

by camel

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



Apr 11, 2011

Percentage of time in Zone

Percentage of time in Zone

Postby Curt Nirenberg » Sun Mar 26, 2017 2:02 pm

Hi all,
I have three customer fields: Inzone , Outzone, and Percent. Inzone and Outzone are "elapsed time" fields and show the time spent in and out of a target zone.
Percent is where I want to divide Inzone by (Inzone + Outzone) to get a percentage of time spent Inzone. This doesn't work ( "0.00") is always the result
Is this possible to do or is there another way to accomplish this
Curt Nirenberg
Posts: 9
Joined: Wed Aug 20, 2014 12:09 am

Re: Percentage of time in Zone

Postby dirk66 » Thu Apr 06, 2017 5:24 pm


I suppose you want something like this:
Code: Select all
({DATATRACK}.Where(o => o.HR >=122 && o.HR < 140).Count()/{ACTIVETIME})*100
This gives the percentage of the time in a hr range regarding to the total activetime of an activity.
You also can try something like
Code: Select all
({ZONEHR(Standaard,Zone 3,LOW)}/{ACTIVETIME})*100
which gives you (beware of the names used in the formula) the percentage of the time of zones 1 - 3 in the hr category Standaard. However i'm not totaly sure what exactly low bind and high binding means as i'm not able to look in the code of the plugin.

Edit: use {HASHRTRACK} as condition to avoid useless calculations
Posts: 534
Joined: Thu Feb 26, 2009 6:40 am
Location: Oss, Netherlands

Re: Percentage of time in Zone

Postby tndmbkr » Fri Apr 07, 2017 5:11 am

ST can provide us with data how much time we have spend in each HRzone for the entire activity
ST can also provide us with the average HR for every split
But it is not possible to analyze splits and laps seperately.
That is why I use CustomDataTracks plugin to figure out how much time we have spend in each HRzone per split.

Create a calculated data track, named HRzoneD1
The formula

This will create a chart like this one below:
When you select a split wih your mousepointer, the CDTchart will tell you immediatetely, how much percent of the time you have spend in that particular HRzone.
In the selected darker blue area (between 47.16 and 59.09 minutes) I have spent 89.3 % of the time in zone D1.

You will have to create a CDTformula for every HRzone.

PS; Have you already considered the Distribution Plugin by PissedOffCil
Posts: 233
Joined: Wed Jan 11, 2012 2:39 am
Location: Rotterdam

Return to Calculated Fields

Who is online

Users browsing this forum: No registered users and 1 guest