Documentation for data available on watches

We are preparing to write an app for the fenix 6, and a companion app for the iPhone that it syncs with via bluetooth. As part of that, we're trying to find clear documentation of what sensor data is available, and what format it is in. For example, to calculate heart rate variability, do we get the raw PPG files, or has it been processed into timecodes for heart beats? So far, we're having trouble locating that documentation for devices. The "Devices Reference" (link below) only provides information on graphical displays.

developer.garmin.com/.../

  • Have you looked at the samples in the SDK?  Or the API doc?

  • We weren't able to find anything in the API documentation (link below). 

    https://developer.garmin.com/connect-iq/api-docs/

    The programmers guide (link below) has only brief descriptions of the sensor functions.

    https://developer.garmin.com/connect-iq/core-topics/sensors/

    As far as the SDK samples, does that mean we have to dig through the code in each sample to see what sensor data is available? Also, does the SDK sample code have specs for different watches?

  • You may want to check this section of the API documentation:

    https://developer.garmin.com/connect-iq/api-docs/Toybox/Sensor.html

    This may be of interest:
    https://developer.garmin.com/connect-iq/api-docs/Toybox/Sensor/Info.html

    (I believe most or all of this sensor data has already been preprocessed/filtered/calibrated -- i.e. it's not "raw sensor data"):

    The Sensor.Info class contains all of the information provided by enabled sensors.

    Sensor.Info can be retrieved on every call of onUpdate() or it can be obtained on demand.

    accel
    The accelerometer reading of the x, y, and z axes as an Array of Number values in millig-units.

    altitude
    The altitude above mean sea level in meters (m).

    cadence
    The cadence in revolutions per minute (rpm).

    heading
    The true north referenced heading in radians.

    heartRate
    The heart rate in beats per minute (bpm).

    mag
    The magnetometer reading of the x, y, and z axes as an Array of Number values in milliGauss (mG).

    oxygenSaturation
    The current oxygen saturation in percent (%).

    power
    The power in Watts (W).

    pressure
    The barometric pressure in Pascals (Pa).

    speed
    The speed in meters per second (m/s).

    temperature
    The temperature in degrees Celsius (C).

    And this:

    https://developer.garmin.com/connect-iq/api-docs/Toybox/Sensor/SensorData.html

    A class to encapsulate all high-frequency sensor data that can be retrieved.

    https://developer.garmin.com/connect-iq/api-docs/Toybox/Sensor/AccelerometerData.html


    pitch
    The Array of pitch values as Floats in degrees.

    power
    The Array of vector power values as Numbers in millig-units.

    roll
    The Array of roll values as Floats in degrees.

    x
    The Array of x axis values as Numbers in millig-units.

    y
    The Array of y axis values as Numbers in millig-units.

    z
    The Array of z axis values as Numbers in millig-units.

    https://developer.garmin.com/connect-iq/api-docs/Toybox/Sensor/HeartRateData.html

    var heartBeatIntervals ⇒ Toybox.Lang.Array

    The most recent beat-to-beat interval data as an Array of Number objects in milliseconds (ms).

  • Very helpful!

    Are you aware of a list of data available by device? Or should we just assume, for example, that devices with O2 sensors have the oxygenSaturation variable available, etc.?

  • Or should we just assume, for example, that devices with O2 sensors have the oxygenSaturation variable available, etc.?

    That's probably a safe bet.

    If you want to determine that at run-time, you can use the has operator:

    var info = Sensor.Info.getInfo();

    if (info has :oxygenSaturation) {
        // ...
    }

    If you want to know the available sensors per-device (sort of), you can look in the CIQ Devices folder and examine simulator.json for each device.

    1) Open devices folder:

    Windows: %appdata%\garmin\connectiq\devices

    Mac/Linux (unconfirmed): ~/garmin/connectiq/devices

    2) Open {DEVICENAME}\simulator.json and navigate to sensorHistory (at the top level). e.g. For venu:

        "sensorHistory": [
            {
                
    "interval"120,
                
    "size"180,
                
    "type""heartrate"
            },
            {
                
    "interval"120,
                
    "size"180,
                
    "type""elevation"
            },
            {
                
    "interval"120,
                
    "size"180,
                
    "type""temperature"
            },
            {
                
    "interval"120,
                
    "size"180,
                
    "type""pressure"
            },
            {
                
    "interval"3600,
                
    "size"168,
                
    "type""pulseox"
            }
    ]

    If you wanted to collect this information for all devices in a single file, you could use jq to aggregate, filter and reshape the data.

  • With o2, readings are only taken something like every 15 minutes, and history is saved every hour, but last I checked, that's also saved from oldest to newest, so backwards from what you might expect.

    Also, this is only available on watches running CIQ 3.2 or higher.

  • Thanks again for the help! Does the watch provide respiratory rate data? Generally, we would calculate that from the raw PPG. If I go to my Garmin Connect webportal, I can see my respiratory rate over the course of a workout. That leads me to think RR should be available. 

  • Not available with CIQ.  There's data used or generated by first beat that's not exposed in CIQ.

    As said before, look at the data in Sensors.  That's what you have access to,.  And then only in some app types, and possibly only if those sensors are enabled.  For example, OHR, by default you see the less accurate 24/7 data, but when enabled, you see better data, and in this case, it could also be data from an external HRM.

    Temperature in most cases is only available with an external Tempe sensor.

  • If you look at the Sensor sample in the SDK, you see a simple app that accesses HR and graphs it.