Measure type format
ThedataType property of a Measure specify what type of data to collect.
The string version is typically a namespace + name. CAMS-native measure types have the namespace dk.cachet.carp and the name is the measure type:
The
cachet part of the namespace is a legacy. The original vision and design of CARP was done as part of the Copenhagen Center for Health Technology (CACHET) and the namespace dk.cachet.carp was adopted back then. Now, CACHET has closed and the maintenance of CARP is now done by the Section of Digital Health at the Department of Health Technology at the Technical University of Denmark.For now we keep the old namespace for backward compatibility. This will, however, be changed to carp.dk in the future.Event-based vs. one-time measures
Most measures are event-based (EB), i.e., once triggered and started, they continuously sample data from their sensor until explicitly stopped. For example, collecting a step event every time a step is detected on the phone. However, some measures are one-time (OT), i.e., sampling one piece of data when triggered. For example, collecting weather data from the Open Weather API. It is important to know the type (EB vs. OT) of a measure since an event-based measure can be started and run until stopped, whereas a one-time measure needs to be triggered to sample data. This can, for example, be done periodically using appropriate triggers, like thePeriodicTrigger.
The difference when specifying the study protocol is illustrated below.
The first task added to the protocol contains a one-time measure (device info), which is triggered only once.
The second task contains a set of event-based measures that are triggered to start immediately and keep sampling data based on events.
The third task collects weather (one-time measure) periodically every 5 minutes.
SamplingPackage provides a list of what types of measures it supports using the dataTypes property.
Each sampling package also comes with a default sampling schema for each of its measure types.
Available measure types
CAMS comes with a large set of predefined measure types, each available in different sampling packages. Some measures are part of CAMS, others are available in separate sampling packages, and some are part of device-specific sampling packages. The tables below describe, for each measure:- Type Name - all type names are of the format
dk.cachet.carp.<type>, wheretypeis listed below - Availability on Android and/or iOS
- The sampling package containing the measure
- A description
Measures marked with * are one-time measures.
Built-in sampling packages
| Type | Android/iOS | Package | Description |
|---|---|---|---|
acceleration | + + | sensors | Rate of change in velocity in x, y, z - including gravity |
nongravitational acceleration | + + | sensors | Rate of change in velocity in x, y, z, - excluding gravity |
acceleration features | + + | sensors | Acceleration events over a specific sampling period and calculates higher-order features |
rotation | + + | sensors | Rotation of the device in x, y, z (typically measured by a gyroscope) |
magneticfield | + + | sensors | Magnetic field around the device in x,y,z (typically measured by a magnetometer) |
stepevent | + + | sensors | Step events from the device on-board sensor |
ambientlight | + - | sensors | Ambient light from the phone’s front light sensor |
deviceinformation* | + + | device | Basic device information |
application information* | + + | device | Information about the app |
batterystate | + + | device | Battery charging status and battery level |
screenevent | + - | device | Screen events (on/off/unlock) |
applifecycleevent | + + | device | App lifecycle state events (inactive, hidden, paused, resumed, detached) |
freememory | + - | device | Free memory |
timezone* | + + | device | Timezone of the device |
heartbeat | + + | device | A heartbeat measurement every 15 minutes (default) telling if the app is running (and not killed by the OS) |
External sampling packages
| Type | Android/iOS | Package | Description |
|---|---|---|---|
location | + + | context | Listens to the stream of location changes from the phone’s OS |
activity | + + | context | Activity as events from the OS’s build-in activity recognition API |
weather* | + + | context | Detailed weather information for the current location of the phone |
airquality* | + + | context | Air quality of the current location of the phone (from land-based stations) |
geofence | + + | context | Tracking entry, dwell, and exit event in circular geofences |
mobility | + + | context | Track location and calculates mobility features based on the mobility_features plugin |
bluetooth | + + | connectivity | Scanning nearby BLE devices |
wifi | + - | connectivity | Collects SSID and BSSID from connected wifi networks |
connectivity | + + | connectivity | Connectivity status events |
beacon | + + | connectivity | Scans for nearby iBeacons |
audio* | + + | media | Records audio from the device microphone |
noise | + + | media | Detects ambient noise from the device microphone |
apps* | + - | apps | List of installed apps |
appusage* | + - | apps | List of app usage |
phonelog* | + - | communication | Log of phone calls in/out |
textmessagelog* | + - | communication | Log of text messages (sms) in/out |
textmessage | + - | communication | Text message (sms) events when received |
calendar* | + + | communication | Collects calendar events from the calendars on the phone |
survey* | + + | survey | Collects data from surveys (questionnaires) via the Research Package and cognitive assessments from the Cognition Package |
Wearable device sampling packages
| Type | Android/iOS | Package | Description |
|---|---|---|---|
health | + + | health | Collects different types of health data from Apple Health and Google Health Connect that may come from connected wearable devices |
movisens | + - | movisens | Activity and Heart Rate Monitoring using the Movisens Move4 and EcgMove4 devices |
esense | + + | esense | Inertial measurement unit (IMU) sensor events and button press/release events from the eSense device |
polar | + + | polar | Inertial measurement (accelerometer, gyroscope, magnetometer) and heart rate (ECG, PPI, PPG, HR) data from the Polar devices |
movesense | + + | movesense | State (tap), heart rate (HR), ECG, and Inertial Movement Unit (IMU - accelerometer, gyroscope, magnetometer) data from the Movesense devices |
Each of these device measures has sub-types, such as
dk.cachet.carp.movisens.hr for heart rate (HR) measures from the Movisens device.