Computed activity fields

This feels huge. Super impressive. Thanks for pushing this platform so much @david

Can’t wait to see the use cases people develop. Man I need to learn to code!

1 Like

This is awesome. Are computed field then available in a downloaded FIT file?

1 Like

And once again a new Playground :rofl:
This is way more then expected and extends the possibilities by a giant leap.

Hi! Amazing work! I’ve added a few public fields for measuring core temperature. Although, they work fine in the activity field creator window but does not return any value in the view for the workout.
image


Definitively a game changing upgrade!!!
Many thanks.
@david I wonder if you plan to extend this to charts. It would be awesome to allow plotting processed data series (X, Y) in the current custom charts :pray:

3 Likes

I have documented the data model (sort of … needs more comments):

Yes I am going to do that.

You need to re-analyse the activity to compute values for newly added fields. Did you do that?

I just added that.

4 Likes

Yes, many times! No changes :slight_smile:

Curious… these computed values in the FIT file, what are they stored as? Developer Fields?

1 Like

Can you point me at one of your activities with core temp data so I can have a look. Tx.

Yes developer fields. The name matches code of the field and they are float32’s or string’s.

1 Like

Can you check this activity? It seems like it does only calculate one of the custom fields. If I change the script to so it looks exactly like another one, the field will calculate that already has a “0” in it.

https://intervals.icu/activities/i8771586

Tx. I know whats wrong and am working on a fix. The scripts for an activity all run in the same sandbox instance so if you declare a variable with “let” and another script does the same, the 2nd script fails. You can workaround this by removing let:

temp_threshold = 38.4

Instead of: let temp_threshold = 38.4

1 Like

Great!! It solved all the metrics :smiley:

This is brilliant, thanks so much. I’ve added in running cadence (just a 2x of average_cadence) and running efficiency index (metres per minute per watt) as public.

Excited to see these added to fitness charts as well, I’ve actually been hacking the running efficiency index via wellness metrics :grimacing:

Also wondering – and this may already be true – will it be possible to write data to the stream as well? This would allow charting within the activity, which would be amazing.

4 Likes

Tx. I am going to be extending this to all parts of Intervals.icu including custom streams as soon as I can. I will be sorting out plotting custom activity fields on the fitness and compare pages today.

If anyone does want to declare stuff in the script wrap the body in a block:

{
   let factor = 2
   activity.average_stride * factor
}
1 Like

This functionality has been extended to interval fields:

1 Like

You can now plot custom activity fields on the fitness and compare pages. If there are multiple activities on the same day then values are combined according to the aggregate setting on the description tab:

Choose sum, min, max or average.

1 Like

How can we add these custom fields in the fitness page? When I try to add a plot I can’t find any custom fields

They are showing up for me at the bottom of the list. Remember that if you are viewing another athlete you need to add your fields to them first by going to one of their activities, clicking “Custom” and using the search button.

Apparently, it is not possible to update the activity streams currently. Being able to do that would enable a calculation of virtual power for runners based on pace :slight_smile: