Measure types
Measure types available in the built-in and external CAMS sampling packages, with platform availability.
This page lists the measure types available in sampling packages, both the packages built into the carp_mobile_sensing framework and the external ones. The list evolves as support for more measures is released.
Measure type format
The dataType property of a Measure specifies the type of data to collect. Its string form is typically a namespace plus a name. CAMS-native measure types use the namespace dk.cachet.carp, and the name is the measure type:
Legacy namespace
The cachet part of the namespace is a legacy. The original vision and design of CARP was done at the Copenhagen Center for Health Technology (CACHET), and the namespace dk.cachet.carp was adopted then. CACHET has since closed, and CARP is now maintained by the Section of Digital Health at the Department of Health Technology at the Technical University of Denmark.
The old namespace is kept for backward compatibility. It will be changed to carp.dk in the future.
Event-based and one-time measures
| Kind | Behavior | Example |
|---|---|---|
| Event-based (EB) | Once triggered and started, continuously samples data from its sensor until explicitly stopped. Most measures are event-based. | A step event every time the phone detects a step. |
| One-time (OT) | Samples one piece of data when triggered. | Weather data from the Open Weather API. |
The kind matters when you specify a study protocol: an event-based measure can be started and runs until stopped, whereas a one-time measure must be triggered to sample data. You can, for example, trigger it periodically with a PeriodicTrigger.
In this protocol, the first task contains a one-time measure (device information) that is triggered only once. The second task contains event-based measures that start immediately and keep sampling data based on events. The third task collects weather (a one-time measure) periodically every 5 minutes.
Each SamplingPackage lists the measure types it supports in its dataTypes property, and provides a default sampling schema for each of its measure types.
Available measure types
CAMS has a large set of predefined measure types, each available in a sampling package. Some measures are part of CAMS, others are available in separate sampling packages, and some are part of device-specific sampling packages.
For each measure, the tables list:
- Type: all type names have the format
dk.cachet.carp.<type>, wheretypeis listed in the table. - Android and iOS: availability on each platform.
- Package: the sampling package that contains the measure.
- Description.
Types marked with * are one-time measures.
Built-in sampling packages
| Type | Android | iOS | Package | Description |
|---|---|---|---|---|
acceleration | Yes | Yes | sensors | Rate of change in velocity in x, y, z, including gravity |
nongravitational acceleration | Yes | Yes | sensors | Rate of change in velocity in x, y, z, excluding gravity |
acceleration features | Yes | Yes | sensors | Acceleration events over a specific sampling period, with calculated higher-order features |
rotation | Yes | Yes | sensors | Rotation of the device in x, y, z (typically measured by a gyroscope) |
magneticfield | Yes | Yes | sensors | Magnetic field around the device in x, y, z (typically measured by a magnetometer) |
stepevent | Yes | Yes | sensors | Step events from the device's onboard sensor |
ambientlight | Yes | No | sensors | Ambient light from the phone's front light sensor |
deviceinformation* | Yes | Yes | device | Basic device information |
application information* | Yes | Yes | device | Information about the app |
batterystate | Yes | Yes | device | Battery charging status and battery level |
screenevent | Yes | No | device | Screen events (on/off/unlock) |
applifecycleevent | Yes | Yes | device | App lifecycle state events (inactive, hidden, paused, resumed, detached) |
freememory | Yes | No | device | Free memory |
timezone* | Yes | Yes | device | Timezone of the device |
heartbeat | Yes | Yes | device | A heartbeat measurement every 15 minutes (default) telling whether the app is running (and not killed by the OS) |
External sampling packages
| Type | Android | iOS | Package | Description |
|---|---|---|---|---|
location | Yes | Yes | context | Listens to the stream of location changes from the phone's OS |
activity | Yes | Yes | context | Activity as events from the OS's built-in activity recognition API |
weather* | Yes | Yes | context | Detailed weather information for the current location of the phone |
airquality* | Yes | Yes | context | Air quality of the current location of the phone (from land-based stations) |
geofence | Yes | Yes | context | Tracks entry, dwell and exit events in circular geofences |
mobility | Yes | Yes | context | Tracks location and calculates mobility features based on the mobility_features plugin |
bluetooth | Yes | Yes | connectivity | Scans nearby BLE devices |
wifi | Yes | No | connectivity | Collects SSID and BSSID from connected Wi-Fi networks |
connectivity | Yes | Yes | connectivity | Connectivity status events |
beacon | Yes | Yes | connectivity | Scans for nearby iBeacons |
audio* | Yes | Yes | audio | Records audio from the device microphone |
noise | Yes | Yes | audio | Detects ambient noise from the device microphone |
apps* | Yes | No | apps | List of installed apps |
appusage* | Yes | No | apps | List of app usage |
phonelog* | Yes | No | communication | Log of incoming and outgoing phone calls |
textmessagelog* | Yes | No | communication | Log of incoming and outgoing text messages (SMS) |
textmessage | Yes | No | communication | Text message (SMS) events when received |
calendar* | Yes | Yes | communication | Calendar events from the calendars on the phone |
survey* | Yes | Yes | survey | Data from surveys (questionnaires) through the Research Package, and cognitive assessments from the Cognition Package |
Wearable device sampling packages
| Type | Android | iOS | Package | Description |
|---|---|---|---|---|
health | Yes | Yes | health | Different types of health data from Apple Health and Google Health Connect, which may come from connected wearable devices |
movisens | Yes | No | movisens | Activity and heart rate monitoring using the Movisens Move4 and EcgMove4 devices |
esense | Yes | Yes | esense | Inertial measurement unit (IMU) sensor events and button press/release events from the eSense device |
polar | Yes | Yes | polar | Inertial measurement (accelerometer, gyroscope, magnetometer) and heart rate (ECG, PPI, PPG, HR) data from Polar devices |
movesense | Yes | Yes | movesense | State (tap), heart rate (HR), ECG and inertial measurement unit (IMU: accelerometer, gyroscope, magnetometer) data from Movesense devices |
watch.aware | No | Yes | aware | Motion, heart rate, battery, location, heading, Bluetooth, ambient noise and sound classification collected on an Apple Watch using the AWARE watchOS framework. These measures use the dk.carp.watch.aware namespace; see Apple Watch Sensing. |
Each of these device measures has sub-types, such as dk.cachet.carp.movisens.hr for heart rate (HR) measures from the Movisens device.