summaryrefslogtreecommitdiffstats
path: root/include/hardware/sensors.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-02-26 13:15:18 -0800
committerMathias Agopian <mathias@google.com>2010-02-26 13:30:21 -0800
commit19ea59f86521c1b3ef72999e3cccc47b48c445ad (patch)
tree0479d019e9a7912c33ac3a54ca7eaed6d3a06c76 /include/hardware/sensors.h
parent9e149fc6e112fe23e408ca972a948a1d9aadc9a8 (diff)
downloadhardware_libhardware-19ea59f86521c1b3ef72999e3cccc47b48c445ad.zip
hardware_libhardware-19ea59f86521c1b3ef72999e3cccc47b48c445ad.tar.gz
hardware_libhardware-19ea59f86521c1b3ef72999e3cccc47b48c445ad.tar.bz2
[2472946] Sensor.TYPE_ORIENTATION returns inverted roll values
update the documentation is sensors.h to reflect reality.
Diffstat (limited to 'include/hardware/sensors.h')
-rw-r--r--include/hardware/sensors.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index 74d50dd..610651f 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -138,8 +138,23 @@ __BEGIN_DECLS
* the z-axis moves toward the y-axis.
*
* roll: Rotation around Y axis (-90<=roll<=90), with positive values when
- * the x-axis moves AWAY from the z-axis.
- *
+ * the x-axis moves towards the z-axis.
+ *
+ * Note: For historical reasons the roll angle is positive in the clockwise
+ * direction (mathematically speaking, it should be positive in the
+ * counter-clockwise direction):
+ *
+ * Z
+ * ^
+ * (+roll) .--> |
+ * / |
+ * | | roll: rotation around Y axis
+ * X <-------(.)
+ * Y
+ * note that +Y == -roll
+ *
+ *
+ *
* Note: This definition is different from yaw, pitch and roll used in aviation
* where the X axis is along the long side of the plane (tail to nose).
*