开发者

Sample rate of magnetometer (compass)

I was experimenting with the magnetometer (iPhone 3GS) and the Teslameter sample program. One question pops up, and that is if it is possible through some API to query the values of the magnetometer 开发者_如何学编程without going through the event-driven API.

More specifically, the sample rate from the magnetometer seems to be limited to ~20-30 samples/second. Would it be possible to increase that to, say 120 samples per second (oh yes, the nyquist theorem...)? I guess this boils down to:

  • Does the hardware support it, and
  • Is it allowed? (i.e. does it require undocumented APIs)


You can read direction values from hardware as fast as you want, but they won't be accurate. Thus apple decided to limit the sample rate to something what seems reasonable. So:

1) Yes, but results won't be accurate. 2) No.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