我想在设备中使用一些传感器,从逻辑上我假设从SensorListener event.values返回的值返回如下:
float[] xyz = event.values
但我见过很多地方,人们说他们返回的是:
float[] zxy = event.values
那么,当我得到的值是X轴还是Z轴?文档并没有特别指定:
Measures degrees of rotation that a device makes around all three physical axes (x, y, z).
// Many sensors return 3 values, one for each axis.
那么它们是如何返回的呢?XYZ、ZXY还是其他什么?
发布于 2014-08-15 21:39:46
从文档中:
All values are in SI units (m/s^2)
values[0]: Acceleration minus Gx on the x-axis
values[1]: Acceleration minus Gy on the y-axis
values[2]: Acceleration minus Gz on the z-axis这里:http://developer.android.com/reference/android/hardware/SensorEvent.html
https://stackoverflow.com/questions/25327361
复制相似问题