Calculated Fields

by camel

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

Version:

1.2.9.4

Updated:

Apr 11, 2011

Calculated Fields plugin: Formulas pool

Postby rikicarra » Fri Nov 05, 2010 6:11 pm

camel wrote:Hi,
I'm thinking about adding possibility to set temporary specific smoothing settings for your calculation.

Smoothing influences results of Peak and Range features. And it influence results of DataTrack feature too.

So with this settings you will have ability to set specific smoothing settings only for one calculation. Or you will set different smoothing settings for another calculation etc. Or not set anything and default sporttracks settings for smoothing will be applied.

Is someone interested in this feature?

And if yes, could we apply this smoothing settings for all datatracks at once. Or you need specific settings for each datatrack? (like HR smoothing of 30 but pace 100 for one calculation, or 30 for both)

Thanks
Peter


Peter, yes!
I have been thinking exactly at that feature. The reason is that I have some activities with odds altitude (not recorded with gps+barometer) and that creates horrible spikes of grade. I have even been thinking about exporting the elevation, smoothing and then reimporting...
You have my thumb up for that feature!!!

Thank you and keep going.
Riccardo
rikicarra
 
Posts: 73
Joined: Sun May 03, 2009 8:05 am

Postby Xiaoan » Sat Nov 06, 2010 8:05 am

Xiaoan wrote:
camel wrote:
Xiaoan wrote:
HENNES wrote:
Xiaoan wrote:Thanks for the reply, I guessed already datatracks might make this possible :)

One more question, can't seem to find the field activity-calories, can I access it somehow?

I wanna do something like

{Calories(SUM,10)} / 10

to get my average calories burned a day


try: ATHLETECALORIES


That are the calories that u manually enter in the athlete view, not the calories of the activity, but I found a way around that I like quite a lot.

I have a field that calculates the "cooper" distance

{MAXPEAKTIME(Distance,720)}

From that I calculate the "V02max" in another field:

({Cooper(Max,356)}- 504.9) / 44.73

From that I calculate the "calories":

({TIME}/60)*((-59.3954 + (-36.3781 + 0.271 * 35 + 0.394 * {ATHLETEWEIGHT} + 0.404 * {V02max} + 0.634 * {AVGHR}))/4.184)

Now I can do my average 8)

Only problem I have is the age (The 35 in the above formula). How can I get that dynamically?

P.s.: For women the formula is

C/min = (-59.3954 + (0.274 x age + 0.103 x weight + 0.380 x VO2max + 0.450 x HR)) / 4.184


I will add it in next version of plugin:
Age (will be calculated from date of birth an actual activity date)
DateOfBirth
Height
Sex

I like this crazy formula, I wasn't awaiting that some users will go so far...

Peter


Thanx!

Of cause for this to give good results, you should actually do a cooper test once in a while. There is another formula I found to calculate the VO2max according to "Daniels and Gilbert":

VO2 Max=(-4.60 + 0.182258 * velocity + 0.000104 * velocity^2)/(0.8 + 0.1894393 * e^(-0.012778 * time) + 0.2989558 * e^(-0.1932605 * time))
velocity in metres per minute and time in minutes

No idea which one is more accurate, but the Cooper formula seems to give very good results for the calories.

If you integrate this approach there should be the option to actually enter the VO2max as a value for the ppl who tested it.

Greetings,

Andre


Just one more thing regarding the Daniels and Gilbert Formula, it is supposed to be used with the Blake Test, not Cooper. Won't make a big difference, just wanted to mention it.
Xiaoan
 
Posts: 33
Joined: Wed Sep 29, 2010 4:37 am
Location: Maintal, Germany

Postby PissedOffCil » Sat Nov 06, 2010 10:00 am

I don't think there's an easy way to get normalized power yet and I think it would be better if integrated directly in the plugin for faster calculation. Here is the formula to measure normalized power :

1) Take a 30 sec rolling avergare for power
2) Put all value from step 1 to the 4th power
3) Take the average from the result data track
4) Put result of step 3 to the fourth root

The rolling average is not possible yet, even with the datatrack feature I think. Am I right?

