Activity Data

If you're looking for activity data to put in your formula, you've come to the right place. Build your own data field using native data such as heart rate (HR) and power.

Quick Start

Variables and Constants

Case is not important: "Cadence" is the same as "cadence". Variables are updated once per second.

Available to all devices:
Timer, ElapsedTime,
Speed, MaxSpeed, AvgSpeed, Distance,
Cadence, MaxCadence, AvgCadence,
HR, maxHR, AvgHR,
Calories,
Heading, Altitude, TotalAscent, TotalDescent,
TrainingEffect, EnergyExpenditure,
LocationAccuracy
UserRestingHR, UserHRZone1Min, UserHRZone1Max, UserHRZone2Max, UserHRZone3Max, UserHRZone4Max, UserHRZone5Max
NotificationCount
TimeOfDay
LapCount, LapDistance, LapTime,
pi, kmPerMile, metresPerFoot,metersPerFoot

Multisport/cycling only:
Power, MaxPower, AvgPower



Everything below is available to [CIQ2] devices only:
(any device except:FR230/235, FR630, FR920XT, Vivoactive, Fenix 3/HR, D2 Bravo/Titanium, Quatix 3, Tactix Bravo)
UserWeight,
DistanceToStart, DistanceToLapStart,
Steps,
AmbientPressure, RawAmbientPressure, MeanSeaLevelPressure

Multisport/cycling:
FrontGearIndex, FrontGearMax, FrontGearSize, RearGearIndex, RearGearMax, RearGearSize

Advanced navigation devices only (e.g. 935, Fenix 5, but not VA3 or 645):
distanceToNextPoint, distanceToDestination, elevationAtNextPoint, elevationAtDestination, Bearing, BearingFromStart, CourseOverGround,


Lap Data/Functions

NOTE: Lap data/functions work for all manual and auto laps, outside of a structured workout. For lap support in structured workouts, AppBuilder 5 and Connect IQ 3 is required.

CIQ 1 devices: D2 Bravo (titanium), Fenix 3 (HR), Vivoactive, FR230, 235, 630, 920XT
CIQ 2 devices: Vivoactive HR, 735XT, Edge 520, Edge 1000
CIQ 3 devices: Anything not in the above list (some devices, such as Approach S60, are still on CIQ 2, but are supposed to get the CIQ 3 upgrade in the future.)

To check your CIQ version: open the menu (hold UP on most devices), navigate to Settings > About and scroll down.

Units

Variables normally use automatic units, which are determined by device settings. Auto units have the advantage of displaying data in the same format as the native fields. For example, "distance" is returned in either km or miles, depending on your device settings.

"Raw" units are fixed units which don't change based on device settings; this can come in handy when you need to do further calculations with the data, like converting distance to yards. Raw units are selected by adding "_raw" to the end of a variable name (e.g. distance in metres is "distance_raw").
TypeAutomatic UnitsRaw Units
Timesecondsmilliseconds
Distancekm, milesmetres
Speedkm per hour, miles per hourmetres per second
Altitudemetres or feetmetres
Heading, Bearing, Course over grounddegrees (0 to 360)radians (-pi to pi)
Weightkg or poundsgrams
PowerWW
Cadencerpm (both legs)rpm
Heart ratebpmbpm
Calorieskcalkcal
Energy expenditurekcal/minkcal/min
Pressuremillibar / hPaPa

Details

Variables

Timer: The activity timer. When you pause your activity, this stops. Same as Timer in built-in Garmin data fields.
ElapsedTime: The activity elapsed time. When you pause your activity, this does not stop. Same as Elapsed Time in built-in Garmin data fields.
TrainingEffect: 1.0 (easy) to 5.0 (overreaching)
LocationAccuracy: 0 - 4 (0: GPS unavailable, 1: Using last location, 2: Poor, 3: Usable, 4: Good)
DistanceToStart, DistanceToLapStart: straight-line distance as the crow flies
TimeOfDay: number of seconds since midnight
LapCount: the number of laps completed so far (0 during the first lap, 1 during the second lap, etc.)

Heading: the direction you are currently facing, independent of direction of travel.
CourseOverGround: the direction of travel, independent of direction you are facing
Bearing: the direction from your current location to the destination
BearingFromStart: The direction from your starting location to the destination

