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
  • jaypee, sorry, “Time” should be “Timer”.
  • Former Member
    Former Member over 6 years ago
    jaypee, sorry, “Time” should be “Timer”.


    Cannot get this to work, but thanks very much for your help anyways
  • jaypee I checked the pastebin and realized it had a character which looks like a space but which actually isn't a space, which is probably the other thing that was messing up the formula (besides "Time"). That's what I get for trying to copy and paste anything from the forum. Sorry about that!

    Try this formula instead -- it should work without modification:
    https://pastebin.com/yqKr5Dz7

    I tried it in the simulator and the "!Name" error doesn't happen anymore.

    Unfortunately I haven't had a chance to test the actual calculation, as it won't show anything until you've covered at least 1 mile of distance. But I tried a couple of different ways of double-checking the formula (which is mostly about converting from metres/second to mi/h) and it seems like it should work.
  • Former Member
    Former Member over 6 years ago
    jaypee I checked the pastebin and realized it had a character which looks like a space but which actually isn't a space, which is probably the other thing that was messing up the formula (besides "Time"). That's what I get for trying to copy and paste anything from the forum. Sorry about that!

    Try this formula instead -- it should work without modification:
    https://pastebin.com/yqKr5Dz7

    I tried it in the simulator and the "!Name" error doesn't happen anymore.

    Unfortunately I haven't had a chance to test the actual calculation, as it won't show anything until you've covered at least 1 mile of distance. But I tried a couple of different ways of double-checking the formula (which is mostly about converting from metres/second to mi/h) and it seems like it should work.


    Thought it might be interesting to have some feedback after a field test

    Used with Garmin Edge 130 (v2.4)

    Great beepity-beep alert after one mile. No further alerts during the ride.

    As you recommended I had to go in through Garmin connect as the IOS app wouldn’t behave. Despite setting the field to 2 decimal places it still filled the field (Think 6 d.places)

    Averaging kicked in after one mile. Really tiny text height making it difficult to read during the ride.

    Had to stop off during the ride so pressed stop. When I started the ride again the averaging reset itself as it would at mile zero. Average speed looked to be about right.


    thanks for your help, keep up the good work
  • jaypee sorry, I did make a mistake in the "alert" part of the formula. This version should give you an alert every mile.
    https://pastebin.com/HhADePps

    Yes, unfortunately all of the functions which do any kind of "analysis" over time or distance will reset when you pause the activity. The reason is that a lot of (real) time or distance could've elapsed while you were paused, which would mess up a lot of use cases. I used to have it the other way, but seems like most people didn't want that. I know it doesn't make sense in this particular case, but currently there's no solution for this.

    I'm surprised that you're getting 6 decimal places. You shouldn't get more than two. So are you actually seeing something like "9.123456"? I'll try it in the simulator later.

    I can't really control the text size directly -- for this kind of app ("simple" data field), the watch controls the display of the text based on the contents. I'm guessing that if you're seeing that many digits, the font size has been adjusted so it can fit.

    Thanks for the feedback!
  • Former Member
    Former Member over 6 years ago
    Is there any way to display a numeric field with a single place after the decimal point? At the moment, I can only pick a display format of number, with no decimal places, or decimal with two places.

    For example, gradient to two decimal places is overkill, as there's no way that the values from which the gradient is calculated are that accurate, but OTOH it would be useful to have finer resolution than a whole number for gradients of only a few percent.
  • Maybe someone can help me. I am missing the datafield from the older Edge series "high to point". When following a course it was helpful to see the rest elevation to the summit.
    Can anybody create this datafield with this app?


    Here is another vote/plea for the ability to do the calculation for the data field that used to be on the 305/705 (Vertical to Point). I loved that field and have pleaded with Garmin to add it back since the 500 and onwards. It's one of the reasons I still ride with a 705 when using courses. Seems like a simple calculation (difference between current elevation and elevation of next course point) but Garmin does not add it.
  • Question...DATA SAMPLING RATE FOR PREVT. I'm using "PREVT(Altitude, 30)" in a formula to get my altitude from 30 seconds ago. The complete formula subtracts this from my current altitude and then multiplies by 120 (the number of 30s intervals in an hour) to display my vertical speed (meters/hr). This should be an elegant solution to display vertical speed.

    Documentation says "PREVT not sampled every second, generally 10 samples". If I'm looking for a sample from 30s ago, then anywhere between 28-32s probably ok for this formula as altitude change within a second or two will be very small (unless I've just biked over a cliff!). Is this what "10 samples" means? Or is my formula not robust as PREVT(x, 30) ago could actually mean a sample from way more than 30s ago? And if that's so what's a robust formula to calc. vertical speed?
  • Nathan_A Yes, the total number of rolling samples for PREVT/PREVD will be 10, meaning that if you want data from 10 seconds ago (or less), you're pretty much guaranteed to get exactly that data. OTOH, with your example of PREVT(...,30), data will be sampled every 3 seconds.

    To get "perfect coverage" of the data, you would really want 1 sample per second (since CIQ data fields are updated every second). So yes, your intuition that the true precision will be within 3 seconds is correct (it's more like 30-33, in this case). This is why I would use the following formula snippet instead, to get the average altitude change per second (based on a 30 second window):

    (Altitude - PREVT(Altitude, 30)) / (Timer - PREVT(Timer, 30))

    The reason this works is that while you can't control the exact sample rate, you can be sure that two invocations of PREVT (or PREVD) with the same time parameter will use the same "sampling rate", because of the way the code is written. This is something that is not really mentioned in the doco.

    In other words, PREVT(Altitude, t) will retrieve the altitude from t+x seconds ago and PREVT(Timer,t) will retrieve the timer value from t+x seconds ago, where 0 <= x <= t/10.
  • Great project! Congrats!

    i would like to create a formula for the slope of the current lap.
    i want (Altitude now - altitude at the beginning of the lap) / distance of the lap.

    Using the following, I think it is different. Because LapMin function takes the minimum value, not the first.
    (TotalAscent - LAPMIN(TotalAscent) - (TotalDescent - LAPMIN(TotalDescent)) / 1000 / lapdistance