Calculated Fields

by camel

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

Version:

1.2.9.4

Updated:

Apr 11, 2011

Calculated Fields plugin: Formulas pool

Calculated Fields plugin: Formulas pool

Postby camel » Tue Oct 12, 2010 3:14 pm

Hi,
I have created this thread to provide users with pool of user created formulas for Calculated Fields plugin.

Please post here your formulas with some instructions.
Screenshots will be usable too.

It will help other less experienced users to use this plugin. And of course
you will find here some nice ideas from other users.

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

Trails feature

Postby camel » Tue Oct 12, 2010 3:47 pm

Trails feature

I have created trail Pernek Main in Trails plugin.
Which is main ofted repeated part in my trainings.

Here is formula:
{TrailAvgHR(PernekMain,1)}

And here it how chart with custom field Pernek Main Avg Pace looks:
Image

You see nicely longer time trend of your condition on your trail.
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Calculated Fields Plugin

Postby GaryS » Tue Oct 12, 2010 6:30 pm

This is an outstanding plug-in with great functionality. Camel has done a superb job developing, and continuing to enhance, Calculated Fields.

I use it mainly to keep track of my times running up certain hills during my trail runs. For this, I use a basic formula:

{TrailAvgPace(Black Mountain Trail,1)}

I also use it to keep track of key race data:

{CATEGORY}.Contains("Race") ? {AvgPace}*1.6093002 : 0

Perhaps my most complicated formula is one that allows me to keep a trailing 7-day total for my running distance (instead of simply the weekly totals):

{Distance(Sum, 7)}/1000*.6213881 where Condition is: {Category}.Contains("Running")

The plug-in is capable of much more but for my trail running needs, these sample formulas are quite sufficient.

I use the calculated fields to generate reports, and that is how I view the trends over time.
GaryS
Donated!
Donated!
 
Posts: 77
Joined: Thu Jan 21, 2010 6:25 pm

Postby mazoaguirre » Tue Oct 12, 2010 11:24 pm

GaryS

thanks i use your idea to get analisys and make a report for a segment that i run often as a part of my warm up

this is the formulas

{TRAILAVGHR(Glorieta Campo,1)}

{TrailAvgPace(Glorieta Campo,1)}

{TRAILMAXHR(Glorieta Campo,1)}


in the other hand i cant undertand your fomula

{Distance(Sum, 7)}/1000*.6213881 where Condition is: {Category}.Contains("Running")

is about the sum of the distannce for the last 7 days?

and how to configure the custom field fort this one?
FR 310 and Foot Pod, Edge 500 and Cadence Sensor, GoPro HD 960
mazoaguirre.com
mazoaguirre
Contributor!
Contributor!
 
Posts: 1005
Joined: Fri May 27, 2005 6:29 pm
Location: San Felipe "Torres Mochas" Guanajuato Mexico

Postby GaryS » Tue Oct 12, 2010 11:46 pm

mazoaguirre wrote:in the other hand i cant undertand your fomula

{Distance(Sum, 7)}/1000*.6213881 where Condition is: {Category}.Contains("Running")

is about the sum of the distannce for the last 7 days?

and how to configure the custom field fort this one?


The formula gives me the total distance just for running for the previous 7 days. Sometimes, I do my long runs on Saturday and sometimes on Sunday. So, if I just use the weekly total, it could look strange when I compare different weeks. Looking at the trailing 7 days allows me to see a more consistent view of my average weekly distance.

Regarding formula, I just copied and pasted, It should work as is, except of course I am using miles not meters or km.

You could also use a similar formula for cycling. Just change the category condition to cycling.
GaryS
Donated!
Donated!
 
Posts: 77
Joined: Thu Jan 21, 2010 6:25 pm

Postby HENNES » Wed Oct 13, 2010 2:10 am

GaryS wrote:
mazoaguirre wrote:in the other hand i cant undertand your fomula

{Distance(Sum, 7)}/1000*.6213881 where Condition is: {Category}.Contains("Running")