AmbientPressure: Same as native "ambient pressure" field (except units are always in millibars/hPa). Smoothed/filtered by device
RawAmbientPressure: Raw data from sensor
MeanSeaLevelPressure: Same as native "barometric pressure" field (except units are always in millibars/hPa). Pressure corrected for elevation. Requires GPS fix for altitude

More information on heading, bearing and course over ground.

Notes

Note about older devices: unit settings (metric vs statute) are only applied to AppBuilder when the data field is loaded (i.e. when you open the running app). If you change your unit settings, you must exit the activity and re-enter it for changes to be applied. (For most devices, it would be enough to discard or save your current run).

Newer devices do not have this limitation.

Comments

  1. I'm wondering if I can create a Steps field by showing avgCadence * (time / 60). What do you think?

    ReplyDelete
    Replies
    1. That might work, although it would be a little fuzzy. I think you would be better off using a steps field from the app store. Some of them will write steps to the FIT file, too. (Garmin also writes steps to the FIT file, but doesn't show it in Garmin Connect anymore.)

      Delete
    2. Note that Steps is now available as a variable in AppBuilder, for CIQ 2 devices.

      Delete
  2. Good afternoon,
    I am totally new to this and would like to ask You, if it's possible to use AppBuilder, just to create the view?
    I would like to create the view, which is not supported originally by the watch. For ex.:
    I would like to create the fields:
    1. That would show me current exercise name;
    2. Show the number of the current set;
    3. Show the number of repetitions, according to the workout plan;
    4. Show the current Heart rate;
    5. Show current oxygen level;
    6. Show Current time of the day.
    This is just example. I would like to have something like that built, by my own tase and need. I am using GARMIN Fenix 5x Plus watch
    Thank You for Your reply in advance and Best regards.
    Wishing You a nice weekend.

    ReplyDelete
    Replies
    1. Sorry, that's not possible. Although AppBuilder 5+ supports a full-screen layout with 6 fields, not all of that information is available to Connect IQ apps (such as exercise name and oxygen level).

      Delete
  3. Is it possible to pull in fields from ANT+ sensors?

    ReplyDelete
    Replies
    1. Nope, sorry. AppBuilder only has access to native data. If you pair your power meter or footpod natively, then it can read the data that is provided through native variables like Power or Cadence.

      Delete
  4. When Appbuilder gets the value for average speed does it check the auto pause status on the device? I’d like to be able to display both moving average speed and combined average, including stoppage time.

    ReplyDelete
    Replies
    1. Average speed/pace comes directly from the watch firmware. It's the same as the built-in fields would display. If you want the average speed including stoppage time, use the following formula: Distance / ElapsedTime * 3600

      That will give you speed in either km/h or miles/h, based on device settings. If you want pace, use the same formula but set Display Format to Pace. That will give you minutes and seconds per km or mile.

      Delete
  5. Can I access Stroke data?
    I want to calculate distance based on ave stroke distance x total stroke for activity.

    ReplyDelete
    Replies
    1. Sorry, that stroke data is not available to Connect IQ apps. What seems to be available is:
      - Avg swim stroke distance from previous length
      - Stroke type from previous length
      - SWOLF from previous length

      None of these are available in AppBuilder at this time.

      Delete
  6. may know , i have read your manual but still didn't find how to get value total time of curent workout lap (in second). I have create workout with 4 lap , every lap is 1 minute , 2 minute , 3 minute and 4 minute. I need that value.

    I create workout and I need to % of a lap time complete ( current laptime / total lap time in second )

    ReplyDelete
    Replies
    1. Unfortunately workout data is not available to AppBuilder or any Connect IQ app/data field.

      Delete
  7. Hi Flowstate
    Thanks for your work

    Im trying to recreate PacePro in my Garmin Forerunner 945 but with the planning inside my course. I'm needing the "timeToNextPoint" variable, but at the moment It's not available in your app. would it be possible soon?

    Thanks!

    ReplyDelete
    Replies
    1. Sorry, Garmin's Connect IQ API does not expose timeToNextPoint to developers.

      Delete
  8. Hi. I am really struggling to get this right. I am able to get one formula to work. I use the cadence/2 as in your examples. It shows on my watch while in running activity. But I do not understand how to get more data fields in the same page. I want for instance time, elapsedtime, heart rate zone, distance on the same page, how do I get that to work? I have read all your guides and searched the forum...

    ReplyDelete
    Replies
    1. Hey Megeland,

      if you want multiple AppBuilder data fields, you will either to have:
      - Install AppBuilder more than once (e.g. AppBuilder 5, AppBuilder 5 B); this will allow you to have up to two AppBuilder data fields on most Garmin devices
      - Install AppBuilder 5+ which is a full-screen (data field) app that supports 6 fields of data. AppBuilder 5+ is only supported on certain high-end/new Garmin devices, due to resource limitations.

      Delete
  9. Hello, is it possible to access accelerometer data? thanks

    ReplyDelete
  10. Hi Flowstate, thank you so much, I am trying to get the cadence of Taichi movements, is there a way to increase sensitivity?

    ReplyDelete
    Replies
    1. Like all Connect IQ data fields, AppBuilder receives updated data once per second. This is a Garmin limit which can't be changed.

      Delete
  11. Hi!

    I want to program a custom countdown timer for my track training (hoping that this is possible):

    Until now I recorded my whole run with a GPS watch on one arm and used a stop watch on the other arm for my intervals. When I got to the track, I started my stop watch intervals with auto repeat and accoustic signals, i.e. I could start/stop whenever I wanted while recording my whole run with the GPS watch.

    I tried

    alert(timer gte 5 and round(timer) mod 5 gte 0 and round(timer) mod 5 lte 2) ; 5 - (round(timer) mod 5)

    on AppBuilder but that countdown timer starts as soon as I start my run (I've not reached the track yet).

    Is there a way to program the countdown to start when I display the AppBuilder data field? And let it stop when I switch back to another data field?

    Thx.

    ReplyDelete
  12. How can I retrieve Aerobic Training Effect and Anaerobic Training Effect separately?

    ReplyDelete
    Replies
    1. Sorry, Garmin's Connect IQ API doesn't make that information available to CIQ apps.

      Delete
  13. Hello, can Intensity Minutes for the activity be added or calculated? Thank you!

    ReplyDelete
    Replies
    1. Intensity Minutes is a proprietary Garmin metric which isn't available to Connect IQ apps.

      Delete
  14. Is it possible to get the next turn arrow and name from a waypoint in a fit course?

    ReplyDelete
    Replies
    1. The name of the next point is available to CIQ apps, but AppBuilder doesn't support it. The next turn arrow is unfortunately not available to CIQ apps at all.

      Delete
  15. Hi!, quick question:
    is it possible to use the constant "functional_threshold_power" from Garmin?

    ReplyDelete
    Replies
    1. Hey, that information is not available to Connect IQ apps, unfortunately.

      Delete
  16. Hi Flowstate,
    I intend to create formulas for swimming and look for the amounts of strokes and pool lanes. Should these not already exist, could they be made available? I would appreciate that very much.

    ReplyDelete
  17. Hi
    Is there a Temperature variable (sorry I asked elsewhere before I saw this variables page) I want to subtract 6 degrees F from the internal temperature value displayed on my GArmin 1030+, to correct the inherent error which Garmin have failed to adress (I've checked it in a controlled lab environment using certified measuring equipment). So I wish to create a simple single field to display the corrcted value :-) IF that could take the place of the standard data output in the .fit file that would be simply out of this world!!! ;-)
    Thank you sooooo much for this tool -
    PS the Notify me box isn't working an there is an error that says An error occurred while contacting the server.

    ReplyDelete
    Replies
    1. You should write a widget for temperature correction...

      Delete
  18. Hi, I am trying to get a data field to count my run streak. I need to be able to count the days from a certain date. In the above list i cannot see a variable for date. Would that be possibe?

    ReplyDelete
  19. He logrado introducir las formulas, en Appbuilder 5 y Appbuilder 5 B, las visualizo durante la actividad (ciclismo), pero luego no se han GUARDADO datos numéricos en la actividad. Por supuesto he activado la pestaña "Record Data to FIT File" en la configuración de la aplicación.
    En el RESUMEN de la actividad, en Connect, en lugar de los datos numéricos aparece el Nombre que le he puesto al campo, por ejemplo "Potencia 10 s". ¿Qué estoy haciendo mal?

    ReplyDelete
  20. Hi, this is probably a long shot, but are any of the cycling dynamics parameters available to Connect IQ apps? Things like left/right balance, torque effectiveness, pedal smoothness, etc from Garmin power meter pedals. Thanks!

    ReplyDelete
  21. Hello Flowstate,
    is it possible to add EstimatedTimeEnroute (ETE navigation field) as a usable variable ?
    Would be helpful to create a time ahead data field using a FIT track with timestamps. Thank you!

    ReplyDelete

Post a Comment