Motion Sensors

Accelerometer

Supported on Android & iOS.

Download Sample Data

Measures the acceleration force applied to a device in m/s2, including the force of gravity. Data from the accelerometer, together with Gravity, Gyroscope, and Magnetic Field can provide a good estimate of the device’s movement, and subsequently estimate the participant’s physical activity.

Use Cases

  • Physical activity and sedentary behavior: Measuring activity levels and sedentary time patterns
  • Sleep research: Detecting sleep/wake states based on movement
  • Clinical applications: Gait analysis, mobility tracking, fall detection, and movement monitoring in neurodegenerative disorders

Data Structure

Besides the common data fields, each record contains:

  • X-Axis: Acceleration force along the x-axis (including gravity), in m/s2. Internally stored as x_axis.
  • Y-Axis: Acceleration force along the y-axis (including gravity), in m/s2. Internally stored as y_axis.
  • Z-Axis: Acceleration force along the z-axis (including gravity), in m/s2. Internally stored as z_axis.
  • Accuracy: The accuracy of the reading. It can be either 1 for low accuracy, 2 for medium accuracy, or 3 for high accuracy. Internally stored as accu.

Magnetic Field

Supported on Android & iOS.

Download Sample Data

Measures the ambient geomagnetic field in microtesla (μT) along the three device axes. This sensor captures both the Earth’s magnetic field and local magnetic interference from nearby objects or electronics.

Use Cases

  • Environmental studies: Monitoring magnetic field variations across different locations
  • Activity recognition: Combining with other motion sensors to enhance detection of movements and gestures

Data Structure

Besides the common data fields, each record contains:

  • X-Axis: Geomagnetic field strength along the x-axis, in μT. Internally stored as x_axis.
  • Y-Axis: Geomagnetic field strength along the y-axis, in μT. Internally stored as y_axis.
  • Z-Axis: Geomagnetic field strength along the z-axis, in μT. Internally stored as z_axis.
  • Accuracy: Same as Accuracy in Accelerometer.

Gyroscope

Supported on Android & iOS.

Download Sample Data

Measures the rate of rotation of the device around its three axes in radians per second (rad/s). Gyroscope data provides precise information about angular velocity and orientation changes over time, which can be used for rotation detection (spin, turn, etc.).

Use Cases

  • Gesture recognition: Detecting device or hand movements
  • Motion analysis: Improving activity recognition and movement tracking when fused with other motion sensors

Data Structure

Besides the common data fields, each record contains:

  • X-Axis: The rate of rotation around the x-axis, in rad/s. Internally stored as x_axis.
  • Y-Axis: The rate of rotation around the y-axis, in rad/s. Internally stored as y_axis.
  • Z-Axis: The rate of rotation around the z-axis, in rad/s. Internally stored as z_axis.
  • Accuracy: Same as Accuracy in Accelerometer.

Linear Acceleration

Supported on Android & iOS.

Download Sample Data

Measures the acceleration force that is applied to the device in m/s2, excluding the force of gravity. This data source is usually implemented as a software-based data source and does not have a dedicated hardware chip on the smartphone. The device measures acceleration from the Accelerometer sensor, and excludes the gravity measured by the Gravity sensor, in order to calculate the linear acceleration.

Use Cases

  • Physical activity monitoring: Capturing detailed movement patterns
  • Posture and gait analysis: Detecting subtle changes in body posture or walking mechanics for clinical or rehabilitation studies
  • Fall and sudden movement detection: Identifying rapid changes in acceleration that indicate falls or abrupt movements

Data Structure

Besides the common data fields, each record contains:

  • X-Axis: Acceleration force along the x-axis (excluding gravity), in m/s2. Internally stored as x_axis.
  • Y-Axis: Acceleration force along the y-axis (excluding gravity), in m/s2. Internally stored as y_axis.
  • Z-Axis: Acceleration force along the z-axis (excluding gravity), in m/s2. Internally stored as z_axis.
  • Accuracy: Same as Accuracy in Accelerometer.

Gravity

Supported on Android & iOS.

Download Sample Data

Measures the force of gravity that is applied to the device in m/s2. Gravity data is used to isolate gravitational acceleration from device movement, enabling accurate motion and orientation detection (shake, tilt, etc.).

Use Cases

  • Posture and balance monitoring: Tracking body orientation for clinical assessments, fall risk evaluation, or rehabilitation
  • Gait and mobility analysis: Separating gravitational force from movement to analyze walking patterns or sit-to-stand transitions
  • Activity recognition: Improving accuracy of activity classification when combined with accelerometer and linear acceleration data

Data Structure

Besides the common data fields, each record contains:

  • X-Axis: Force of gravity along the x-axis, in m/s2. Internally stored as x_axis.
  • Y-Axis: Force of gravity along the y-axis, in m/s2. Internally stored as y_axis.
  • Z-Axis: Force of gravity along the z-axis, in m/s2. Internally stored as z_axis.
  • Accuracy: Same as Accuracy in Accelerometer.

Orientation

Supported on Android & iOS.

Download Sample Data

Measures the device orientation around its axes using the three components of its rotation vector. It can be used to determine tilt, heading, and overall orientation in 3D space.

