Properties of the Acceleration Sensor and Gyroscope Sensor
This section describes the properties of the acceleration sensor and gyroscope sensor.
Configuration Item |
Description |
Type |
Value Range |
Default Value |
Description |
|---|---|---|---|---|---|
persist.sensors.mock.delaytime |
Data collection frequency, in microseconds |
int |
[20000,1000000] |
200000 |
If the value of persist.sensors.mock.delaytime is not within the range of [20000, 1000000], the default value is used. |
persist.sensors.mock.acce.data.x |
|
float |
[-3.402823466e+38,3.402823466e+38] |
Both the default values of the acceleration and gyroscope on the x-axis are 9.833359. You can query the default value using a related application. The default value is not displayed in persist.sensors.mock.acce.data.x or persist.sensors.mock.gyro.data.x. Android 11 quantizes the data collected at the underlying layer together with the resolution value into a new value. The acceleration resolution is 1/4032, and the gyroscope resolution is 1/1000. |
If the value of persist.sensors.mock.acce.data.x or persist.sensors.mock.gyro.data.x contains invalid characters that are neither digits nor decimal points, the setting is invalid and the default value is used. Note that a valid float type parameter value contains 6 or 7 digits. If a value is outside the valid range, use the scientific notation, for example, 3.40282e+38. Otherwise, garbled characters are displayed. Due to the type conversion of floating-point data, some upper-layer applications may encounter precision fluctuations even if the value is within the value range. |
persist.sensors.mock.gyro.data.x |
|||||
persist.sensors.mock.acce.data.y |
|
float |
[-3.402823466e+38,3.402823466e+38] |
Both the default values of the acceleration and gyroscope on the y-axis are 0.184357. You can query the default value using a related application. The default value is not displayed in persist.sensors.mock.acce.data.y or persist.sensors.mock.gyro.data.y. Android 11 quantizes the data collected at the underlying layer together with the resolution value into a new value. The acceleration resolution is 1/4032, and the gyroscope resolution is 1/1000. |
If the value of persist.sensors.mock.acce.data.y or persist.sensors.mock.gyro.data.y contains invalid characters that are neither digits nor decimal points, the setting is invalid and the default value is used. Note that a valid float type parameter value contains 6 or 7 digits. If a value is outside the valid range, use the scientific notation, for example, 3.40282e+38. Otherwise, garbled characters are displayed. Due to the type conversion of floating-point data, some upper-layer applications may encounter precision fluctuations even if the value is within the value range. |
persist.sensors.mock.gyro.data.y |
|||||
persist.sensors.mock.acce.data.z |
|
float |
[-3.402823466e+38,3.402823466e+38] |
Both the default values of the acceleration and gyroscope on the z-axis are 0.101028. You can query the default value using a related application. The default value is not displayed in persist.sensors.mock.acce.data.z or persist.sensors.mock.gyro.data.z. Android 11 quantizes the data collected at the underlying layer together with the resolution value into a new value. The acceleration resolution is 1/4032, and the gyroscope resolution is 1/1000. |
If the value of persist.sensors.mock.acce.data.z or persist.sensors.mock.gyro.data.z contains invalid characters that are neither digits nor decimal points, the setting is invalid and the default value is used. Note that a valid float type parameter value contains 6 or 7 digits. If a value is outside the valid range, use the scientific notation, for example, 3.40282e+38. Otherwise, garbled characters are displayed. Due to the type conversion of floating-point data, some upper-layer applications may encounter precision fluctuations even if the value is within the value range. |
persist.sensors.mock.gyro.data.z |
Value conversion formula for Android 15: The input value is of the float type and the resolution is of the double type. Double incRes = 0.125 x Resolution. Value = round(static_cast<double>(value)/incRes) x incRes. The round function is used to round a value of the double type.