is about the sum of the distannce for the last 7 days?

and how to configure the custom field fort this one?


The formula gives me the total distance just for running for the previous 7 days. Sometimes, I do my long runs on Saturday and sometimes on Sunday. So, if I just use the weekly total, it could look strange when I compare different weeks.


Hey, thats my favourate since years. :)

However my formula looks simpler - see here



Image




So im looking at 7+28+90 day sums, however most important for me is the 8/7Dsum (see red dots), which is a virtual-7-day-average. Reasoning: after long time injury I just start slowly running again and run only every 2nd day. So on the very day of a run, the last 7 days allways have 4 runs, which is wrong as my "running week" only has 3,5 days. Therefore I stretch the sum to 8 days and divide by 7, this number is much more true.

Also I use this brillant plugin to forecast this number with future inputs of planned trainings (cant call that jogging training, but Im outside :D) For this you have to place a checkmark in the top porting of the settings .- see red mark in top image.

All of this can be listed and charted into the future:



Image



well done, camel!

gruss hennes
rgds hennes
- kickbiking with FR 305 and STs 3

runner´s map ... EURE Karte für Laufveranstaltungen - zum MITMACHEN!!!
http://www.runnersmap.info
...mehr als DREI TAUSEND Laufveranstaltungen!
HENNES
Donated!
Donated!
 
Posts: 1158
Joined: Thu Feb 07, 2008 1:55 am
Location: Duesseldorf, Germany

Average pace in some heart rate range

Postby camel » Wed Oct 13, 2010 3:04 am

Here is my favorite. We will use Range feature.

Imagine that I have 5 HR zones. I do most of my aerobic training in HR zone 3. That's a range of HR from 157 to 171.

Now it will be very nice to see my average pace in trainings, in this zone.
Here is formula (it will just find all of the parts of activity where HR >= 157 and HR <= 171 and calculate average pace for these parts):
{RANGEPACE(HR,157,171)}
This will return pace in min/km, it's usable to fill it to custom field with type of number.

If you want to fill it in custom field of type Elapsed Time. Use this formula (just multiply by 60, you will get result in seconds)
{RANGEPACE(HR,157,171)}*60
Last edited by camel on Sat Oct 16, 2010 9:30 am, edited 2 times in total.
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

a bit more basic :)

Postby gmorgan » Wed Oct 13, 2010 5:09 am

well after those excellent examples of what can be done I am using it for a very basic task. My requirements are the same pretty much as GaryS.
I do some cycling each week and the main part of the cycle is maybe four or five hills. I track these hills using the trails plugin.
I then use the Calculated Fields plugin to get this information for me and make it easily available. I display the data on the custom Data Fields view and use it in reports.
so my process is to start with the ride, of course.
Define a trail that is the hill I want to track.
I create a custom data field with the name I want to see appear on the screen.
for example the custom data field would be called WellsWay. The type would be elapsed time, and the summarize would be minimum (as I'm interested in my quickest time up the hill). The Summarize (you may already know) relates to the summary of the data on the reports. so you could have two fields, one called WellsWay max and WellsWay min and have them summarize the quickest and slowest etc.
I then go to calculated Fields in the settings, choose the custom field just created, right click expression and choose Trails > Time.
then add the name of the Trail inside the brackets before the comma.
That is it. I can then use this information on the reports screen or just look at the custom data fields view against the daily activity.

I hope this all makes sense.
It's a lot of typing for a very simple calculation but I just want to help others that may want to do the same thing.
The crucial part is having the connection with the trails plugin :)
gmorgan
Donated!
Donated!
 
Posts: 28
Joined: Thu Sep 22, 2005 12:06 am
Location: Bath, UK

Postby camel » Wed Oct 13, 2010 6:20 am

Ok now few simple ones:

"Nearly" all values from plugin are returned as meters or seconds.

Conversion of distance from meter to miles(You have now ability to see both miles and kilometers in sporttracks):
{DISTANCE}/1609.344