Ideally, the rolling average could be added, everything else being doable already. This way we could find the peak normalized power over time. In the end I'm looking to get these fields
{MAXPEAKTIME(NormalizedPower, 3600)} and
{MAXPEAKTIME(NormalizedPower, 5400)}
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Postby camel » Sat Nov 06, 2010 10:16 am

PissedOffCil wrote:I don't think there's an easy way to get normalized power yet and I think it would be better if integrated directly in the plugin for faster calculation. Here is the formula to measure normalized power :

1) Take a 30 sec rolling avergare for power
2) Put all value from step 1 to the 4th power
3) Take the average from the result data track
4) Put result of step 3 to the fourth root

The rolling average is not possible yet, even with the datatrack feature I think. Am I right?

Ideally, the rolling average could be added, everything else being doable already. This way we could find the peak normalized power over time. In the end I'm looking to get these fields
{MAXPEAKTIME(NormalizedPower, 3600)} and
{MAXPEAKTIME(NormalizedPower, 5400)}


I think that rolling average could be done from DataTrack.

See this crazy syntax for finding 60 seconds with biggest heart rate drop within them:
{DATATRACKWITHPAUSES}.Select((o,index) => new {Elapsed = o.Elapsed, HR = ({DATATRACKWITHPAUSES}[((index+60) < {DATATRACKWITHPAUSES}.Count) ? index + 60 : index].HR == 0) ? 0 : o.HR - {DATATRACKWITHPAUSES}[((index+60) < {DATATRACKWITHPAUSES}.Count) ? index + 60 : index].HR}).OrderBy(o => o.HR).Last()

You will too need to project all points into new type where rolling average will be calculated.
You will need to nest datatrack.

But it's not a thing that could be done in 30 seconds to invent ;)
So if you want to create it just do. I can implement rolling average inside of plugin or just create DataTrack formula for it. But it will be not today. I'm lost with different things of plugin now.

But there will be still a problem with Peak and Range features. To use them on this normalized power track.
Workaround will be probably DataTrack formula that will do same thing like Peak or Range. But in DataTrack syntax.

But this will be provided and more supported in next official version.
There is a low of work to support.

P.S: I'm gladly accepting request for new features I like the way where plugin goes. So thanks for this. But I'm trying now to end with developing new "static" formulas. And provide more nonstandard functionality only with DataTrack feature.

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

Postby PissedOffCil » Sat Nov 06, 2010 10:18 am

Holy molly. I'll take some time to read that crazy expression!!! I'll be back.
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Postby camel » Sat Nov 06, 2010 10:31 am

PissedOffCil wrote:Holy molly. I'll take some time to read that crazy expression!!! I'll be back.


I recommend to use LINQPad for creating queries for DataTrack.
http://www.linqpad.net/

It's very powerfull small application for snippets building and testing. In fact it's an small Visual Studio on USB :).
It interprets your expressions or whole programs in dynamic way.
So it's incredibly useful for testing small snippets outside of Visual Studio.
And it has very useful generic Dump method for showing your results.

You need to buy autocompletion for it if you want it. But I really recommend it. It's probably most useful small application that I have.

And you can easily take definition of DataTrackPoint from CF plugin source, and create some dummy list inside of LINQPad to test your formulas. That's how I'm doing it.

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

Postby camel » Sat Nov 06, 2010 3:17 pm

Released new build 1.2.8.4

ChangeLog:
Major rework of DataTrack feature, it's now much faster, you can set resolution of DataTrack (it influences accuracy of Range and Peak formulas too)
Added possibility of settings smoothing settings of data for each calculation (0 is default, than smoothing settings of ST is used)
Added fields for zones bounds (see Zones in dropdown menu)
Added new athlete fields (Age, Height, Date of birth, Sex) See Athlete dropdownmenu for exact syntax
Added dropdown menu DataTrack with few examples

Other fixes (stopped time is now correctly evaluated in Range and Peak formulas, please recalculate your values, if your are using stopped speed)

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

Postby HENNES » Sat Nov 06, 2010 3:27 pm

camel wrote:Released new build 1.2.8.4


