The gyroscope sensor measures the rate or rotation in rad/s around a device’s x, y and z axis. Rotation is positive in the counter-clockwise direction; that is, an observer looking from some positive location on the x, y or z axis at a device positioned on the origin would report positive rotation if the device appeared to be rotating counter clockwise. This is the standard mathematical definition of positive rotation and is not the same as the definition for roll that is used by the orientation sensor.

Standard gyroscopes provide raw rotational data without any filtering or correction for noise and drift (bias). In practice, gyroscope noise and drift will introduce errors that need to be compensated for. You usually determine the drift (bias) and noise by monitoring other sensors, such as the gravity sensor or accelerometer.

axis_device

The coordinate-system is defined relative to the screen of the phone in its default orientation (facing the user). The axis are not swapped when the device’s screen orientation changes. The X axis is horizontal and points to the right, the Y axis is vertical and points up and the Z axis points towards the outside of the front face of the screen. In this system, coordinates behind the screen have negative Z axis. Also, the natural orientation of a device is not always portrait, as the natural orientation for many tablet devices is landscape. For more information, check the official Android’s Sensor Coordinate System documentation.

Settings

  • Aware_Preferences.STATUS_GYROSCOPE: true or false to activate or deactivate accelerometer sensor.
  • Aware_Preferences.FREQUENCY_GYROSCOPE: non-deterministic frequency in microseconds (dependent of the hardware sensor capabilities and resources). You can also use a SensorManager sensor delay constant.

aware-broadcasts

  • Gyroscope.ACTION_AWARE_GYROSCOPE: new data recorded in provider.
    • Gyroscope.EXTRA_DATA: the recorded data, as ContentValues.
    • Gyroscope.EXTRA_SENSOR: the sensor information.
  • Gyroscope.ACTION_AWARE_GYROSCOPE_LABEL: assign label to the recorded data.
    • Gyroscope.EXTRA_LABEL: the desired label.

aware-providers

Gyroscope Sensor

Contains the hardware sensor capabilities in the mobile device.

Gyroscope_Sensor.CONTENT_URI
content://com.aware.provider.gyroscope/sensor_gyroscope

Table field Field type Description
_id INTEGER primary key, auto incremented
timestamp REAL unixtime milliseconds since 1970
device_id TEXT AWARE device UUID
double_sensor_maximum_range REAL Maximum sensor value possible
double_sensor_minimum_delay REAL Minimum sampling delay in microseconds
sensor_name TEXT Sensor’s name
double_sensor_power_ma REAL Sensor’s power drain in mA
double_sensor_resolution REAL Sensor’s resolution in sensor’s units
sensor_type TEXT Sensor’s type
sensor_vendor TEXT Sensor’s manufacturer
sensor_version TEXT Sensor’s version number

Gyroscope Data

Contains the raw sensor data.

Gyroscope_Data.CONTENT_URI
content://com.aware.provider.gyroscope/gyroscope

Table field Field type Description
_id INTEGER primary key, auto incremented
timestamp REAL unixtime milliseconds since 1970
device_id TEXT AWARE device UUID
double_values_0 REAL value of X axis
double_values_1 REAL value of Y axis
double_values_2 REAL value of Z axis
accuracy INTEGER Sensor’s accuracy level (see SensorManager)
label TEXT Customizable label. Useful for data calibration or traceability

 


icon_ios iOS

A gyroscope measures the rate at which a device rotates around each of the three spatial axes, as shown in Figure.

gyro_rotation_2x

For more detail information, check the official iOS’s Motion Event documentation.

aware-broadcasts

  • Gyroscope.ACTION_AWARE_GYROSCOPE: new data recorded in provider.
    • Gyroscope.EXTRA_DATA: the recorded data, as ContentValues.

aware-providers

Gyroscope Data

Contains the raw sensor data.

Table field Field type Description
_id INTEGER primary key, auto incremented
timestamp REAL unixtime milliseconds since 1970
device_id TEXT AWARE device UUID
double_values_0 REAL value of X axis
double_values_1 REAL value of Y axis
double_values_2 REAL value of Z axis
accuracy INTEGER This column is not supported on iOS
label TEXT Customizable label. Useful for data calibration or traceability
Gyroscope