Fill text NOGPS to all activities without GPS track:
Expression:"NOGPS"
Condition:!{HASGPSTRACK}
Something similar can be done with conditions like:
HASHRTRACK
HASELEVATIONTRACK
HASCADENCETRACK
HASPOWERTRACK

Or you can fill it to one custom field of type text at once:
{HASGPSTRACK} + "-" + {HASHRTRACK} + "-" + {HASELEVATIONTRACK} + "-" + {HASCADENCETRACK} + "-" + {HASPOWERTRACK}
So result will look like this for example:
True-True-True-True-True
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Postby camel » Wed Oct 13, 2010 6:26 am

Your fastest 1000meters within activity (it will return fastest time for 1000m in seconds):
{MINPEAKDISTANCE(Elapsed,1000)}
Condition:
{HASGPSTRACK}

It's nice to define this condition to not get 0 on activity when it doesn't have GPS track.

Your fastest 5minutes (300 seconds) in activity (it will return biggest distance taken in 5 minutes)
{MAXPEAKTIME(Distance,300)}
Condition:
{HASGPSTRACK}

Of course you can easily convert results to speed pace etc whatever you want.
Last edited by camel on Sun Oct 17, 2010 5:04 am, edited 2 times in total.
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Postby vax » Wed Oct 13, 2010 3:05 pm

A simple formula to begin with, inspired from the tutorial but a little more meaningful:
({DISTANCE}+{ASCENDING}*10)/1000

It is usually assumed that an ascent of 100 meters is equivalent to running an additional kilometer. This formula give an estimated distance taking ascent into account.
vax
Donated!
Donated!
 
Posts: 15
Joined: Wed Mar 24, 2010 9:17 am

Postby camel » Wed Oct 13, 2010 3:16 pm

Do you always wanted Recovery HR feature that polar has?

But you are too lazy to do it manually by doing split etc?

This formula will help you.
Just get a look at this HR chart (do you see selected part of HR chart, this is exactly the place where I was not running, and nice place to extract Recovery HR from here):

Image

This formula:
{RECOVERYHR(60)}
Will find automatically place of 60 seconds in activity, where your heart rate has dropped at most. And it will return heart rate difference within this range of 60 seconds. For example for this activity it will return 31.41 as a Recovery HR.

Of course you can do a conversion to calculate from this number something like performance index for your actual condition.
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Postby GaryS » Wed Oct 13, 2010 3:27 pm

vax wrote:A simple formula to begin with, inspired from the tutorial but a little more meaningful:
({DISTANCE}+{ASCENDING}*10)/1000

It is usually assumed that an ascent of 100 meters is equivalent to running an additional kilometer. This formula give an estimated distance taking ascent into account.


I like this formula and concept -- I have been looking for a way to equate trail runs with flatter road runs.

Can you cite a source or two that supports the assumption?
GaryS
Donated!
Donated!
 
Posts: 77
Joined: Thu Jan 21, 2010 6:25 pm

Postby vax » Wed Oct 13, 2010 3:59 pm

GaryS wrote:
vax wrote:A simple formula to begin with, inspired from the tutorial but a little more meaningful:
({DISTANCE}+{ASCENDING}*10)/1000

It is usually assumed that an ascent of 100 meters is equivalent to running an additional kilometer. This formula give an estimated distance taking ascent into account.


I like this formula and concept -- I have been looking for a way to equate trail runs with flatter road runs.

Can you cite a source or two that supports the assumption?

You can have a look there (but it is in french): http://www.conseils-courseapied.com/forum/61-divers/53529-evaluer-impact-du-denivele-sur-une-performance.html

On trouve parfois des équivalence du genre 100m de dénivelé positif sont équivalents à 0,5km (sur route) ou 1km (en trail) supplémentaire.

