Custom interval fields

Future activities should be filled in automatically.
Past activities you have to re-analyze from Actions menu.

1 Like

Thanks!
I also made a field showing RE for the activity as

activity.average_speed / activity.icu_average_watts * activity.icu_weight

And for interval-less activites these two fields show slightly different results. What could be the reason for that?

Activity average speed is calculated over ‘Moving Time’ while Intervals average speed is over ‘Elapsed Time’.
You will see the same difference comparing the summary numbers and the chart numbers. The more ‘stopped’ time, the bigger the difference.

Ok, I changed “RE interval” to

interval.distance / interval.elapsed_time / interval.average_watts * activity.icu_weight

and “RE activity” to

activity.distance  / activity.elapsed_time / activity.icu_average_watts * activity.icu_weight

Still the same difference. And if I change “elapsed” to “moving” in both, still the same difference.

Average power is calculated differently?

You could just print the values, and see where/what is the difference.

console.log(interval.elapsed_time);

But I have to say, that moving_time for intervals is always the same as elapsed_time for intervals.
@david Don’t know if that’s intended or a bug.
Therefore I did some time ago an own interval field with “Moving Time”.

I compared interval and activity data for a run without intervals:

  • elapsed time is different
  • moving time is different
  • distance is the same
  • average power is different

Speed and power are positive during all time, including first and last seconds.

What’s the result if you make an interval that spans the entire activity?

How can I find it?! Thxxx!

I’ve a (public) custom interval field VE-EF that generally works fine, but does not fill upon original loading of the file, only after manually reprocessing the file again.

I have “process fit file messages” selected. The javascript is as follows:

{
  interval.average_tidal_volume_min > 0 ? 
    interval.average_watts / interval.average_tidal_volume_min : 
    undefined
}

Any idea what’s going on here and how to fix it – such that it computes and displays the intervals on original load and when defining additional intervals with the mouse cursor?

The field has another “funny behavior” as in that it does not show a description in the list of fields despite me having defined a description in the definition of the field…

Try without “process fit file messages” as you are interacting with “icu” interval objects, not fit file messages. And (re)Analyse no need to Reprocess (fit file).

1 Like

You don‘t have to reprocess. That‘s only necessary for e.g. fit file processing.
Are you sure your average tidal is > 0 at the time of the calculation. You could test it with something like that, and see if anything (=12345) is displayed, or if it still doesn‘t show a value:

{
  interval.average_tidal_volume_min > 0 ? 
    interval.average_watts / interval.average_tidal_volume_min : 
    12345;
}

On my side, it changes the calculation of interval fields immediatly without reanalyzing or reprocessing.

1 Like

:+1:t2:
Wasn’t aware f this. Will try this next time.

Well, that’s essentially my question. After I reprocessed, it displayed correct values.
Thus, I was wondering if there was some kind of race condition or other details I missed when I assumed the field definition should just work… As I wrote, to does work for the same activity after reprocess.
I’ll see what happens next time. And then, if necessary, see if “re-analyze” helps.
And then I will test your advise to set it to a very large value. Which would still leave the question why the interval.average_tidal_volume_min would not be defined (specifically, !> 0)?

Thanks. Changed the definition already accordingly.

Does anybody have an idea about the following?