SensorAdditionalInfo
open class SensorAdditionalInfo
kotlin.Any | |
↳ | android.hardware.SensorAdditionalInfo |
This class represents a Sensor
additional information frame, which is reported through listener callback onSensorAdditionalInfo
.
Summary
Constants | |
---|---|
static Int |
Mark the beginning of a set of additional info frames. |
static Int |
Mark the end of a set of additional info frames. |
static Int |
Internal temperature. |
static Int |
Sampling parameter. |
static Int |
Sensor placement. |
static Int |
Untracked delay. |
static Int |
Vector calibration parameter. |
Properties | |
---|---|
FloatArray! |
Additional info payload data represented in float values. |
IntArray! |
Additional info payload data represented in int values. |
Sensor! |
The sensor that generated this event. |
Int |
Sequence number of frame for a certain type. |
Int |
Type of this additional info frame. |
Constants
TYPE_FRAME_BEGIN
static val TYPE_FRAME_BEGIN: Int
Mark the beginning of a set of additional info frames.
Value: 0
TYPE_FRAME_END
static val TYPE_FRAME_END: Int
Mark the end of a set of additional info frames.
Value: 1
TYPE_INTERNAL_TEMPERATURE
static val TYPE_INTERNAL_TEMPERATURE: Int
Internal temperature. Sensor hardware device internal temperature. Payload: floatValues[0]: internal temperature in Celsius.
Value: 65537
TYPE_SAMPLING
static val TYPE_SAMPLING: Int
Sampling parameter. Describes the raw sample period and estimated jitter of sample time in terms of standard deviation. Payload: floatValues[0]: raw sample period in seconds. floatValues[1]: standard deviation of sampling period.
Value: 65540
TYPE_SENSOR_PLACEMENT
static val TYPE_SENSOR_PLACEMENT: Int
Sensor placement. Provides the orientation and location of the sensor element in terms of the Android coordinate system. This data is given as a 3x4 matrix consisting of a 3x3 rotation matrix (R) concatenated with a 3x1 location vector (t). The rotation matrix provides the orientation of the Android device coordinate frame relative to the local coordinate frame of the sensor. Note that assuming the axes conventions of the sensor are the same as Android, this is the inverse of the matrix applied to raw samples read from the sensor to convert them into the Android representation. The location vector represents the translation from the origin of the Android sensor coordinate system to the geometric center of the sensor, specified in millimeters (mm).
Payload: floatValues[0..11]
: 3x4 matrix in row major order [R; t]
Example: This raw buffer: {0, 1, 0, 0, -1, 0, 0, 10, 0, 0, 1, -2.5}
Corresponds to this 3x4 matrix:
Orientation | Location | ||
0 | 1 | 0 | 0 |
-1 | 0 | 0 | 10 |
0 | 0 | 1 | -2.5 |
- The device X axis corresponds to the sensor's local -Y axis
- The device Y axis corresponds to the sensor's local X axis
- The device Z axis and sensor's local Z axis are equivalent
Value: 65539
TYPE_UNTRACKED_DELAY
static val TYPE_UNTRACKED_DELAY: Int
Untracked delay. Delays that are introduced by data processing, such as filtering, which is not taken into account by sensor timestamps. Payload: floatValues[0]: delay estimation in seconds floatValues[1]: delay estimation standard deviation
Value: 65536
TYPE_VEC3_CALIBRATION
static val TYPE_VEC3_CALIBRATION: Int
Vector calibration parameter. Calibration applied to a sensor with 3 elements vector output, such as accelerometer, gyro, etc. Payload: floatValues[0..11]: First 3 rows of a homogeneous matrix in row major order that captures any linear transformation, including rotation, scaling, shear, shift.
Value: 65538
Properties
floatValues
val floatValues: FloatArray!
Additional info payload data represented in float values. Depending on the type of information, this may be null.
intValues
val intValues: IntArray!
Additional info payload data represented in int values. Depending on the type of information, this may be null.
sensor
val sensor: Sensor!
The sensor that generated this event. See SensorManager
for details.