Damn, and I thought I would have time to watch NYC Marathon in TV on sunday :twisted:
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

Postby camel » Sat Nov 06, 2010 6:20 pm

Release 1.2.8.5 released.

ChangLog
Just an small bugfix of DataTrack feature that probably no one can discover...
Last edited by camel on Sun Nov 07, 2010 3:28 am, edited 2 times in total.
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Postby camel » Sat Nov 06, 2010 6:25 pm

PissedOffCil wrote:I don't think there's an easy way to get normalized power yet and I think it would be better if integrated directly in the plugin for faster calculation. Here is the formula to measure normalized power :

1) Take a 30 sec rolling avergare for power
2) Put all value from step 1 to the 4th power
3) Take the average from the result data track
4) Put result of step 3 to the fourth root

The rolling average is not possible yet, even with the datatrack feature I think. Am I right?

Ideally, the rolling average could be added, everything else being doable already. This way we could find the peak normalized power over time. In the end I'm looking to get these fields
{MAXPEAKTIME(NormalizedPower, 3600)} and
{MAXPEAKTIME(NormalizedPower, 5400)}


If I'm correct here is DataTrack formula for rolling average of 30 or 31 seconds? :)

{DATATRACKWITHPAUSES}.Select((o, index) => new { RollingAvg = DATATRACKWITHPAUSES.Where((a, aindex) => aindex <= index && aindex >= (((index - 30) >= 0) ? index - 30 : 0)).Average(a => a.Power) })

Just for an start. Of course this return whole datatrack of rolling averages so you need to do something next with these data.

For example (to get average of rolling averages...):
{DATATRACKWITHPAUSES}.Select((o, index) => new { RollingAvg = DATATRACKWITHPAUSES.Where((a, aindex) => aindex <= index && aindex >= (((index - 30) >= 0) ? index - 30 : 0)).Average(a => a.HR) }).Average(r => r.RollingAvg)

You need latest build to get this working.

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

Postby PissedOffCil » Sat Nov 06, 2010 9:57 pm

camel wrote:If I'm correct here is DataTrack formula for rolling average of 30 or 31 seconds? :)

{DATATRACKWITHPAUSES}.Select((o, index) => new { RollingAvg = DATATRACKWITHPAUSES.Where((a, aindex) => aindex <= index && aindex >= (((index - 30) >= 0) ? index - 30 : 0)).Average(a => a.Power) })

Just for an start. Of course this return whole datatrack of rolling averages so you need to do something next with these data.

For example (to get average of rolling averages...):
{DATATRACKWITHPAUSES}.Select((o, index) => new { RollingAvg = DATATRACKWITHPAUSES.Where((a, aindex) => aindex <= index && aindex >= (((index - 30) >= 0) ? index - 30 : 0)).Average(a => a.HR) }).Average(r => r.RollingAvg)

You need latest build to get this working.

Nice day
Peter


You amaze me once more! Thanks!
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Postby camel » Sun Nov 07, 2010 3:27 am

camel wrote:
Release 1.2.8.5 released.

ChangLog
Just an small bugfix of DataTrack feature that probably no one can discover...


Hi,
sorry guys but I have introduced few problems in newest build. So I have deleted last version from catalogue.

Please revert to old version to get all functions properly. (1.2.7.0)
I need to make some work before going to public with new build.
You will probably need to uninstall version 1.2.8.5 and than install old.

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

Postby PissedOffCil » Sun Nov 07, 2010 6:07 am

camel wrote:Hi,
sorry guys but I have introduced few problems in newest build. So I have deleted last version from catalogue.


It's great to see you are not perfect! ;)
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Postby PissedOffCil » Sun Nov 07, 2010 6:30 am

Here are the formulas I built up to now (with help from camel of course)

Decoupling factor (generic)
Code: Select all
Formula : ({First segment decoupling factor} - {Second segment decoupling factor}) * 100.0 / ({First segment decoupling factor})
Condition : {HASPOWERTRACK} && {HASHRTRACK}


