L
Lawrence D'Oliveiro
The diagram of the linear sensor coordinate system here
<http://developer.android.com/reference/android/hardware/SensorEvent.html>
seems to be wrong.
I have a test program running on my HTC Desire (Android 2.2), showing me
values from the accelerometer. As it lies horizontally, face-up on my desk,
the Z value is positive (around 9.8, as you would expect). But that diagram
says that positive Z is up, not down.
I tilt the phone to the left, and the X value increases. Tilt to the right,
it decreases. But the diagram says positive X is to the right, not the left.
Tilt it up, the Y value increases. Hold it vertical, with the display upside
down, and the Y value shows negative. Again, completely the opposite to the
diagram.
<http://developer.android.com/reference/android/hardware/SensorEvent.html>
seems to be wrong.
I have a test program running on my HTC Desire (Android 2.2), showing me
values from the accelerometer. As it lies horizontally, face-up on my desk,
the Z value is positive (around 9.8, as you would expect). But that diagram
says that positive Z is up, not down.
I tilt the phone to the left, and the X value increases. Tilt to the right,
it decreases. But the diagram says positive X is to the right, not the left.
Tilt it up, the Y value increases. Hold it vertical, with the display upside
down, and the Y value shows negative. Again, completely the opposite to the
diagram.