校准加速度计?

发布于 2024-11-28 10:23:13 字数 195 浏览 5 评论 0原文

我在应用程序商店中看到许多应用程序都有一个类似校准加速度计的按钮(例如:Doodle Jump),

我希望在我的应用程序中实现类似的方法来校准加速度计。

我正在使用默认的 UIAccelerometer API 和类似的东西,但我只想说明用户是否在他们这边玩等等......

我将如何继续这样做?

谢谢, 布拉德

I see many apps on the app store that have a button like calibrate accelerometer (for example: Doodle Jump)

I am looking to implement a similar way to calibrate the accelerometer in my app.

I am using the default UIAccelerometer API's and stuff like that but I just want to account say if the user is playing on their side etc...

How would I go upon doing this?

Thanks,
Brad

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

听闻余生 2024-12-05 10:23:13

“校准”加速度计的应用程序并没有真正改变加速度计返回的值,它们只是在已知状态下使用设备读取读数,然后可以使用这些读数来调整将来读取的数据。例如,如果您将设备放在桌子上并读取读数,然后将设备旋转 180° 并读取另一个读数,您就知道设备的误差一定是这两个读数之间差异的一半。然后,您可以根据该错误调整任何未来的读数,以获得更准确的结果。

Apps that "calibrate" the accelerometer aren't really changing the values that the accelerometer returns, they're just taking readings with the device in a known state that they can then use to adjust data that they read in the future. If you place the device on a table, for example, and take a reading, and then you turn the device 180° and take another reading, you know that the device's error must be half the difference between those two readings. You can then adjust any future readings by that error to get more accurate results.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文