I am in the first instance just trying to to calculate the Elapsed Time of the WORK intervals into a activity field - if I can figure that out, I should be able to do it for the other fields (Avg Power, Avg HR%, etc)
Interval length in sec is ‘interval.end_index - interval.start_index + 1’
Example from my Interval box plots:
// get list of intervals
let intervals = activity.icu_intervals ||
// check each interval. If it is a work interval, stock its nr and label in separate arrays.
for (let i = 0, c = 0; i < intervals.length; i++) {
let iv = intervals[i]
if (iv.type !== ‘WORK’) continue
wi_nr.push(i)
++c
wi_lbl.push(iv.label ? c + ‘-’ + iv.label : c)
multi_label.push(‘#’ + (iv.label ? iv.label : ‘’))
}
Yep sorry @MedTechCD I am lost…I will go do some reading as I don’t have anywhere enough understanding to reverse engineer this. Thanks for help though
I understand the logic of what needs to be done but I don’t know enough ref JS to be able to write it. It’s highly frustrating…I need to find some time to learn…
My logic says…
Look for all intervals in an activity
If the interval is a WORK interval then
Calculate the total interval length from the start and end time
Here is a script to calculate the average duration of the work intervals:
{
let tot = 0, n = 0
for (let iv of activity.icu_intervals) {
if (iv.type !== 'WORK') continue
//console.log("iv.elapsed_time", iv.elapsed_time)
tot += iv.elapsed_time
++n
}
n > 0 ? tot/n : null
}
You can uncomment the console.log to see each value.
You can use the “Convert” option on the custom activity field to display the seconds value as time.
Choose “per 500m” and capture a threshold pace. Then pace analysis will be done for rowing and pace will be displayed in “time per 500m”. I don’t think you need custom fields for this.
Its possible define “Power Curve”; for each activity? I realize i can define Power curver 3 points , but not for each specific activity - The graph plot the same for all activities
Hi, it looks like I had marked them private while editing them and forgot to make them public again. They are public now and should show up if you search “Time Running” in interval fields. Both versions - the activity field and the interval field should be available.