Data Field: AppBuilder

By user request, this app lets you define your own data field, based on a simple math formula like cadence / 2.

If you want to get fancy, there's conditional expressions (like IF in Excel), functions for data analysis (like MIN and AVG), and the data field can also display the text of your choice. The resulting data can be (optionally) written to the activity FIT file.

With AppBuilder, you can implement almost any field that involves math, such as: calculating normalized power and saving the data to the FIT activity file, showing the average pace for even-numbered laps, or recording the amount of time you sprinted.

Full documentation and examples here:
http://ciq-appbuilder.blogspot.com/

AppBuilder 5:
Now with new features! AppBuilder 5 is a completely new app, so please check it out in the store if you are interested in any of the new features.
https://apps.garmin.com/en-US/apps/fd690281-9c22-4fee-a81e-3b7f39aa67c5

- Store up to four formulas per app. Switch between formulas directly on the watch, without using a phone or PC. With four clone apps, you can store up to 16 formulas total
- User variables. Allows for powerful formulas where information can be stored at one point, like the start of a lap, and used later. e.g. Lap elevation change
- Improved timeavg() options. Allows for simpler, more flexible normalized power function
- More functions and variables

4 clones of AppBuilder are available in the store, so you can have 2 formulas in the same activity
  • FlowState i use Edge 520, this is the formula:

    SETV(1,(TIMEAVG((Altitude_raw - PREVN(Altitude_raw, 20)) / (Distance_raw - PREVN(Distance_raw, 20)) *100, 3) /100)) ; SETV(2,(1-(2/100))^-1*(9.8067*(UserWeight+10)* (GETV(1)+0.005) + (0.1966 * Speed_raw^2)) * Speed_raw) ; LAPAVG(IF(GETV(2) GT 0, GETV(2), IF(CADENCE GT 0,(GETV(2)-GETV(2)*2)*0.2,0))) + "|" + formatdecimal((GETV(2)/UserWeight),1) + “|” + TIMEAVG(GETV(2), 1200,1)*0.95

    the icon IQ error appear immediatly after press START button. Before nothing.
  • BortoloS yep, that indicates you ran out of memory (or AppBuilder has a bug). In this case I'm sure it's because you ran out of memory.

    Unfortunately, Edge 520 is one of the older Edges that has relatively little memory for CIQ. That's why there is now an Edge 520 Plus. I think the only other CIQ-capable Edge with that little memory is Edge 130.

    As far as available memory for CIQ data fields goes:

    A) Least amount of memory: Older CIQ-capable watches like 230, VA, 630, 920XT, Fenix 3, etc.
    B) 2X A : Edge 130 / Edge 520 / 935 / 645 / VA3 / VA3M / Fenix 5 / VAHR / 735XT
    C) 2X B (*): 645M
    D) At least 2X C: All other CIQ-capable Edges, Fenix 5X, Fenix 5+

    (*) You must have 645M or better for the kind of formula you posted above....

    If you want to know for sure which devices have enough memory for formulas like that, just check the supported devices for AppBuilder 5+:
    https://apps.garmin.com/en-US/apps/3...b-fdcfbc877f3a
  • Reposting a couple of updates that were lost in the forum migration:

    Update 5.21 (5/5+)

    Large memory devices: Add optional 3rd parameter to PREVD and PREVT which controls the number of samples to collect (previously fixed at 10).

    e.g. PREVD(Timer, 5000, 5000) returns the time from 5000 metres ago, with a resolution of 1 metre (5000/5000)

    e.g. Display the total time for your last 5k:

    Notes: Large memory devices like Fenix 5+/5X can handle at least 5000 samples. 645 Music can handle 2000 samples.


    Update 5.22 (5/5+):

    Large memory devices: Add optional 4th parameter to PREVD and PREVT which prevents data from being reset on pause.

    0: reset data on pause
    1: don't reset data on pause
    e.g. PREVD(Timer, 5000, 5000, 1)


    As mentioned in the original thread, I would like to bring this feature to older devices (CIQ 2 devices, like 935, 645, and Fenix 5), but I'm a little worried about the slight memory hit. They certainly won't be able to handle anything close to 2000 samples. (100 or so would probably be the limit, although I haven't tested it.

  • with this update PREVD or PREVT can sostitute TIMEAVG for calculate average value on samples ?

  • I have encountered an issue with the courseOverGround variable not being available on my ForeRunner 735xt.

    The docs say its a CIQ2 variable, and that ForeRunner 735xt is a CIQ2 device, but I still get !Name.

    Also, I have found out that track (the variable that courseOverGround is derived from) should be available to CIQ1 devices, too. You just have to jump through a few hoops to get to it:

    In CIQ1 and CIQ2, the GPS track is always available as Position.Info.heading, and only on CIQ2 devices it is also available as Activity.Info.track. So, a backwards-compatible way of accessing the data would be to simply pick it from the right class, no?

  • It looks like Activity.Info.track is only available on devices that support "advanced" navigation. I tried VAHR, Vivoactive 3 and 645 (a mix of CIQ2/3 devices which all lack nav support) and they all produce the "!Name" error. I also tried a more direct test, with the same results (jic there was a problem with my code.)

    I feel like this is a bug in the CIQ docs, which I will report shortly. I'll also have to fix my docs.

    I could use Position.info.heading, but it adds a tiny amount of code which could break existing formulas (especially for CIQ1). I'll have to see if I can find a way to cut the fat somewhere.

    Thanks for bringing that to my attention!

  • Update 5.23 (AppBuilder 5 only)

    Add support for 245, 245 Music, 945, Edge 530, Edge 830, MARQ

  • hi

    there is a formula with AppB5 to exclude peak of values?

    for example, if i have these numbers:

    45, 35, 30, 150, 37,400,5, 2

    i want exclude high values and low values and calculate average values of others.

    Calculate average value of only 45,35,30,37.

  • (SUM(X) - MIN(X) - MAX(X)) / (SUM(X neq null) - 2)

    For the first two seconds, this will display nonsense. If you care about that, you can use a slightly longer version:

    if (sum(x neq null) gt 2, (SUM(X) - MIN(X) - MAX(X)) / (SUM(X neq null) - 2), null)

    I will point out that since X is evaluated every second, for any activity that lasts more than a few seconds, you won’t see much of a difference compared to AVG().

  • thanks FlowState

    but (X) is a list of number ?

    i need to analize for example last 5 samples using PREVN and calculate average value removing high and low peaks.

    i understand the formula but not much (X)..