The two above expressions are virtual expression that go like this :
1st segment
Code: Select all
Formula : {DATATRACK}.Where(o => o.LapNote == "First segment").Average(o => o.Power) - {DATATRACK}.Where(o => o.LapNote == "First segment").Average(o => o.HR)
Condition : {HASPOWERTRACK} && {HASHRTRACK} && {DATATRACK}.Where(o => o.LapNote == "First segment").Count() > 0


2nd segment
Code: Select all
Formula : {DATATRACK}.Where(o => o.LapNote == "Second segment").Average(o => o.Power) - {DATATRACK}.Where(o => o.LapNote == "Second segment").Average(o => o.HR)
Condition : {HASPOWERTRACK} && {HASHRTRACK} && {DATATRACK}.Where(o => o.LapNote == "Second segment").Count() > 0


There you go. Now how do you use this? Well for Calculated Fields to spot both segments of the operation, you must add notes inside the split you wish to use. The first split/half needs a note "First segment" and the second one must be "Second segment". This way you can get decoupling factors for 2x20, 2x40, 3x20, 1x60, etc. by simply using the adding a notes in the right splits.

Want your Normalized power? Here you go
Code: Select all
Formula : Math.Pow({NP steps 1-2}.Average(o => o.RollingAvg), 0.25)
Condition : {HASPOWERTRACK}


It uses the Nested expression "NP steps 1-2" (4th power of 30 second rolling avg.) :
Code: Select all
Formula : {DATATRACKWITHPAUSES}.Select((o, index) => new { RollingAvg = Math.Pow({DATATRACKWITHPAUSES}.Where((a, aindex) => aindex <= index && aindex >= (((index - 30) >= 0) ? index - 30 : 0)).Average(a => a.Power), 4) })


All these require the DATATRACK feature (version 1.2.8.x) which has been removed but it'll be back soon enough!

I also use a "active pedaling time" field (cadence > 50)
Code: Select all
Formula : {RANGEELAPSED(Cadence,50,200)}
Condition : {HASCADENCETRACK}


and of course it's interesting in percent of time as well
Code: Select all
Formula : {RANGEELAPSED(Cadence,50,200)} * 100.0  / {TIME}
Condition : {HASCADENCETRACK}
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Postby camel » Sun Nov 07, 2010 6:45 am

PissedOffCil wrote:
camel wrote:Hi,
sorry guys but I have introduced few problems in newest build. So I have deleted last version from catalogue.


It's great to see you are not perfect! ;)


It was bad design step to create syntax for field within {}

I need them for DataTrack feature ;)
And it's creating evil things now, when I tried one solution how to handle them...

I must think more about this problem.

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

Postby PissedOffCil » Sun Nov 07, 2010 7:37 am

camel wrote:
PissedOffCil wrote:
camel wrote:Hi,
sorry guys but I have introduced few problems in newest build. So I have deleted last version from catalogue.


It's great to see you are not perfect! ;)


It was bad design step to create syntax for field within {}

I need them for DataTrack feature ;)
And it's creating evil things now, when I tried one solution how to handle them...

I must think more about this problem.

Peter


Indeed a weird choice. But I noticed it works even without the brackets... well for "generic" fields at least.

Edit : I suggest using "@" and fixing saved expressions on load to ease the transition
Developer of the Garmin Fitness, Filtered Statistics and Distribution plugins
PissedOffCil
Donated!
Donated!
 
Posts: 1589
Joined: Sat Jul 05, 2008 9:18 pm
Location: Chicoutimi, Qc, Canada

Postby camel » Sun Nov 07, 2010 8:40 am

PissedOffCil wrote:
camel wrote:
PissedOffCil wrote:
camel wrote:Hi,
sorry guys but I have introduced few problems in newest build. So I have deleted last version from catalogue.


It's great to see you are not perfect! ;)


It was bad design step to create syntax for field within {}

I need them for DataTrack feature ;)
And it's creating evil things now, when I tried one solution how to handle them...

I must think more about this problem.

Peter


Indeed a weird choice. But I noticed it works even without the brackets... well for "generic" fields at least.

Edit : I suggest using "@" and fixing saved expressions on load to ease the transition


