更新为deviceMotionUpdateInterval设置的频率是实际频率吗? [英] update frequency set for deviceMotionUpdateInterval it's the actual frequency?

查看:338
本文介绍了更新为deviceMotionUpdateInterval设置的频率是实际频率吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

分析deviceMotion.timestamp我发现DeviceMotion中设置的更新频率不是实际的更新频率。

analyzing the deviceMotion.timestamp i saw that the the update frequency set in DeviceMotion is not the actual frequency of update.

我实现了一个应用程序以便测试,低于我所看到的!

I implemented an app in order to test, below what I saw!

    update frequency     actual frequency       average time between two calls
       1/10.000000          10.232265              0.097730
       1/20.000000          19.533729              0.051194
       1/30.000000          30.696613              0.032577
       1/40.000000          42.975122              0.023269
       1/50.000000          53.711000              0.018618
       1/60.000000          53.719106              0.018615
       1/70.000000          71.627016              0.013961
       1/80.000000          71.627263              0.013961
       1/90.000000          53.719365              0.018615
       1/100.000000        107.442667              0.009307
       1/110.000000        107.437022              0.009308

有人注意到了同样的事情吗?
这是一个错误?

someone has noticed the same thing? it's a bug?

推荐答案

有些人报告了同样的现象,例如设备运动更新的实际频率低于预期,但放大设置但仍然没有答案。令人惊讶的是,您是第一个报告更高实际频率的人。我对此做了几次测试,但是你走哪条路并没有什么不同。

Some people are reporting the same phenomenon, for example Actual frequency of device motion updates lower than expected, but scales up with setting but there is still no answer. Surprisingly you are the first on to report higher actual frequencies. I did several tests on this and it makes no real difference which way you go.


  • 推或拉即处理程序回调或自己的计时器循环

  • iOS 4.2x,iOS 4.3x (仅限拉动测试[更新:])

  • 原始传感器数据或设备动作

  • 陀螺仪或加速度计

  • 在一个单独的线程中运行它

  • Push or pull i.e. handler callback or own timer loop
  • iOS 4.2x, iOS 4.3x ([Update:]tested with pull only)
  • Raw sensor data or Device Motion
  • Gyroscope or accelerometer
  • Running it in a separate thread

我认为它是Core Motion框架中的一个小错误。

I assume it is a little bug in the Core Motion framework.

这篇关于更新为deviceMotionUpdateInterval设置的频率是实际频率吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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