Thank you! I’m not sure why I didn’t think of that….I appreciate your help…worked like a charm,
Can’t figure out a way to do this and did not show up in the search for public custom fields: The interval table shows an intensity column, that is the percentage of FTP power for a given interval.
I would like to calculate and show the percentage of the MMP for the specific duration of the interval: for instance for the 4m intervals at 312W it should show 84% (given my 4m MMP from power duration curve being 368W)
Is there a way to do that? (for activities in the past it should ideally use MMP at the time of the activity)
Should be possible to create an field with this:
General question about fields:
Understand there are different categories of fields like, interval, activity, wellness, etc. Are there also fields for a single day? Struggling with situations where there are multiple activities logged on one day, and would like to calculate for example the load accumulated for a specific day.
For custom activity fields you can control how values from multiple activities are aggregated for the /fitness page on the description tab:
Custom wellness fields calculated using Javascript is on the todo list. There are lots of performance implications. Right now I am busy making Intervals.icu more efficient in this area to reduce the load on the db and thats just for the built in Java calculated fields.
Awesome, had missed that! Thank you David!
Attempting to calculate a fitness chart that includes a load estimation for non-logged activities. There is evidence that total daily active energy is a better predictor of fitness and VO2max than training load. It feels strange to focus completely on the training window and ignore the rest of the day. Imported Active Energy from Apple Health and playing with custom fields.
If I want to calculate (for example) average power for the whole activity I would use:
watts = streams.get(“fixed_watts”).data
and then operate on that.
Now if I want to calculate average power for a given interval, how do I get “stream” but not for the whole activity but for the chosen interval? In general: how do I get data but only for the interval not the whole activity?
Just replace the temperature with fixed_watts
Thanks, interval_start_index and interval_end_index is what I was looking for.
Is there a way to display custom fields in list view of activities (adding them to columns displayed)? That would make comparing values calculated for them easier. If that’s not possible, what about adding 2-3 default generic empty fields one could use to overwrite from custom field code?
You can show custom activity fields in the list view (they are towards the end of the list) but not custom interval fields. To show custom interval fields you need to add an activity field that aggregates the values of the interval fields some how.
Hello,
I am trying to get the MET-min from any activities. David advised me to dig into this area of custom fields.
MET-min or MET-h are usefull when you dig some medical litterature about physical activity. Usually the big picture of how much you do in a week is written in MET-min or MET-h in papers.
1 MET is 1 metabolic equivalent it’s your energy expenditure at rest, it’s roughlky 1 kcal/kg/h so for a 65 kg guy 1 MET is 65 kcal in one hour.
If you walk slightly uphill, you are expected to 4x your EE, so walking uphill is 4 MET and doing this for one hour is 260 kcal
Going back to sports. If I do a 750 kcal activity for one hour at 65 kg, I can say that my global energy expenditure is roughly 11,5 MET, that’s a high level activity, it would be something around threshold for on hour. In MET-min it’s simply 690 MET-min
My goal is to have a weekly total MET-min for all activities. Do you think a custom script could do this ?
For one activity I could get the MET-min doing so :
energy expenditure from activity in kcal = EE_ex
duration in minutes = d_ex
weight = w
MET-min = ((EE_ex/w)/(d_ex/60)) * d_ex
So for 750 kcal during 75 minutes ((750/65)/(75/60))*75 → 692 MET-min
I would like to get MET-min from all activities, not only those with kJ supplied by the powermeter. using kJ, david advises me to try
{
let kJ = activity.icu_joules / 1000
kJmec = kJ / 0.23 // assume 23% efficiency
let kCal = kJmec * 0.239
let hours = activity.elapsed_time / 3600
let mets = (kCal / activity.icu_weight) / hours
let METmin = mets * (activity.elapsed_time)/60
METmin
}
it works for biking activites with a PM but not for others…
But I don’t know anything about JS or coding… any good soul to start me up ? thank you
You could use
activity.calories
for activities without powermeter. It is nearly the same as kJ/1000.
Replace your first line with this:
let kJ = activity.icu_joules == null ? activity.calories : activity.icu_joules / 1000;
Thank you, activity.calories does it
Now I would love to have this info at the top of any activity and get weekly totals…
- Reanalyze your activities to fill the custom field
- Create your custom fitness chart
- Add it to your calendar view
Thank you for helping me @R2Tom but even after reanalyzing my activities, the custom “MET” field does not appear anywhere but on the intervals in activities.
I don’t see it either in the possible datafield in a custom fitness chart. I guess I miss something here
You need to create a custom activity field (for the whole activity) and not a custom interval field (applies to each interval).
It’s a bit confusing unfortunately.
If I understand this correctly the number of METs for an activity is just the calories / weight in kg?