需要阅读的Andr​​oid传感器的真快 [英] Need to read android sensors really fast

查看:114
本文介绍了需要阅读的Andr​​oid传感器的真快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题: -

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

我的方法: -

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

问题: -

  1. 如果我把一个日志里面 onSensorChange()事件中,我收到一条 新的传感器的数据每20毫秒的时间。但我需要的数据每5毫秒。
  1. 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.

问题?

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

  1. 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.

这篇关于需要阅读的Andr​​oid传感器的真快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