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
  • Multiple formulas in drop downs sounds good, although the workaround is not difficult. Copy and paste works (after email if configuring on mobile). When I reinstalled the app I just copied the old formula and then pasted it back in.
  • Latest update:
    • Added HR zone info for all devices:
      userRestingHR, userHRZone1Min, userHRZone1Max, userHRZone2Max, userHRZone3Max, userHRZone4Max, userHRZone5Max
    • Added IFS() function. Allows writing multiple-condition formulas in a simpler way compared to multiple nested ifs. Also allows older devices to have slightly more conditions. Usage: IFS(cond1, trueValue1, cond2, trueValue2, ....)
      Returns blank/null if no conditions are true.
      e.g.Distance to next aid station (5, 10, 15, 20 km/mi):
      IFS(distance lt 5, 5, distance lt 10, 10 , distance lt 15, 15 , distance lt 20, 20) - distance

    A clone of AppBuilder has been submitted to the store. When it is approved, it will be available here:
    https://apps.garmin.com/en-US/apps/5...b-04b9b0a048d8
  • Given that watches can only have 2-3 CIQ fields (and most only 2), I think 3 would be the limit.


    The limit of 2 or 3 CIQ fields is per activity app on the watch so you could fill every slot with an AppBuilder-type app and have many instances in use.

    You could envisage a situation with:
    - Cycling: app1, app2
    - Running: app3 ,app4
    - Rowing: app5, app6
    which the watches would currently support.

  • I don't know, it might be better to implement multiple formulas and a drop-down to pick one.

    I don't want to spam the store with 6 identical apps. nor do I want to worry about keeping them all in sync.

    Maybe one day Garmin will let us share data between app and data fields, which would solve a lot of problems (like wasting memory having the formula parser and the data field in the same app).
  • I agree. It would just be a workaround whilst the CIQ architecture is in its current state. But for now 2 versions is probably more than enough!

    There is no current way for a user to select different settings for a single app on the watch so your drop-down idea wouldn't solve the instances problem. If the data field knew where it was it could switch by itself but it would have to know which screen it was on and I suspect this detail isn't available in CIQ.

    I'm still surprised that the app functionality isn't native to CIQ as it is a longstanding feature of Suunto's Movescount and may have speeded up the evolution of the platform had it been there from the beginning. It shouldn't be necessary to develop a full-blown app just to so some simple field manipulation. And now it isn't :)
  • I think I've discovered why this formula doesn't work. The Row app doesn't seem to expose the Speed or Speed_raw variable, and doesn't let you add Speed as field. Only Pace can be displayed. It is a bit odd because speed in itself is useful.

    Can you recommend a short term averaging formula for speed using distance and time?
  • I think I've discovered why this formula doesn't work. The Row app doesn't seem to expose the Speed or Speed_raw variable, and doesn't let you add Speed as field. Only Pace can be displayed. It is a bit odd because speed in itself is useful.

    Can you recommend a short term averaging formula for speed using distance and time?


    Well there are no internal "pace" variables at all (exposed to the Garmin SDK). Afaik as I know, at least for running and cycling, only the Speed variable is updated internally, and the app displays speed or pace depending on the user's settings. Pace does not exist on its own as a separate internal metric, since it's a simple conversion from speed to pace (not too different from converting between km and miles).
    (Similar to how my app has a display format setting for converting speed into pace).

    It's possible that in the case of rowing, the internal Speed variable is not used, but rowing pace is based on some internal calculation (similar to how the Grade field is not exposed internally). TBH I wouldn't know. It's a bit strange because you'd think Speed would be available for all horizontal outdoor sports, since it's just DX/DT.

    Assuming that Distance is used by rowing (hopefully!), you could try:
    (distance_raw - prev(distance_raw)) / (timer - prev(timer))

    (distance_raw = metres
    timer = seconds)


    This would give you speed in metres per second over (roughly) 1 second intervals. If you want a filter, you could average the speed over the last 10 seconds:

    TIMEAVG((distance_raw - prev(distance_raw)) / (timer - prev(timer)), 10)



  • If you want a sanity check, convert the first formula into units of 500 metres per hour, then use the Pace display format to display pace per 500m.
    (distance_raw - prev(distance_raw)) / (timer - prev(timer)) / 500 * 3600

    Then you can compare the AppBuilder result to the native 500m pace field. Hopefully they'll be the same.
  • For anyone who wanted a second AppBuilder field:
    A clone of AppBuilder is now available here:
    https://apps.garmin.com/en-US/apps/5...b-04b9b0a048d8
  • I'm trying to set up two formulae, but there is some problem with the latest version (2.3.6) which initially crashed the watch when I tried to edit the app settings. Then it takes two tries to set it as the data field in the data screen, but isn't retained when I go back to the app. Is it very close to the memory limit on the fenix 3 ? Also, does the app allow decimals in constants ? I've coded them out for now but it would be good to use 3.6 instead of 10 / 36.