I need to know where is an end of field so @ is not ideal. (because of nested expressions etc.)

Or something stupid like @{ and @}
But it will be a problem for users than.
;)

Or #CustomfField##
...

I will wait for good idea, I'm not so in hurry.
And worst problem is changing of all tutorials ;)
So I will like to stay with {}. And just implement an workaround for datatrack feature.

Yes something could be fully functional without {} but it's not standard, you need to have a luck for that ;) But for example DataTrack doesn't needs {}.

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

Postby camel » Sun Nov 07, 2010 2:00 pm

camel wrote:Released new build 1.2.8.4

ChangeLog:
Major rework of DataTrack feature, it's now much faster, you can set resolution of DataTrack (it influences accuracy of Range and Peak formulas too)
Added possibility of settings smoothing settings of data for each calculation (0 is default, than smoothing settings of ST is used)
Added fields for zones bounds (see Zones in dropdown menu)
Added new athlete fields (Age, Height, Date of birth, Sex) See Athlete dropdownmenu for exact syntax
Added dropdown menu DataTrack with few examples

Other fixes (stopped time is now correctly evaluated in Range and Peak formulas, please recalculate your values, if your are using stopped speed)

Enjoy
Peter


Published 1.2.8.6:

Changelog:
Fixes of bugs related to {}

Simply fix of build 1.2.8.5 (I hope )

Features are same

:?:

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

Postby GaryS » Sun Nov 07, 2010 3:14 pm

camel wrote:
camel wrote:Released new build 1.2.8.4


Other fixes (stopped time is now correctly evaluated in Range and Peak formulas, please recalculate your values, if your are using stopped speed)



My Range formula is no longer working for tracks where I have watch pauses. Works fine in other tracks. I am using a virtual expression, {QuarterDistance}, and that calculates fine but when used in a Range formula for 1st Quarter Pace, the expression returns 0:00 for those tracks where there are watch pauses somewhere along the track.

Could you please have another look at how you are taking watch pauses into consideration?

Thanks.
GaryS
Donated!
Donated!
 
Posts: 77
Joined: Thu Jan 21, 2010 6:25 pm

Postby camel » Sun Nov 07, 2010 3:39 pm

GaryS wrote:
camel wrote:
camel wrote:Released new build 1.2.8.4


Other fixes (stopped time is now correctly evaluated in Range and Peak formulas, please recalculate your values, if your are using stopped speed)



My Range formula is no longer working for tracks where I have watch pauses. Works fine in other tracks. I am using a virtual expression, {QuarterDistance}, and that calculates fine but when used in a Range formula for 1st Quarter Pace, the expression returns 0:00 for those tracks where there are watch pauses somewhere along the track.

Could you please have another look at how you are taking watch pauses into consideration?

Thanks.


Hi,
Could you please send me an example activity and your formulas that are influenced in this calculation to email?

I will get a look at that.

And it will be nice to tell me your stopped speed settings for given category. (this was main change, before this plugin has calculated ranges on parts of activity that were stopped because your speed was below stopped speed)

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

Postby rikicarra » Sun Nov 07, 2010 4:33 pm

Peter, with the new build I see some differences in a formula. The expression is {MAXPEAKTIME(ClimbSpeed,3600)}, to calculate the max ascending speed over one hour. With the previous version I had this value calculated for all my activities, now I receive an error message on some activities:
http://img181.imageshack.us/img181/6587 ... rrorme.jpg

PS. I don't see here on the left the "Donated!" message, even if I have donated...
rikicarra
 
Posts: 73
Joined: Sun May 03, 2009 8:05 am

Postby GaryS » Sun Nov 07, 2010 8:58 pm

camel wrote:
GaryS wrote:
camel wrote:
camel wrote:Released new build 1.2.8.4


Other fixes (stopped time is now correctly evaluated in Range and Peak formulas, please recalculate your values, if your are using stopped speed)



My Range formula is no longer working for tracks where I have watch pauses. Works fine in other tracks. I am using a virtual expression, {QuarterDistance}, and that calculates fine but when used in a Range formula for 1st Quarter Pace, the expression returns 0:00 for those tracks where there are watch pauses somewhere along the track.

