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
  • Former Member
    Former Member over 5 years ago
    (t * NP * IF) / (FTP * 36) = (t * NP * (NP/FTP)) / (FTP * 36)

    since IF = NP/FTP we get:

    (t * NP^2) / (36 * FTP^2)

    AppBuilder formula:

    NP = AVG(TIMEAVG(Power,30,1)^4)^0.25

    So

    (Timer * (AVG(TIMEAVG(Power,30,1)^4)^0.25)^2) / (36 * FTP^2)
  • Former Member
    Former Member over 5 years ago
    Oh and ^0.25^2 = ^0.5 so you could further simplify

    (Timer * AVG(TIMEAVG(Power,30,1)^4)^0.5) / (36 * FTP^2)

    Also remember to enter your FTP as a number in the formula, otherwise it won't work.
  • Nice, it just works!

    Thanks JTH9!
  • Hi there, AppBuilder is so fun!!!

    Just wondering if there's a way to compute the time spent in a power zone... it the power is between X and Y, the timer goes up: didn't find any function to do the trick.

    Thanks!

    RM
  • hi friends,
    i want calculate FTP during my last 20 minutes of training.
    I think to use this formula:

    GETV(2) is Watt calculate with formula of before.

    TIMEAVG(GETV(2), 1200,1)*0.95

    can be OK this solution ?


  • derMate try:
    sum(if(power gte X and power lte Y, 1, 0))

    Display format: Time

    The formula counts the number of seconds power is between X and Y, because the formula is evaluated once per second.
  • BortoloS I think FTP is defined as 95% of max 20-minute power, not normalized power for your last 20 minutes of training. And if you wanted 20-minute normalized power, I don’t think you would apply TIMEAVG to the whole formula, as NP is already an activity average (it’s like taking the average of your average HR, which would probably not give you meaningful results) — I think you would replace AVG in the NP formula with TIMEAVG.

    This formula for FTP is in the examples section of the documentation: https://ciq-appbuilder.blogspot.com/p/examples.html
    max(timeavg(power,1200,1)) * 0.95

    It only works on Fenix 5X/Plus and newer Edges because 1200 samples takes a lot of memory. If you really just want to see 95% of 20-minute power, remove “max”.

    The examples page can be searched as follows:
    - On a computer:
    By pressing CTRL-F / Command-F

    - iPhone/iPad (Safari):
    Typing in the address bar and selecting “On This Page”

    - Chrome mobile (including iPhone/iPad):
    3 dots menu > Find in Page

    Sorry there isn’t a proper site search — it isn’t possible on the platform I chose.
  • I have tried yesterday the previous formula TIMEAVG(GETV(2), 1200,1)*0.95, but not works.
    When start activity give to me IQ icon error message, i think becouse not have take 1200 samples.
    I want try to activate this formula after 20 minutes (and not before) for not have IQ icon error.
    Or use NP normalized power.
  • FlowState wow, nice! Thanks!

    Now I'm wondering what AppBuilder CANNOT do...:) :) :)

    derMate try:
    sum(if(power gte X and power lte Y, 1, 0))

    Display format: Time

    The formula counts the number of seconds power is between X and Y, because the formula is evaluated once per second.

  • I have tried yesterday the previous formula TIMEAVG(GETV(2), 1200,1)*0.95, but not works.
    When start activity give to me IQ icon error message, i think becouse not have take 1200 samples.
    I want try to activate this formula after 20 minutes (and not before) for not have IQ icon error.
    Or use NP normalized power.


    No, it doesn't work that way. That would be a bug. If that were the case, then TIMEAVG would never work.

    The only possible reasons for IQ errors are:
    - A bug in AppBuilder (but I'm pretty sure that formula would work fine in the simulator)
    - Formula is too complex (too many symbols) and the app takes too long to initialize (can be resolved by converting to code, sometimes). You would get this IQ error before the activity starts.
    - Formula takes up too much memory (e.g. too many samples to TIMEAVG). You would get this IQ error immediately after you press START.

    Which device are you using again? Like I said, 1200 samples is too much for anything except Fenix 5X/5+ and newer Edges. 645 Music could probably handle it (it has half the memory of 5X but twice the memory of some other watches like 645 and 935), but it's irrelevant because 645M doesn't support Power.

    Also, like I said:
    1) The definition of FTP is max 20 minute power, not 20-minute normalized power.

    2) If you really want 20-minute normalized power:

    If GETV(2) in your formula refers to normalized power, then TIMEAVG(GETV(2), 1200,1)*0.95 doesn't seem like the correct way to get 20 minute normalized power. It's because NP is basically already an activity average, so you would be taking a twenty minute average of an activity average. Consider that when you want 30-second average HR, you use TIMEAVG(HR, 30), and not TIMEAVG(AVG(HR), 30).

    IOW, here is the original NP formula:
    avg(timeavg(power,30,1)^4)^0.25

    If you really want 20-minute NP, you would use the following formula, IMO:
    timeavg(timeavg(power,30,1)^4), 1200) ^ 0.25

    It's just my opinion, as I've never seen anyone actually define "Normalized Power for a period of time". I'm not sure it's even that meaningful, given the definition of NP. Because it is kind of, but not quite, a straight activity average.

    But no formula with 1200 samples to TIMEAVG will work unless you have a device with enough memory....