问题描述
可以从加速度计读数取出g因子的人有所帮助。我使用SensorEventListener与onSensorChanged()方法用于获取Sensor.TYPE_ACCELEROMETER数据。我需要在各个方向上唯一的纯加速度值。因此,在任何状态下,如果该设备是稳定的(或定速),它应该给(0.0,0.0,0.0)约。目前,取决于它的倾斜和滚动,它给我可变输出根据作用在各轴克的力。
Can anyone help on removing the g factor from accelerometer readings. I am using SensorEventListener with onSensorChanged() method for getting Sensor.TYPE_ACCELEROMETER data. I need only pure acceleration values in all directions. So at any state if the device is stable (or in constant speed), it should give (0.0,0.0,0.0) roughly.Currently, depending on its pitch and roll, it gives me variable output depending on the g forces acting on each axis.
我希望有一些公式来消除这一点,因为我也得到Sensor.TYPE_ORIENTATION监听定位值(俯仰和滚转)。我用了一些,但没有奏效。
I hope there is some formula to remove this, as I also get orientation values (pitch and roll) from Sensor.TYPE_ORIENTATION listener. I had used some but didn't work.
任何帮助吗?
推荐答案
看看下面的链接看看。
http://developer.android.com/reference/android/hardware/SensorEvent.html
这篇关于如何从加速度计读数删除重力因素,Android的3轴加速度计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!