Use Cases

  • Posture and ergonomics monitoring: Tracking device orientation to assess sitting, standing, or working postures in occupational health studies
  • Fall risk and balance assessment: Detecting body tilts and orientation changes to evaluate stability in elderly or clinical populations

Data Structure

Besides the common data fields, each record contains:

  • X-Axis: Rotation vector component along the x-axis (x * sin(θ/2)). Internally stored as x_axis.
  • Y-Axis: Rotation vector component along the y-axis (y * sin(θ/2)). Internally stored as y_axis.
  • Z-Axis: Rotation vector component along the z-axis (z * sin(θ/2)). Internally stored as z_axis.
  • Vector Size: Scalar component of the rotation vector (cos(θ/2)). This value might not be provided. Internally stored as vector_size.
  • Accuracy: Same as Accuracy in Accelerometer.

Pedometer

Supported on Android & iOS.

Download Sample Data

Counts the number of steps taken by the participant over a certain duration. Avicenna uses Android and iOS standard algorithms to collect the count of steps taken. For implementation details, refer to Android Step Counter and Apple CMPedometer documentation.

Use Cases

  • Physical activity monitoring: Tracking daily step count as an indicator of overall activity and adherence to exercise goals
  • Clinical and rehabilitation research: Evaluating mobility improvements in patients recovering from surgery, injury, or chronic illness
  • Epidemiological studies: Assessing relationships between step count, physical activity, and long-term health outcomes such as cardiovascular disease or obesity

Data Structure

Besides the common data fields, each record contains:

  • Duration: The duration over which this record has collected data, in seconds. Internally stored as duration.
  • Steps: The number of steps taken by the participant over the specified duration. Internally stored as steps.
  • Accuracy: The accuracy of the record. This field is available on Android only; iOS records will always store -1. Internally stored as accu.
  • Average Active Pace: The average pace of the participant, measured in seconds per meter. This field is available on iOS only; Android records will always store -1. Internally stored as avg_active_pace.
  • Current Cadence: The rate at which steps are taken, measured in steps per second. This field is available on iOS only; Android records will always store -1. Internally stored as cur_cadence.
  • Current Pace: The current pace of the participant, measured in seconds per meter. This field is available on iOS only; Android records will always store -1. Internally stored as cur_pace.
  • Distance: The estimated distance traveled by the participant, in meters. This field is available on iOS only; Android records will always store -1. Internally stored as distance.
  • Floor Ascended: The approximate number of floors ascended by walking. This field is available on iOS only; Android records will always store -1. Internally stored as floor_ascended.
  • Floor Descended: The approximate number of floors descended by waking. This field is available on iOS only; Android records will always store -1. Internally stored as floor_descended.

[!note]
To reduce unnecessary load on the app and system, we ignore/exclude records with zero steps.

Motion-Based Activity Recognition

Supported on Android & iOS.

Download Sample Data

Uses a combination of motion sensors to detect the type of activity that the participant is currently engaged in. Avicenna uses Android and iOS standard algorithms to detect the participant’s type of current activity. Please refer to Google and Apple documentation for implementation details in Android and iOS devices.

Use Cases

  • Physical activity research: Automatically identifying activity types to measure overall mobility and energy expenditure
  • Sedentary behavior analysis: Detecting prolonged periods of inactivity associated with chronic health risks
  • Population and epidemiological studies: Assessing how different activity patterns relate to health outcomes across large participant groups
  • Digital health interventions: Providing real-time feedback or adaptive prompts to encourage movement and reduce sedentary time

Data Structure

Besides the common data fields, each record contains:

  • Activity Type: The type of recognized activity. Internally stored as activity_type. It can be one of the following values:

    • 0: Unknown. Unable to detect the current activity.
    • 1: Still. The device is still (not moving).
    • 2: Tilting. The device angle relative to gravity changed significantly. This often occurs when a device is picked up from a desk or a user who is sitting stands up.
    • 3: On-Foot. The device is on a participant who is walking or running.
    • 4: Walking. The device is on a user who is walking. This is a sub-activity of On-Foot.
    • 5: Running. The device is on a user who is running. This is a sub-activity of On-Foot.
    • 6: On-Bicycle. The device is on a bicycle.
    • 7: In-Vehicle. The device is in a vehicle, such as a car.

    Please note that we can have different activity types at the same time. For example, if the participant is driving and stops in some places during driving, we will have two records at the same time with different activity types: In-Vehicle and Still.

  • Confidence Level: Represents the algorithm’s confidence in the recognized activity. For Android devices, the confidence level is a value between 0 to 100, and for iOS devices, the confidence level is either 0 (low), 1 (medium), or 2 (high). Internally stored as confidence_level.

Additional Information for Motion Sensors

The following information applies to all the motion sensor data sources listed above.

Adding Data Sources

See Adding Data Sources.

Data Collection Behavior

See Data Collection Behavior of Avicenna.

Monitoring and Exporting Data

You can monitor and export motion sensors data using either the Data Export page or Kibana.

Motion Sensors in the Participant App

Participants do not need to do anything (e.g., grant permissions) for these data sources, and the data collection will start immediately.