diff --git a/core/java/android/hardware/SensorAdditionalInfo.java b/core/java/android/hardware/SensorAdditionalInfo.java index 5ff627f48017c..12edc5eb7e33f 100644 --- a/core/java/android/hardware/SensorAdditionalInfo.java +++ b/core/java/android/hardware/SensorAdditionalInfo.java @@ -119,12 +119,50 @@ public class SensorAdditionalInfo { public static final int TYPE_VEC3_CALIBRATION = 0x10002; /** - * Sensor placement. Describes location and installation angle of the sensor device. + * Sensor placement. * - * Payload: - * floatValues[0..11]: First 3 rows of homogeneous matrix in row major order that describes - * the location and orientation of the sensor. Origin of reference will be the mobile device - * geometric sensor. Reference frame is defined as the same as Android sensor frame. + * 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 |