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
  • Using this formula on a grade of -5 you would have to go as fast as 50kph to get any power and at 60kph you'd already get 300w based on the calculator on the aforementioned site.


    yes, infact for example with grade of only -1 i have negative value of Watt.
    Another solution can be change negative grade to positive grade. For example grade= -1 change to grade = 1 also when i go downhill..
    And only for grade >-3 or -5 put value of Watt =0.
    I hope that my idea can be little realistic..:rolleyes:

  • Former Member
    Former Member over 5 years ago
    At grade of -1 you should start to get some watts after speed of 20kph. So it also depends on speed.

    It's entirely possible in theory to flip the grade to show positive until to -1 grade, but wouldn't be right as then you'd also get more watts than on flat. Would also require adding another check and there really isn't any more space left to make it fit.

    There is also the fact that the Garmin altimeter might not always be very accurate (has momentarily swings of +/- 0.5m) so calculated grade might change even when on flat or mild grade and you could get momentarily 0 power if you went slow enough. There isn't much to be done about this currently.

    Anyway, I also find another site using pretty much the same formulas https://www.omnicalculator.com/sports/cycling-wattage

    In case you are interested in modifying some of the other values they offer some additional guidelines, for example you could modify rolling resistance (depending on tires and surface).

    They also give different settings for power loss depending on chain condition, how different ride positions affect drag etc.

    Interesting stuff.
  • hi friends!
    i have update the formula in this way:

    SETV(1, IF(Speed_raw GTE 1, (Altitude_raw - PREVN(Altitude_raw, 10)) / (Distance_raw - PREVN(Distance_raw, 10)), 0)) ; SETV(2,((1-(2/100))^-1*(9.8067*(UserWeight+10.5)* (GETV(1)+0.005) + (0.1966 * Speed_raw^2)) *Speed_raw)) ; RECORD(IF(GETV(2) GT 0 AND Cadence GT 0, GETV(2), 0),7)

    but i obtain error message !Name :(
    I don't understand where is my mistake.
    I have used the phone becouse with Garmin Express i can only insert a limited number of caracter. With phone i can insert long formula (it's a mistery of G.E.).

  • I tried it in the web app (https://ciq-appbuilder.blogspot.com/p/5plus.html) and the simulator for Edge 520 and it works for me. I copied and pasted exactly what you posted.

    Are you copy-pasting that exact formula above?
  • I tried it in the web app (https://ciq-appbuilder.blogspot.com/p/5plus.html) and the simulator for Edge 520 and it works for me. I copied and pasted exactly what you posted.

    Are you copy-pasting that exact formula above?


    Yes Flow.
    But using the phone..(copy-past)..
    Now i try to use the web app...
  • Not works also with web app.
    I have installed on my Edge 520 total 4 field.
    Can be that total memory of Edge 520 can be full ?
  • Former Member
    Former Member over 5 years ago
    I guess you ran out of space. Your formula is even longer than the normalized lap formula which also causes error. I had to reduce the formula to make it work on my old Fenix5.

    It's more of an issue with the mobile app, with Garmin Express on desktop you'll see the limitation more clearly because it simply cuts out the formula when it doesn't fit.

    Instead you could just try this reduced formula (I copied the same values you had but double check to be sure):

    SETV(1,(1-(2/100))^-1*(9.8067*(UserWeight+10.5)*(((Altitude_raw - PREVN(Altitude_raw, 10)) / (Distance_raw - PREVN(Distance_raw, 10)))+0.005)+(0.1966*Speed_raw^2))*Speed_raw) ; RECORD(IF(GETV(1) GT 0 AND Cadence GT 0, GETV(1), 0),7)

    You shouldn't need Speed_raw GTE 1 as it just stops the grade calculation at very slow speeds, which you'll hardly ever get when cycling. And when you stop your power will already be 0 because of cadence detection so you shouldn't get any false power values (GPS speed might still register false values when stopped). Dropping PREVN to 10 should improve responsiveness, but also will cause the grade calculation and thus power value be more unstable at slow speed. This might be an issue with steep climbs when your speed can drop closer to 10kph.

    Hopefully this helps. :)
  • BortoloS JTH9 I tried the long formula on Garmin Connect iOS without problems. Even added something random like "+ 1234" to the end to see if it was working.

    Garmin Express does have a limit of 256, although it will allow you to edit a longer existing string by shortening it (but not by adding/modifying any text).

    Are either of you using Garmin Connect Android? I'm curious if the limit is 256 on that app.

    I thought the 1024 vs 256 character limit had been resolved a long time ago >_>. I guess this is just another long-standing bug/difference that Garmin has decided to ignore. I'll open up a bug report.
  • Former Member
    Former Member over 5 years ago
    GC iOS allows you to enter longer formulas, but not sure if they actually work. I just thought that the limit is 256 nevertheless as it is cut out on Garmin Express and I got the error message so after that I just used Express because at least there I'll see if it fits the limit or not. I'll have to double check this when I got time.

    Meanwhile you could check the formula with something like https://www.lettercount.com/ Of course the better if it could work with longer formulas as well...
  • JTH9 strings longer than 256 characters do work in GC iOS, like I said I tried it myself. I took the formula in question and added "+ 1234" at the end, and AppBuilder displayed 1234 (0 + 1234). Note that Garmin Express will also display a longer string that already exists in the settings (although as mentioned above, you can't edit the part beyond 256 chars except to delete it).

    And strings up to 2048 characters are at least recognized by the Training Notes data field (which displays part of the string) although of course I can't prove that the app "sees" the whole string, only that it's being properly stored in the settings. I did find that when I went up to 4096 characters, the app no longer displayed anything. So the real limit is likely somewhere between 2048 and 4096.

    I've filed a bug report on this, but who knows if it'll ever change. I know it was brought up by someone else almost 2 years ago....

    EDIT: if you do use GE, it's fairly easy to see that your string was cut off, though. Even if the string is long and complicated, you could look for a few characters near the end, or you could copy-paste both the original and the GE string to Notepad and compare them there.