从延迟的GPhone获得传感器数据是什么时候? [英] Latency when getting sensor data from gPhone?

查看:70
本文介绍了从延迟的GPhone获得传感器数据是什么时候?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,伙计们!
我使用的HTC Magic,需要从电子罗盘的数据,包括加速计和磁传感器都工作的一个项目。但我发现,有手机的移动和sensorChanged事件触发之间的显著延迟。换言之,从传感器获得的加速度和磁数据被我的运动后大约一秒钟的半更新。而我对这个问题如下几个问题。

Hey, guys! I am working on a project using HTC magic which requires the data from the electronic compass, including both the accelerometer and magnetic sensor. But I find that there is a significant latency between the move of the phone and the trigger of the sensorChanged event. In other word, the acceleration and magnetic data obtained from sensor are updated about half of a second after my motion. And I have several questions about the problem as follow.


  1. 是由加速度和磁数据计算方位数据?还是有定向一个物理传感器?

  1. Are the orientation data computed by the acceleration and magnetic data? Or are there a physical sensor for orientation?

请问从Android API延迟结果(使用时)或电子罗盘的物理限制?

Does the latency result from the android API (using the event) or the physical limitation of the electronic compass?

据悉,电子罗盘的型号是旭化成AK8976A。是否有人有数据表或知道取样的频率?

It is said that the model of the electronic compass is AK8976A from Asahi Kasei. Does anybody have the datasheet or know the frequency of the sampling?

任何想法,以提高实时体验?

Any idea to improve the real-time experience?

感谢你在前进!

推荐答案

我也摸不着头脑。原来,在2.2你不能使用比标准SENSOR_DELAY_UI,SENSOR_DELAY_NORMAL等文档声称,你也可以指定通知之间的微秒数其他传感器的价格,但他们在撒谎。

I did figure this out. Turns out that in 2.2 you can't use sensor rates other than the standard SENSOR_DELAY_UI, SENSOR_DELAY_NORMAL, etc. The documentation claims you can also specify the number of microseconds between notifications, but they are lying.

在我使用的标准常量就开始工作2.2

Once I used the standard constants it started working on 2.2

这篇关于从延迟的GPhone获得传感器数据是什么时候?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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