开发者

update frequency set for deviceMotionUpdateInterval it's the actual frequency?

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.开发者_如何学Go000000          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.

  • 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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