Skip to content
CARP Docs
Ask AISystemLightDark
On this page

Data types

The nine watch measure types and the fields of their data classes.

Copy MarkdownOpen inOpen in GitHubView as MarkdownOpen in Scira AIOpen in ChatGPTOpen in ClaudeOpen in Cursor

All measure types in this package live in the dk.carp.watch.aware namespace and are event-based: once started, they keep producing data until the study stops them.

Measure(type: AppleWatchSamplingPackage.MOTION)
// equivalent to
Measure(type: 'dk.carp.watch.aware.motion')
ConstantType stringData class
AppleWatchSamplingPackage.MOTIONdk.carp.watch.aware.motionAppleWatchMotion
AppleWatchSamplingPackage.HEART_RATEdk.carp.watch.aware.heartrateAppleWatchHeartRate
AppleWatchSamplingPackage.BATTERYdk.carp.watch.aware.batteryAppleWatchBattery
AppleWatchSamplingPackage.LOCATIONdk.carp.watch.aware.locationAppleWatchLocation
AppleWatchSamplingPackage.HEADINGdk.carp.watch.aware.headingAppleWatchHeading
AppleWatchSamplingPackage.BLUETOOTHdk.carp.watch.aware.bluetoothAppleWatchBluetooth
AppleWatchSamplingPackage.AMBIENT_NOISEdk.carp.watch.aware.ambientnoiseAppleWatchAmbientNoise
AppleWatchSamplingPackage.AUDIO_LABELdk.carp.watch.aware.audiolabelAppleWatchAudioLabel
AppleWatchSamplingPackage.DEVICEdk.carp.watch.aware.deviceAppleWatchDeviceInfo

Common fields

All nine data classes extend AppleWatchData:

FieldTypeMeaning
deviceIdString?The AWARE device id of the watch that collected the record
timestampDateTimeWhen the watch recorded it (UTC), not when the phone received it
labelString?The AWARE data label from AppleWatchDevice.label, if set
recordIdString?Stable identity of the record, used to discard duplicates

recordId is formed as watch device id / measure type / row id in the watch database. It makes re-transferred records safe: the same record never lands twice in the local CAMS database.

Reading the data

client.measurements
    .where((m) => m.dataType.toString() == AppleWatchSamplingPackage.HEART_RATE)
    .listen((measurement) {
      final heartRate = measurement.data as AppleWatchHeartRate;
      print('${heartRate.timestamp}: ${heartRate.hr} BPM');
    });

Data classes

Motion

AppleWatchMotion: sampled at motionSamplingRate Hz. Fields that belong to a disabled sub-sensor (accelerometerEnabled, deviceMotionEnabled) are zero.

FieldUnitDescription
accX, accY, accZGRaw acceleration, including gravity
roll, pitch, yawradiansAttitude
gravityX, gravityY, gravityZGGravity vector
rotationX, rotationY, rotationZrad/sRotation rate
userAccX, userAccY, userAccZGUser acceleration, gravity removed

Heart rate

AppleWatchHeartRate: read from HealthKit on the watch.

FieldUnitDescription
hrBPMHeart rate in beats per minute

Requires the HealthKit capability and the participant's permission, granted on the watch. watchOS decides the sampling frequency, not this package: the watch measures more often during activity and less often at rest.

Battery

AppleWatchBattery: the battery of the watch itself.

FieldUnitDescription
batteryLevelpercent (0–100)-1 when unknown
batteryStateWatchBatteryStateunknown, unplugged, charging, or full

Note

watchOS reports the battery level in steps of 5%.

Location

AppleWatchLocation

FieldUnitDescription
latitude, longitudedecimal degreesPosition
altitudemetersAbove mean sea level
ellipsoidalAltitudemetersAbove the WGS 84 reference ellipsoid
horizontalAccuracymetersRadius of uncertainty
verticalAccuracymetersVertical uncertainty
speedm/sInstantaneous speed
speedAccuracym/sAccuracy of speed
coursedegreesDirection of travel relative to true north
courseAccuracydegreesAccuracy of course

Warning

If the phone also collects location through carp_context_package, disable one of the two. Otherwise you get two location streams.

Heading

AppleWatchHeading: compass and magnetometer.

FieldUnitDescription
trueHeadingdegreesRelative to true north
magneticHeadingdegreesRelative to magnetic north
headingAccuracydegreesMaximum deviation of the reported heading
x, y, zmicroteslasGeomagnetic field

Bluetooth

AppleWatchBluetooth: one record per device seen in a scan.

FieldUnitDescription
identifier—Identifier of the scanned device
name—Advertised name, if any
rssidBmReceived signal strength

Ambient noise

AppleWatchAmbientNoise: sound pressure level. No audio is stored.

FieldUnitDescription
decibeldBSound pressure level

Requires audioEnabled: true together with ambientNoiseEnabled: true.

Audio label

AppleWatchAudioLabel: sound classification using Apple's SoundAnalysis. No audio is stored.

FieldUnitDescription
audioLabel—The classified sound, e.g. speech or laughter
confidence0.0–1.0Confidence of the classification

Requires audioEnabled: true together with audioClassificationEnabled: true. Filter on confidence in analysis: low-confidence labels are frequent in noisy environments.

Device information

AppleWatchDeviceInfo: collected once each time data collection starts on the watch.

FieldDescription
pairedIosDeviceIdThe AWARE device id of the phone this watch is paired with
nameThe name of the watch, as set by the participant
modelWatch model, e.g. Apple Watch
systemNameOperating system name, e.g. Watch OS
systemVersionOperating system version, e.g. 11.2
preferredContentSizeCategoryThe participant's dynamic type setting

This is the record that links the watch's AWARE device id to the phone's.

Quick links

Page · DocumentationCARP DocumentationPage · DocumentationIntroductionPage · DocumentationQuickstartPage · DocumentationTerminologyPage · DocumentationArchitecture