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
  • Hangwai sorry, the label displayed in Garmin Connect is fixed, due to the way the FIT / Garmin Connect infrastructure is designed. Garmin Connect actually displays a fixed label that is specified in the application manifest (which supports multiple languages), not the internal label in the FIT file. The same goes for units (which is why there are none in appbuilder’s data recording).

    If you use AppBuilder 5 (and not 5+), the real label will be written to the summary, although due to a Garmin bug, it may be displayed as “0” in the app or the website. In all cases, the real label will be written internally to the FIT file, so you can see it if you know how to look. (Search for “FIT SDK”, which contains a FITtoCSV tool). Some third party sites (sporttracks?) may display CIQ FIT fields and their internal labels.

    Temperature is not directly available to datafields, sorry.
  • Former Member
    Former Member over 6 years ago
    Thanks for verifying the temperature, was going to ask about it too. Will have to go with a fixed value then.

    Also I don't know if it would even help as it's influenced by body temperature so much.
  • Former Member
    Former Member over 6 years ago
    Hangwai sorry, the label displayed in Garmin Connect is fixed, due to the way the FIT / Garmin Connect infrastructure is designed. Garmin Connect actually displays a fixed label that is specified in the application manifest (which supports multiple languages), not the internal label in the FIT file. The same goes for units (which is why there are none in appbuilder’s data recording).

    If you use AppBuilder 5 (and not 5+), the real label will be written to the summary, although due to a Garmin bug, it may be displayed as “0” in the app or the website. In all cases, the real label will be written internally to the FIT file, so you can see it if you know how to look. (Search for “FIT SDK”, which contains a FITtoCSV tool). Some third party sites (sporttracks?) may display CIQ FIT fields and their internal labels.

    Temperature is not directly available to datafields, sorry.


    Thanks for answering. Waiting for the next version to include that :)
  • Former Member
    Former Member over 6 years ago
    Hi FlowState , thanks again for your help regarding activity steps some time ago. It works perfectly!
    Probably, you also have a solution for another man:
    He wants a summary of all "steps" of a day - including normal 24/7 steps and also all steps in activities, to see whether his daily target is done or not. Unfortunately the steps of activity "cross-country skiing" (I hope the translation in correct) are not counted at all - I think, because of the soft movement during skiing.
    Is there a possibility to calculate a theoretical value for these "steps", e.g. [gps-distance / personal step length]? He only needs 1 value/summary at the end of activity.
  • Miaz for distance and step length in metres:

    norecord() ; recordsummary(distance_raw / step_length)

    step_length is his step length - e.g. 0.8.

    Norecord() specifies that the activity graph won’t be recorded. This can be omitted if he actually wants that.
  • Former Member
    Former Member over 6 years ago
    SETV(1, TIMEAVG((1-(rawAmbientPressure/1013.25)^0.19028)*44307, 5)) ; SETGLOBAL(1, IF(Speed_raw GTE 1, (GETV(1) - PREVN(GETV(1), 10, 1)) / (Distance_raw - PREVN(Distance_raw, 10, 1)) *100, 0) )

    Here's one possible grade formula (for metric system) using rawAmbientPressure instead of altitude_raw and seems to work well enough at low altitudes for this simple task of uphill / downhill detection with the added benefit of reacting a bit faster. Different values could be tested for TIMEAVG and PREVN, but probably wouldn't go less than 5 seconds for TIMEAVG.

    Also tested formulas that take temperature into account, but don't seem worth it currently especially since temperature is not available as a variable.

    Haven't tested this with grade adjusted pace formulas yet. I think I'll record the grade as graph next to compare to SportTracks and previous formulas.
  • JTH9 thanks! I’ll just point out that your formula will work regardless of device units (metric vs statute) because you used “raw” variables for speed and distance and because the result is a percentage (so it’s unitless).

    In hindsight I wish I had never made variables whose value changes based on unit settings. At least not by default. (Obviously, the Connect IQ API only has fixed units, which happen to coincide with appbuilder “raw” variables.)

    I still can’t think of a better way to do it except to have a unit suffix for every variable (like Suunto?), which never would’ve worked for lower memory devices.
  • Former Member
    Former Member over 6 years ago
    Yes, good point and that's why I originally chose the raw variables for these formulas.What I actually tried to say was that in (1-(rawAmbientPressure/1013.25)^0.19028)*44307 the last value was also converted from feet to meters to work in this formula.
  • Former Member
    Former Member over 6 years ago
    FlowState : Thank you very much. I have forwarded your answer to him. Very good support :cool:
    My mistake (before) was the missing "_raw".
  • Former Member
    Former Member over 6 years ago
    I have update now my Appbuilder. Now i use Appbuilder 5+.
    Now i use PREVN for find previous values and calculate elevation grade with formula recomanded from Flow :

    IF(Speed_raw GTE 1, TIMEAVG((Altitude_raw - PREVN(Altitude_raw, 14)) / (Distance_raw - PREVN(Distance_raw, 14)) *100, 3), 0)

    Now value are more smooth and without peaks.
    Thanks much Flow for this wonderful app!!