How do I change the fields in the banner across the top of an activity?
AFAIK you can’t change them. You can only add custom Activity fields.
Ah. I see. So I’ve had a look and it seems I need a script to pull the data I want (I just want a max power field).
I see this thread about it
Computed activity fields - Announcements - Intervals.icu Forum
Would someone please be able to give me a script for max power of an activity or direct me to the best resource to learn how to write these scripts?#
Thanks
This please
Just create a new custom field and write this code on the script tab:
activity.icu_pm_p_max
If you press the “play” button just below the script area, you will see the result of the field. If this is what you want, fill the type, format, etc for your field and press Ok.
Just as simple as that.
All activity fields available are here: Server side data model for scripts
Something like this should work
maxPower = 0
intervals = activity.icu_intervals
for (let i =0; i <intervals.length; i++) {
if (maxPower < intervals[i].max_watts) {
maxPower = intervals[i].max_watts;
}
}
maxPower
However, you have this info already on the power tab of the activity. If you want it for 1s (absolute max), you can add “1s” to the Best efforts.
Thanks folks!
How is max 1s power calculated here?
I see the max power for a session I did earlier differs from the value the Wahoo recorded and the value that uploaded to Training Peaks (same as Wahoo). And the difference is significant (15 watts)
Maybe Wahoo is getting data in fraction of seconds.
Do you want the absolute max power? If yes, it should be in the FIT file, so get the field value name and add a custom field.
On the activity page, click on Custom
Search for Max Power
Hi
Each of the suggestions given above (@Povedano @Ben @Gerald ) are all what I’m looking for BUT…this returns a value of 962 watts
Wahoo and Training Peaks report a max value of 977 watts.
The fit file has a max power entry of 977 watts
Why does Intervals.icu report a max of 962 watts?
That’s odd and I’m just doing guess work here but maybe try lap.max_power
in the fit file field to see if those are different to the session
For the screenshot I showed you, the data comes from my Garmin FR 735XT:
Fit file: 664
Garmin Connect: 664
Intervals: 664
Reload on TP: 664
Refreshed on WKO5: 664
I then checked on the file from my Lezyne GPS:
Fit file: 668
Intervals: 668 (activity had to be undeleted)
TP: 668
WKO5: 668
Strava: 668
Both head units record off the same crank based PM, so strange that there’s a discrepancy. That could be down to the split second difference in the 1s recording on both units. My best 1s was the 6th second of a 10s sprint, or 2nd second of the best 5s.
Did you use 2 devices to record? A Garmin and a Lezyne? I could definitely understand two different values that way.
What I can’t understand is why Intervals and TP are reporting different results for me from the same file…
I don’t follow? Do you mean alter the custom script to add lap power??
Can you please post a link to that activity on Intervals.icu. Tx.
Incidentally it’s the same with a file from last week. 999 on TP. Lower on intervals
Yes, two devices, but all platforms show the same value (from each of the devices).
So there’s no discrepency for me.
Why two devices?
- Redundancy;
- My Garmin doesn’t have the same map detail as the Lezyne on it, and doesn’t record temperature;
- My Health Insurance’ Wellness program only accepts data from certain devices.
- Redundancy.
What I don’t understand is how to return a List of all possible finds in the fit file so you can loop through them. I think at the minute it just returns the last found
I’m trying do find average pedal smoothness but not sure how to get as an array or whether this will come later with custom streams