J'ai également trouvé des calculs plus précis :
"Pour les côtes, le surcoût énergétique est estimé (DILL, 1965) à :
DVO2 = % de pente x V x 1.31, DVO2 en ml/min/kg, V en m/s.
Pour PUGH (1970), le surcoût énergétique est de 20 ml/min/kg pour une pente de 8%, conduisant à une baisse de vitesse de 5 Km/h. Ceci est en concordance avec C.T.M. DAVIES (1980, 1981) qui trouve 2,6 ml/kg/min pour chaque pourcent de pente, correspondant à peu près à 0,65 Km/h.
Les résultats sont parfois assez discordants selon les auteurs (pour avoir égalité des résultats ci-dessus, il faut que le coureur aille à 7 Km/h dans la côte... ce n’est pas un coureur, c’est un jogger).
On peut néanmoins admettre une valeur assez standard fréquemment trouvée de 1 Km/h de perte de vitesse pour 1,5 % de pente, pour des vitesses moyennes et une pente pas trop importante, jusqu’à 12% environ (G. PUGH, 1970 ; C.T.M. DAVIES, 1980-1981)
Également, et d’une manière plus précise, on trouve un coefficient de coût énergétique, et donc de vitesse ou de distance (car sur plat, le coût énergétique au kilomètre parcouru est quasiment constant quelle que soit la vitesse, avec une approximation suffisante vis-à-vis de la précision des côtes rencontrées) :
% pente 1 2 3 4 5 6 7 8 9 10
Coeff 1,00 1,05 1,10 1,15 1,20 1,30 1,35 1,40 1,45 1,50
% pente 11 12 13 14 15 16 17 18 19 20
Coeff 1,55 1,60 1,70 1,80 1,90 2,0 2,25 2,50 2,75 3,0
Selon V. BILLAT, mai 1993.
Cela signifie par exemple que 2 kilomètres de pente à 8 % (côtes des gardes pour Paris-Versailles) font un équivalent de 2,8 kilomètres sur plat, ou que si on court à 16 Km/h sur le plat, cette côte sera montée à 11,4 Km/h.
A noter que ce tableau peut être utilisé si on cherche pour un dénivelé et une distance point à point donnés à minimiser le temps de parcours (course d’orientation par exemple). On s’aperçoit ainsi que si la pente la plus raide possible n’atteint pas 10%, on a intérêt à prendre le chemin le plus raide, mais qu’entre 10 et 20 % le coût énergétique sera à peu près équivalent. Une telle conclusion était loin d’être évidente au premier abord.
Pour les pentes négatives, C.T.M. DAVIES (1980, 1981) trouve une réduction du coût énergétique de 1,5 ml/kg/min, soit 0,35 Km/h en plus ; ceci n’est cependant exact que jusqu’à une certaine valeur de pente, pas trop importante, 12 % environ (PUGH, 1970 ; C.T.M. DAVIES, 1980, 1981)." (source)


As you can see, this 100m/1km equivalence is very rough but it is an interesting value.[/url]
vax
Donated!
Donated!
 
Posts: 15
Joined: Wed Mar 24, 2010 9:17 am

Postby mazoaguirre » Wed Oct 13, 2010 3:59 pm

camel wrote:Do you always wanted Recovery HR feature that polar has?



This formula:
{RECOVERYHR(60)}
Will find automatically place of 60 seconds in activity, where your heart rate has dropped at most. And it will return heart rate difference within this range of 60 seconds. For example for this activity it will return 31.41 as a Recovery HR.

Of course you can do a conversion to calculate from this number something like performance index for your actual condition.


OK BUT WHAT ABOUT WHEN IS INTERVAL TIME

i did last week 3x4x300 con 60 seconds rest if a put the formula i get 59.6, i think i get an avg dont?
FR 310 and Foot Pod, Edge 500 and Cadence Sensor, GoPro HD 960
mazoaguirre.com
mazoaguirre
Contributor!
Contributor!
 
Posts: 1005
Joined: Fri May 27, 2005 6:29 pm
Location: San Felipe "Torres Mochas" Guanajuato Mexico

Postby Stumpjumper68 » Wed Oct 13, 2010 4:29 pm

