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
  • I see -- that makes more sense than what I was thinking. In my example, X was just some variable like HR which is sampled every second.

    AppBuilder doesn't work with lists of numbers, so I don't think there's an easy way to do what you're asking for. 

  • Former Member
    Former Member over 5 years ago

    I am wondering if it is possible to display estimated power in watts by using the VAM method. The formula would be:

    Watts = (VAM/(2+gradient/10)) / rider weight

    How would I go about to convert the above formula into something Appbuilder will recognise?

    Thanks!


  • i have tried to create formula for have more accurate grade, in this way:

    SETV(1,((10^(log(ambientPressure/MeanSeaLevelPressure,10)/5.2558797)-1) /-0.0000068755856)*0.3048) ; SETV(2, (TIMEAVG((GETV(1) - PREVN(GETV(1), 10)) / (Distance_raw - PREVN(Distance_raw, 10)) *100, 3) /100)) ; SETV(3,(SUM(PREVN(GETV(2),5))-MAX(PREVN(GETV(2),5))-MIN(PREVN(GETV(2),5))/3)) ; RECORD (GETV(3))

    i want exclude in last 5 sample of grade datas the MIN and MAX value..and calculate average value of 3 value remainder.

    can works ?

  • That doesn't work because PREVN(X, t) gives you a single number from t samples (seconds) ago, not a list of numbers, and MIN/MAX only work on single numbers (e.g. variables) anyway.

    e.g. PREVN(X, 5) is always X from 5 samples ago

    MIN(X) is always the minimum value of X for the entire activity.

    (The point here is that X is a single value that is changing every second, like a variable or an expression.)

  • hi KymT,

    you can try this formula using VAM:

    SETV(1, (TIMEAVG((Altitude_raw - PREVN(Altitude_raw, 15)) / 15 * 3600,3))) ; SETV(2,(TIMEAVG((Altitude_raw - PREVN(Altitude_raw, 14)) / (Distance_raw - PREVN(Distance_raw, 14)) *100, 3))) ; SETV(3,(GETV(1)/(2+(GETV(2)/10))) * UserWeight) ; RECORD(GETV(3))

    but problem, for me, is always calculate gradient more accurate possible.

  • Updated formula for my previous mistake.

  • Note that UserWeight uses your device unit settings (kg or lbs). If you want the weight in kg (regardless of device settings), I recommend using UserWeight_raw / 1000. (UserWeight_raw is in grams).

    (I really regret my initial design decision of having variables use device unit settings by default....)

  • i have modified another time the formula, becouse for me for calculate Watt (not Watt/kg) i must to do * Userweight and not / UserWeight

  • Hello to the experts! I have never used Appbuilder before and would like to ask my request here:
    I need the following datafield for my Edge 1030 and bicycle operation:
    A stopwatch that starts when the speed is 0 (or when the device goes into autopause - which is the same trigger). At startup the clock should reset - start at 00:00. The stopwatch should be stopped when the speed is greater than 0 (or the recording on the device starts again, i.e. the autopause ends).
    Next time stop the stopwatch should start at 00:00 again.
    I want to monitor the decrease of my heart rate depending on the resting time.
    If this is technically possible - may I kindly ask if someone can make the formula for me?
    Best thanks and love greetings from Vienna!

  • If you just want a rest timer that works when watch is paused (regardless of whether you are moving, or whether it was paused using autopause), use this ("Rest Timer" from the examples):

    elapsedtime - max(elapsedtime)

    If you really want a formula that just displays a rest timer when you are not moving (regardless of whether the timer is paused), that would be a bit more complicated. In that case, I'll use 0.89408 metres per second (2 miles per hour) as the threshold for moving (same as Strava's threshold for moving, in running activities).

    setv(if(when(speed_raw lt 0.89408), 1, null), elapsedtime) ; if (speed_raw lt 0.89408, elapsedtime - getv(1), null)

    In both cases, set the display format to time. Hopefully the first, much simpler, formula works for you.

    Explanation:

    setv(N, X) - sets the variable identified by the number N to the value X. If N is null, then do nothing
    getv(N) - gets the variable identified by N
    when(X) - return 1 (true) when X initially becomes true, otherwise returns 0 (false) 
    speed_raw - speed in metres per second
    elapsedtime - the elapsed activity time in seconds (does not stop when watch is paused)
    max(X) - calculates the maximum value of X, but only while the timer is running

    Display Format = Time: Displays seconds as [hours]:minutes:seconds.