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
  • It looks like you are trying to format something that isn't a time as a time .

    The moving time formula uses elapsed time the other two don't 

    If moving time works then stopped time is the inverse so if you subtract your moving time from elapsed time again that should be stopped time

  • It is really a shame that Garmin hides their GRADE value. We have to implement a sophisticated Kalman filter to try to approx the grade with reasonable accuracy.

  • is the field "calories" the true measurement of a power meter, averaged over the entire activity?

    if not, how will be the formula to calculate kjoule, derived from the average power, measured?

  • Garmin changed their internal calorie metric and broke it in my opinion. KJ is accurate. Calories adds KJ plus the normal metabolic burn over the activity’s duration. That is broken because most of us assume a daily metabolic burn and then add exercise burn. But using Garmin’s activity calories, we then double count the metabolic burn.

  • Thanks. Yes, I tried it out and in fact, calories is kind of useless to me. Now using average Power x seconds elapsed Slight smile

    By the way, now I need a "beep-only" alarm, whenever a certain amount of kJoule has been "burned", e.g. beep after each 500 kJoule.. How can I achieve this?

  • By the way, now I need a "beep-only" alarm, whenever a certain amount of kJoule has been "burned", e.g. beep after each 500 kJoule.. How can I achieve this?

    So AppBuilder uses the same units for calories that Garmin uses: kcal. 1 kJ = (1/4.184) kcal, so 500 kJ = (500/4.184) kcal.

    As far as the alert goes, you can try:

    alert((calories div (500/4.184)) gt prev(calories div (500/4.184)), 2)

    Explanation:

    alert(X, Y)

    - Notifies you once when X becomes true (after previously being false)

    - Y - notification type when X becomes true. 1 = beep/vibe per system settings. 2 = beep (provided beep is also enabled in system settings). 3 = vibe (provided vibe also enabled in settings)

    prev(W)

    - the previous value of W (from the previous once-per-second sample, while the activity timer is running)

    calories div Z

    - the result of dividing calories by Z, rounded down to the nearest integer.

    Let's say Z is 100, for the sake of simplicity. For values of calories < 100, this will result in 0, and the condition will be false. When calories first hits a value >= 100 and < 200, the result will be 1, and it will be greater than the previous value, so the condition will be true. While calories is still less than 200, the result will be 1 and the condition will be false. Every time the value of calories passes the next multiple of 100, an alert will be sent out.

  • hi, unfortunately it doesn't work with fenix 7..

    I modified in a way to hopefully combine "beep each n kJoule" and "show kJoule"...

    here is what I did : "setv(1,sum(power)/10);alert(((getv(1)/100) mod 250) eq 0, 2);formatnumber(getv(1)/100)"

    it does show kJoule in the display correctly, but doesn't beep at all..

    I would expect to beep each 250 kJoule.

    do you have any idea?

    I also tried not to compare to 0 but " lt 5", to ensure beep within the next 5 kJoule after modulo result in 0...

  • That is not true any longer... Here is an example from last weekend...

  • You have to consider, that Garmin changed the Calories calculatien some months ago.
    They now add to the formula above (still valid for "performance Calories") the "methabolic calories" for the riding time - which most users are not happy with.

    In your calculation:
    Methabolic Calories = 6231 - 5436 = 795 (for about 9,5 hr - which is 83 kCal per hour)

    EDIT:
    sorry  - just saw that you explained it some postings before…

  • Hi again, I just tried it out, but in a different way, based on your example..

    For testing purpose, I intended to combine:

    setv(1, ((avg(power)*timer)/1000)); formatdecimal(getv(1),0); alert((getv(1) mod 10 lte 2), 2)

    expecting to show the kJoules and beep each 10 kJ...

    neither of these did work...

    What am I doing wrong?