需要阅读的Andr​​oid传感器的真快真快、传感器、Andr、oid

由网友(蛊·惑)分享简介:问题: - 在我开发一个应用程序,需要一个新的加速度数据每隔5毫秒。I am developing a application whichneeds a new acceleration datum every 5millisecond.我的方法: - 在我创建了一个远程服务其中仅读取加速从数据的...

问题: -

在我开发一个应用程序, 需要一个新的加速度数据每隔5 毫秒。 I am developing a application which needs a new acceleration datum every 5 millisecond.

我的方法: -

在我创建了一个远程服务 其中仅读取加速 从数据的SensorManager 在我还设置读取速度 延迟最快的同时初始化 的SensorManager。 然后使用IPC来过沟通我 主要应用得到这些 阅读。 I have created a remote service which only reads the acceleration data from SensorManager. I had also set the read rate to "DELAY FASTEST" while initialize the SensorManager. Then i use IPC to communicate too my main application to get these reading.

问题: -

如果我把一个日志里面 onSensorChange()事件中,我收到一条 新的传感器的数据每20毫秒的时间。但我需要的数据每5毫秒。 If i put a log inside onSensorChange() event i receive a new sensor data every 20 ms time. But i need data every 5 ms.

问题?

有没有更好的方法来读取 在感光芯片数据的速度。

Is there any better method to read the senor data faster.

有没有什么办法可以查询 感光芯片宁可等待数据 事件处理程序以触发 事件?

Is there any way i can poll the senor data rather that waiting for the event handler to trigger the event?

请帮我找到一个更好的解决方案,以阅读5毫秒时间的数据或查询加速度数据。

Please help me to find a better solution to read the data in 5 ms time or poll the acceleration data.

推荐答案

据我了解,加速度计是非常嘈杂,不适合快速操作。见GoogleTech谈传感器融合在 http://www.youtube.com/watch?v=C7JQ7Rpwn2k 了解你可以做一个更权威的解释和内容。简短的说明:使用陀螺高速事件和acceleromenter纠正漂移

As I understand it, the accelerometer is very noisy and not suitable for fast operations. See the GoogleTech talk on sensor fusion at http://www.youtube.com/watch?v=C7JQ7Rpwn2k for a more authorative explanation and what you can do about it. Short explanation: Use the gyro for high speed events and the acceleromenter to correct the drift.

阅读全文

相关推荐

最新文章