[英]Android accelerometer sensor values
I'm playing with accelerometer sensor on Android Wear. 我正在使用Android Wear上的加速度传感器。 When I'm reading the values in listener it gives me an array of for example [-19,594337 -19,594337 19,594337].
当我在侦听器中读取值时,它提供了一个数组,例如[-19,594337 -19,594337 19,594337]。 I mean, really?
我的意思是真的吗? 19 m/s^2 in all dimensions?
所有尺寸均为19 m / s ^ 2? Bet Mike Tyson can't do better.
赌迈克·泰森(Mike Tyson)做得更好。 Can anybody explain me, if I'm doing something wrong?
如果我做错了什么,有人可以向我解释吗?
The code is just 代码只是
public void onSensorChanged(SensorEvent event){ ... event.values ...}
for TYPE_LINEAR_ACCELERATION listener. 适用于TYPE_LINEAR_ACCELERATION侦听器。
There's nothing wrong with outout. outout没有错。 The output you got is called
raw output
of sensors. 您获得的输出称为传感器的
raw output
。 That means gravitational force is not excluded from the output of TYPE_LINEAR_ACCELERATION
. 这意味着重力不会从
TYPE_LINEAR_ACCELERATION
的输出中排除 。 You need to exclude it yourself. 您需要自己排除它。
TYPE_LINEAR_ACCELERATION : Measures the acceleration force in m/s2 that is applied to a device on all three physical axes (x, y, and z), excluding the force of gravity. TYPE_LINEAR_ACCELERATION :测量在所有三个物理轴(x,y和z)上施加到设备的加速度,以m / s2为单位,不包括重力。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.