Computed activity fields

Is it possible to access previous activity records, or previously calculated fields? eg to compare this activity to some previous record or index to give a quick indicator of better or worse than.

Not yet. I have that kind of thing planned for custom wellness fields. You can plot custom activity field on the /fitness page to see changes over time.

1 Like

That shouldn’t happen. I just re-analysed by last 3 rides and it didn’t change the gear totals.

It is happening to me for runs. I just reprocessed one activity and noticed that the default gear for it had added to it the activities distance. If there’s anything I can do to help debugging contact me, I can’t add screenshots now but will do it latter if it helps.

1 Like

You can now map custom activity fields to any message and field, not just session fields. The default behaviour is to look in the session record for a matching field name or number. However you can prefix the field name/number with the name/number of the record to search in other records.

Examples:

  • activity.total_timer_time
  • 140.4 (field number 4 of message number 140, Garmin Venu watch training effect times 10)

The script of the custom field can be used to transform the value once it has been read:

activity.isNew ? activity.TrainingEffect / 10 : activity.TrainingEffect

This expression only does this when the activity is new or its file is reprocessed otherwise it returns it as is.

3 Likes

This is truly amazing.

I’d like to check the final battery status or charge for my di2, HRM and PM. Is it possible to specify which you’d like and ensure it’s the last occurrence of that (I assume it creates a new device_info for each auto stop)?

-=EDIT=-

Though I did then find the activity.power_meter_battery which helps for that but still stuck on di2 & HRM

1 Like

I looked at one of my fit files and it looks like my eTap, Head Unit, QUARQ and Polar display some kind of battery status in device messages. Haven’t taken a closer look though.

Grouping those by DeviceID/Serial Mumber and taking the lowest would be great

I have a custom field set-up for Garmin’s VO2max estimate that seems to work sort-of but flips between the raw Fitfile data value and my derived, calculated value. On the Fitness page it plots only the raw value so I assume I have something not quite right somewhere? See screenshots below:

Just reverse the terms and be careful with upper/lower case and with field code spelling:

activity.isNew ? activity.VO2maxGarmin * 3.5 / 65536 : activity.VO2maxGarmin
3 Likes

EDIT: Figured it out. Speed is in m/s and need to convert to KMH by multiply 3.6

Help?
How come this either doesn’t work (wrong data/number) or doesn’t have data? (I did the Activty-Analyse)

All data in m/s can be automatically formatted as pace using the recent option added for that:

Or do you need especially km/h?

Yea. I would like to see Max Speed during a Ride. So, kmh

1 Like

Is supporting this for filters on the roadmap as well? Would be really nice to be able to use the same custom computed fields as a filter on either the activity list view or in the fitness graphs

You can do this using the new powerCurve object (available as icu.powerCurve). I have edited the top post and there is some more detail here:

1 Like

Just added: If the field has multiple values you can use array index notation to extract the one you want:

avg_left_power_phase[2]

To get the 3rd value (first has index 0).

3 Likes

Thanks, I’ll try it right away :+1:

Late to the party here. Using this is it possible to get the max 5min power, max 20min power etc from within an activity? Are these the actual/raw power data or is this fitted to a curve?

This could potentially save me days of processing!!

Thanks

John

Just to clarify, ultimately what I’m after is the data that sits behind an individual activity power curve over the API.

Yes you can get those. This will give you the best 5m power for the activity from the actual power duration curve (not modelled):

icu.powerCurve.getWatts(5 * 60)
1 Like

Perfect, thanks. I can build a little comma delimited string which I can access in the API to get a range of max powers for times.

You’ve just saved me a tonne of work :slight_smile:

1 Like

Can anyone help a noob out please? :slight_smile:

I’m reverse engineering a few scripts created by the fantastic users here, but namely one created by @Povedano which calculates for an activity time spent in a certain % of your MaxHR.

I am looking to use this as the basis of showing time spent above 90% MaxHR. Now this should be as simple as adjusting the numbers in the script but it doesn’t seem to work…

If I change the values up to 85% MaxHR it shows correct values which align with the HR Curve accordingly, but if I change the number to anything above the 85% value, then nothing is returned, even though the HR Curve shows time above this MaxHR value…

I am sure I am missing something… some screenshots.

image

image

Thanks! Any tips on where to lean more about the coding language etc greatly received.