mazoaguirre wrote:
camel wrote:Do you always wanted Recovery HR feature that polar has?



This formula:
{RECOVERYHR(60)}
Will find automatically place of 60 seconds in activity, where your heart rate has dropped at most. And it will return heart rate difference within this range of 60 seconds. For example for this activity it will return 31.41 as a Recovery HR.

Of course you can do a conversion to calculate from this number something like performance index for your actual condition.


OK BUT WHAT ABOUT WHEN IS INTERVAL TIME

i did last week 3x4x300 con 60 seconds rest if a put the formula i get 59.6, i think i get an avg dont?


It will show just the number of the biggest drop of HR.
Image
Stumpjumper68
Donated!
Donated!
 
Posts: 1074
Joined: Thu Oct 11, 2007 3:39 pm
Location: Bad Vilbel, Germany

Postby mazoaguirre » Wed Oct 13, 2010 4:41 pm

Thanks it makes sense :oops:
FR 310 and Foot Pod, Edge 500 and Cadence Sensor, GoPro HD 960
mazoaguirre.com
mazoaguirre
Contributor!
Contributor!
 
Posts: 1005
Joined: Fri May 27, 2005 6:29 pm
Location: San Felipe "Torres Mochas" Guanajuato Mexico

Postby gerhard » Wed Oct 13, 2010 4:53 pm

GaryS wrote:I have been looking for a way to equate trail runs with flatter road runs.


Offtopic, there has been other similar discussions about scores.
While such an index can be added to this plugin, I believe it should belong to a separate plugin.

GOVSS
http://www.physfarm.com/inside/articles ... govss.html
Seem the best bet in my opinion. mechgt consider adding it to TrainingLoad, I believe

rTSS
http://www.peaksware.com/personal-editi ... cores.aspx
Used in TrainingPeaks. Maybe simplified variant of GOVSS. Less documented?

Estimated Power as in omb's GPS2Power
Gives a score for each point of a course, can be used to compare running/cycling
However, seem a little inaccurate
gerhard
Contributor!
Contributor!
 
Posts: 1747
Joined: Mon Nov 27, 2006 7:07 pm
Location: Sweden

Postby GaryS » Wed Oct 13, 2010 5:12 pm

gerhard wrote:
GaryS wrote:I have been looking for a way to equate trail runs with flatter road runs.


Offtopic, there has been other similar discussions about scores.
While such an index can be added to this plugin, I believe it should belong to a separate plugin.

GOVSS
http://www.physfarm.com/inside/articles ... govss.html
Seem the best bet in my opinion. mechgt consider adding it to TrainingLoad, I believe

rTSS
http://www.peaksware.com/personal-editi ... cores.aspx
Used in TrainingPeaks. Maybe simplified variant of GOVSS. Less documented?

Estimated Power as in omb's GPS2Power
Gives a score for each point of a course, can be used to compare running/cycling
However, seem a little inaccurate


Gerhard and vax,

Thanks for these references. This is a very interesting and relevant subject for me, as I enjoy running trails far more than roads. Yet, I run flat road marathons too and want to be able to effectively train for these races with as little 'road' time as possible!
GaryS
Donated!
Donated!
 
Posts: 77
Joined: Thu Jan 21, 2010 6:25 pm

Postby Stumpjumper68 » Wed Oct 13, 2010 5:39 pm

Here are some expression I use:

Bike score to show climby bike index:
({Ascending}/{Distance}*100)*4+{Ascending}*{Ascending}/{Distance}+{Distance}/1000 with condition: {Category}.Contains("MTB")

I've set my self a goal for ascending HM for 2010:
100000-{Ascending(Sum,365)} with condition: {DATE}.Contains("2010")&&{CATEGORY}.Contains("Cycling") it shows how many HM I still have to do in 2010 to match my goal.

Another goal I set for distance is:
7500-{Distance(Sum,365)}/1000 with condition: {DATE}.Contains("2010")&&{CATEGORY}.Contains("Cycling")

It's amazing to create charts in reports view together with athlete data. You can make your personal performance prediction. For example I've recognized that I perform much better if I sleep 1 hour less than normal. So on racedays I sleep now a bit less.

Many many thanks to camel this plugin adds nearly endless possiblities they're just limited by the user.
Image
Stumpjumper68
Donated!
Donated!
 
Posts: 1074
Joined: Thu Oct 11, 2007 3:39 pm
Location: Bad Vilbel, Germany

Postby clackerz » Wed Oct 13, 2010 6:25 pm

I'm loving this plugin and now seeing all the examples my head is ready to explode!
And thanks to camel for putting up some wiki tutorials as well, makes life so much easier....

I'm looking for some assistance with a particular search type function...

Say I'm training on Hills, and I have many throughout my logbook, but I'm looking for any hills with certain criteria - say avg grade of 5% that covers a distance of 5kms or greater.

Can this be done here?

Or is this something more for the Course Score Plugin (new feature of searching with criteria to locate hills). Currently the plugin will find same or similar hills from an already predetermined selection.
Image
clackerz
Contributor!
Contributor!
 
Posts: 1077
Joined: Sun Jun 24, 2007 10:26 pm
Location: Melbourne, Australia

Postby vax » Thu Oct 14, 2010 2:45 am

In fact, the correction factors in the mentionned table can be approximated by the following equation where x is the grade and y the correction factor.
Code: Select all
y = 0,0005x^3 - 0,0117x^2 + 0,1263x + 0,840


As there is a grade data track, we can "easily" calculate the corresponding factor for each point and get the corresponding adjusted speed and distance.
vax
Donated!
Donated!
 
Posts: 15
Joined: Wed Mar 24, 2010 9:17 am

Postby camel » Thu Oct 14, 2010 5:25 am

clackerz wrote:Say I'm training on Hills, and I have many throughout my logbook, but I'm looking for any hills with certain criteria - say avg grade of 5% that covers a distance of 5kms or greater.


Would it be enough to create similar function like FASTESTDISTANCE(1000) but
LONGESTGRADE(5)
And this function will just find longest distance where average grade is >= 5%?

or
something crazy I don't know correct english for this :)
HILLIESTDISTANCE(5000)
that will return biggest grade for 5000meters? ;)


And is there a need from someone else to get similar function for something other or same?

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

Postby dmcaf » Thu Oct 14, 2010 10:18 am

gerhard wrote:
GaryS wrote:I have been looking for a way to equate trail runs with flatter road runs.


Offtopic, there has been other similar discussions about scores.
While such an index can be added to this plugin, I believe it should belong to a separate plugin.


Further offtopic - This was the intended goal behind the Course Score plugin. To give you a measurable score for a route based on the elevation profile. The math for the course score is based on power vs grade calculations. Take a look and shoot me a note if you have any questions.

Now back to your regularly scheduled thread... :)
dmcaf
Donated!
Donated!
 
Posts: 53
Joined: Mon Oct 27, 2008 7:48 am

Postby Stumpjumper68 » Thu Oct 14, 2010 4:43 pm

camel wrote:
clackerz wrote:Say I'm training on Hills, and I have many throughout my logbook, but I'm looking for any hills with certain criteria - say avg grade of 5% that covers a distance of 5kms or greater.


Would it be enough to create similar function like FASTESTDISTANCE(1000) but
LONGESTGRADE(5)
And this function will just find longest distance where average grade is >= 5%?

or
something crazy I don't know correct english for this :)
HILLIESTDISTANCE(5000)
that will return biggest grade for 5000meters? ;)


And is there a need from someone else to get similar function for something other or same?

Thanks


Does MAXAVGGRADE(5000) makes more sense?
Image
Stumpjumper68
Donated!
Donated!
 
Posts: 1074
Joined: Thu Oct 11, 2007 3:39 pm
Location: Bad Vilbel, Germany

Next

Return to Calculated Fields

Who is online

Users browsing this forum: No registered users and 1 guest