Could you please have another look at how you are taking watch pauses into consideration?

Thanks.


Hi,
Could you please send me an example activity and your formulas that are influenced in this calculation to email?

I will get a look at that.

And it will be nice to tell me your stopped speed settings for given category. (this was main change, before this plugin has calculated ranges on parts of activity that were stopped because your speed was below stopped speed)

Thanks
Peter


Problem is with watch pauses, not 'stopped' time as defined by ST category.

Formula is: {RangeElapsed(Distance,0,{QuarterDistance})} / {QuarterDistance} * 1609

Works fine in tracks with no watch pauses.

QuarterDistance is a virtual expression: {DISTANCE}/4
GaryS
Donated!
Donated!
 
Posts: 77
Joined: Thu Jan 21, 2010 6:25 pm

Postby camel » Mon Nov 08, 2010 3:34 am

rikicarra wrote:Peter, with the new build I see some differences in a formula. The expression is {MAXPEAKTIME(ClimbSpeed,3600)}, to calculate the max ascending speed over one hour. With the previous version I had this value calculated for all my activities, now I receive an error message on some activities:
http://img181.imageshack.us/img181/6587 ... rrorme.jpg

PS. I don't see here on the left the "Donated!" message, even if I have donated...


Hi, I see that problem.
Will be corrected in near time with new build. It's popping only if that peak wasn't found in activity although...

That's because peaks with pauses are not taken into calculation.

Simply error will be gone but for that activity no Peak will be found.

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

Postby camel » Mon Nov 08, 2010 4:03 am

GaryS wrote:
camel wrote:
GaryS wrote:
camel wrote:
camel wrote:Released new build 1.2.8.4


Other fixes (stopped time is now correctly evaluated in Range and Peak formulas, please recalculate your values, if your are using stopped speed)



My Range formula is no longer working for tracks where I have watch pauses. Works fine in other tracks. I am using a virtual expression, {QuarterDistance}, and that calculates fine but when used in a Range formula for 1st Quarter Pace, the expression returns 0:00 for those tracks where there are watch pauses somewhere along the track.

Could you please have another look at how you are taking watch pauses into consideration?

Thanks.


Hi,
Could you please send me an example activity and your formulas that are influenced in this calculation to email?

I will get a look at that.

And it will be nice to tell me your stopped speed settings for given category. (this was main change, before this plugin has calculated ranges on parts of activity that were stopped because your speed was below stopped speed)

Thanks
Peter


Problem is with watch pauses, not 'stopped' time as defined by ST category.

Formula is: {RangeElapsed(Distance,0,{QuarterDistance})} / {QuarterDistance} * 1609

Works fine in tracks with no watch pauses.

QuarterDistance is a virtual expression: {DISTANCE}/4


I have created your formula. And run it on all my activities. (and I have found one error popping when activity has no GPS track, this will be fixed in next build)
But It has calculated always something that is not 0.

So I cannot reproduce your problem. Could you send me please activity where it calculate 0 for you?
And speed threshold will be nice too.

Without this I cannot solve it.

P.S: and I have watch pauses there too

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

Postby camel » Mon Nov 08, 2010 9:44 am

New build 1.2.8.7 is released

It fixes some bugs with Range and Peak feature.

GaryS problem is "solved" too.
It's an hardly explained behaviour of C# compiler with integers and floats dealing.

I will write an article on webpage in some time about this.

For now if you want to calculate something for example QuarterDistance:
{DISTANCE} / 4
This formula will return 0 if distance is 3. Because 3 / 4 = 0 (int / int = int)
Because both of numbers are integer, than result is too integer.

This can sometimes return bad result. It's better to write this formula if you want to return number with decimal places:
{DISTANCE} / 4f
So now it will be calculated like (int or float) / float = float

Just add an f to end of your numbers or numbers field to make numbers with decimal places from them.

Probably you don't understand but I will write more comprehensive article about it later.

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

PreviousNext

Return to Calculated Fields

Who is online

Users browsing this forum: No registered users and 1 guest

cron