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
  • A Stryd user has helpfully pointed out that if you force your multisport watch to connect to Stryd as a power meter, you can use the Power variable in AppBuilder to display running power! I had some requests for interoperability with Stryd, and I really did not think it would be that easy. Unfortunately, this will only work with Garmin watches that actually expose Power to apps; namely multisport/dedicated cycling devices such as Edge (doesn't really apply here haha), D2, Fenix, 920XT, 735 and 935.

    An example (based on a user request). Trigger alert when Running Power (5 second average) goes above (or equal to) 200, and display Running Power (5 second average)

    Alert[TIMEAVG(Power, 5) GTE 200] ; TIMEAVG(Power, 5)
    ^ not including zeroes


    Alert[TIMEAVG0(Power, 5) GTE 200] ; TIMEAVG0(Power, 5)
    ^ including zeroes

    The forum is still broken, so please replace square brackets with round brackets.

    I'd appreciate any feedback from Stryd users as to whether this actually works for you. If so, I'll add a note the app store page, so other Stryd users can find the app.
  • Dear FlowState,

    first at all, i?m very happy with your AppBuilder data fields. It was a great idea to provide individual calculations without the need of the whole developer-kit!

    I have a question regarding a special evaluation:

    My bike is equipped with a Rohloff-Speedhub, wich is a 14-stage Gearbox. Id like to create a datafield (on EDGE820) which shows the actual gear in order to the actual stride length:

    1st Gear is stridelength 1.5m
    2nd Gear is stridelength 1.7m
    .
    ..
    ...and so on

    I tried it in the following way which actually will not work:

    IFS(((Speed_raw/Cadence*60) GT 1) AND ((Speed_raw/Cadence*60) LT 1.61), 1, ((Speed_raw/Cadence*60) GT 1.61) AND ((Speed_raw/Cadence*60) LT 1.83), 2, ((Speed_raw/Cadence*60) GT 1.83) AND ((Speed_raw/Cadence*60) LT 2.09), 3, ((Speed_raw/Cadence*60) GT 2.09) AND ((Speed_raw/Cadence*60) LT 2.37), 4, ((Speed_raw/Cadence*60) GT 2.37) AND ((Speed_raw/Cadence*60) LT 2.69), 5, ((Speed_raw/Cadence*60) GT 2.69) AND ((Speed_raw/Cadence*60) LT 3.06), 6, ((Speed_raw/Cadence*60) GT 3.06) AND ((Speed_raw/Cadence*60) LT 3.48), 7, ((Speed_raw/Cadence*60) GT 3.48) AND ((Speed_raw/Cadence*60) LT 3.95), 8, ((Speed_raw/Cadence*60) GT 3.95) AND ((Speed_raw/Cadence*60) LT 4.49), 9, ((Speed_raw/Cadence*60) GT 4.49) AND ((Speed_raw/Cadence*60) LT 5.10), 10, ((Speed_raw/Cadence*60) GT 5.10) AND ((Speed_raw/Cadence*60) LT 5.79), 11, ((Speed_raw/Cadence*60) GT 5.79) AND ((Speed_raw/Cadence*60) LT 6.59), 12, ((Speed_raw/Cadence*60) GT 6.59) AND ((Speed_raw/Cadence*60) LT 7.49), 13, ((Speed_raw/Cadence*60) GT 7.49) AND ((Speed_raw/Cadence*60) LT 9.99), 14)

    I guess its a problem of the formulas length? Maybe it would be better to define the actual stride length as result of a single calculation and calculate the gear afterwards:

    stridelength = Speed_raw/Cadence*60; IFS((stridelength GT 1) AND (stridelength LT 1.61), 1, (stridelength GT 1.61) AND (stridelength LT 1.83), 2,......)

    Actually it seems for me that theres no possibilty to store the result of a calculation in a user defined variable.

    Maybe you can help me with this problem?

    Best regards,
    Jan
  • Hi, thanks for the kind words. Can't take credit for the original idea, but I'm glad people are finding uses for the datafield!

    You have run into a problem that I didn't anticipate. The initialization of the app is taking too long for the system, due to the length of the formula, even though there is plenty of memory on your Edge.

    No, to keep things relatively simple, there are no user-defined variables. I found very few scenarios where a purpose-built function wasn't simpler.

    In your case, I've created a new version of an existing function to suit your needs. Please update to the latest version of AppBuilder from the store.

    FINDLTEINDEX(X, value1, value2, ...)
    - Finds the "0-based" index of the first value where X is less than or equal to value.
    Returns null if no value matches.
    (Values should be sorted from lowest to highest)
    - The first index is 0, the second index is 1, etc.

    Try:
    FINDLTEINDEX(Speed_raw/Cadence*60, 1, 1.61, 1.83, 2.09, 2.37, 2.69, 3.06, 3.48, 3.95, 4.49, 5.10, 5.79, 6.59, 7.49, 9.99)

    When stride length is less than or equal to 1, the result will be 0
    When stride length is less than or equal to 1.61, the result will be 1
    When stride length is less than or equal to 1.83, the result will be 2
    ...

    -----
    Update 2.6.30

    Add functions:
    FINDLTEINDEX()
    FINDGTEINDEX()
    FINDEQINDEX()

    TODO: Add information to documentation.
  • Update 2.6.31

    CIQ2 only:
    Add Round() function.

    ROUND(X):
    Rounds X to the nearest whole number.
    Round(1.5) = 2
    Round(1.49) = 1

    Normally automatic rounding of the final result is good enough (e.g. Number or Time display formats), but sometimes you want to round numbers before the final result is calculated. E.g. 5 second countdown timer and alert:

    (The forums are broken, so please replace square brackets with round brackets below)

    Formula: Alert[Timer gte 5 and Round(timer) mod 5 gte 0 and Round(timer) mod 5 lte 2] ; 5 - [Round(timer) mod 5]
    Display Format: Time

    Without rounding, the countdown would appear to "jump around" a bit more than with rounding, due to the fact that the formula is not evaluated exactly every second.
  • Hi FlowState. I found your data field today, I think it will solve my needs. I have a swim trainer that has a power meter and distance (vasa swimerg) . The only way my garmin (fenix 3hr) can record data is if its in Bike. (not swimming). however i setup a new APP for open water swim, turn off GPS and added your data fields for power and distance it may work. just playing around it looks like i can only setup 1 data field not 2 (correct)? when i get home ill try it out.... once again this df looks great!!!
  • Thanks! Glad you found a use for it. I never realized there was a need to display Power outside of cycling activities. Kinda surprised that nobody's come up with simple apps to do so already.

    I actually have 4 total copies of AppBuilder in the store (you can only use two per activity):
    AppBuilder: https://apps.garmin.com/en-US/apps/d...a-9b8485d2fc80
    AppBuilder2-4:
    AppBuilder2
    AppBuilder3
    AppBuilder4
  • ill let you know tonight how it connects... (cant wait)
    for distance, will that pull from the power meter? (some PM do have speed output too)
    and for the syntax is it (the following)?
    Power
    Distance

  • I don't know if it will pull the distance from the power meter. It all depends on how the built-in Garmin distance field works. Whatever source Garmin's native distance uses during your swimming activity, will be the same source for AppBuilder's Distance.

    Yes, the vars are Power and Distance. Check the first page of this thread for full docs. Don't forget to check the "Units" section if you are going to use distance, speed or time. (Power is in watts).
  • Note to anyone using Garmin Connect Mobile on iOS and the ALERT function.

    Currently, entering the text "alert" followed by "(" in the app settings will cause an "Access denied" page to appear in GCM, and settings won't be saved.

    As a workaround, please substitute ALERT[X] with WHEN(X, 1, 1, 1).

    (Because the forum is also not working, please imagine that I typed round brackets wherever you see square brackets)

    e.g.

    ALERT[Speed gt 15]
    becomes
    WHEN(Speed gt 15, 1, 1, 1)

    I've notified Garmin of this problem, but until they fix it, I think this is the only workaround, unless I create a new version of AppBuilder with an ALRT function or something. (I'd prefer to wait and see if this gets fixed on their end).
  • Hi FlowState,

    Just found your app today, and have to say it looks very useful.

    Re:#142

    I'd appreciate any feedback from Stryd users as to whether this actually works for you. If so, I'll add a note the app store page, so other Stryd users can find the app.


    I have a Stryd, and Garmin 935, and just tried this using the "include zeroes" formula. It appears to work exactly as expected. I am sure I'll find many uses for this, especially when doing longer intervals.

    I suspect I'll also be using the "DistanceToStart" function, whenever I'm out exploring. :)

    Thank you very much!

    Ivor