iPhone 中加速度计的最大采样率
有谁知道iphone加速度计的最大采样率是多少? 我想要有高更新率。我将其 updateInterval 设置为 1.0/ 300.0 但似乎我没有得到那么多的更新率。
那么任何人都可以告诉我我们可以获得的最大更新率是多少或者我如何获得高更新率。
Does anybody know that what is the maximum sampling rate of the iphone accelerometer.
I want to have have high update rate. i set it to updateInterval to 1.0/ 300.0
But it seems that i am not getting that much update rate.
So can any body tell me that what is the maximum update rate that we can get or how i can get the high update rate.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
iPhone 6 上的最大加速度计和陀螺仪采样率为100Hz。您可以自己凭经验进行测试。这是代码。
The max accelerometer and gyroscope sampling rate on the iPhone 6 is 100Hz. You can empirically test this yourself. Here is the code.
尽管文档说
您可以请求更新的最大频率取决于硬件,但通常至少为 100 Hz。
在我看来,最大采样率仍然是 100Hz。我的解决方法是采用名为 MotionGraphs 的 CoreMotion 现有示例代码,并将
startUpdates
函数调整为如下所示:我还设置了
motionManager.deviceMotionUpdateInterval = TimeInterval(1.0/100000.0)
code> 为良好措施(如果它是全球汇率)。有了加速计和陀螺仪的代码,我确认运行 iOS 11.4 的 iPhone 8 的最高频率仍然在 100Hz 左右。
Despite the documentation saying
The maximum frequency at which you can request updates is hardware-dependent but is usually at least 100 Hz.
it looks to me like the maximum sample rate is still 100Hz.My approach to figure out was taking the existing sample code for CoreMotion called MotionGraphs and adapting the
startUpdates
function to look like this:I also set
motionManager.deviceMotionUpdateInterval = TimeInterval(1.0/100000.0)
for good measure (in case it is a global rate).With that code in place for both Accelerometer and Gyroscope I confirm that an iPhone 8 on iOS 11.4 still maxes out right around 100Hz for both.
也许重复。查看
为 deviceMotionUpdateInterval 设置的更新频率,它是实际频率吗?
<一个href="https://stackoverflow.com/questions/5034411/actual-Frequency-of-device-motion-updates-lower-than-expected-but-scales-up-with">设备运动更新的实际频率低于预期的,但会随着设置而扩大
如果使用旧的 UIAccerometerDelegate 接口,同样应该有效。
Maybe duplicate. Look at
update frequency set for deviceMotionUpdateInterval it's the actual frequency?
Actual frequency of device motion updates lower than expected, but scales up with setting
The same should be valid if using old UIAccerometerDelegate interface.