gpt4 book ai didi

ios - 如何在 CoreMotion 框架中找到最小和最大频率间隔

转载 作者:行者123 更新时间:2023-12-01 16:09:20 32 4
gpt4 key购买 nike

在 iOS CoreMotion Framework 中,我可以设置加速度计、磁力计等的频率间隔,并以指定的间隔捕获数据。但文档中提到,最小和最大频率取决于设备的硬件。我怎么知道我可以提供的最小和最大间隔?如果我提供硬件的间隔值 less 和最小间隔会怎样?

同样,我如何找到 CoreMotion 框架提供的传感器信息的最小值和最大值(满量程范围)?

最佳答案

苹果文档:

Choosing a Motion Event Update Interval

When you request motion data with Core Motion, you specify an update interval. You should choose the largest interval that meets your app’s needs. The larger the interval, the fewer events are delivered to your app, which improves battery life.

Table 4-1 lists some common update frequencies and explains what you can do with data generated at that frequency. Few apps need acceleration events delivered 100 times a second.

Event frequency (Hz) Usage

10–20 Suitable for determining a device’s current orientation vector.

30–60 Suitable for games and other apps that use the accelerometer for real-time user input.

70–100 Suitable for apps that need to detect high-frequency motion. For example, you might use this interval to detect the user hitting the device or shaking it very quickly.

You can set the reporting interval to be as small as 10 milliseconds (ms), which corresponds to a 100 Hz update rate, but most app operate sufficiently with a larger interval.

简而言之:10Hz-100Hz

来源:Choosing a Motion Event Update Interval

关于ios - 如何在 CoreMotion 框架中找到最小和最大频率间隔,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32844002/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com