iPhone 上的加速器范围是多少?
我似乎无法在网上找到任何关于此的文档,而且我正在谷歌搜索的内容给了我很多相互矛盾的信息......
I can't seem to find any documentation online about this, and what I am googling is giving me a lot of conflicting information...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
来自 iphonedevsdk.com:
From iphonedevsdk.com:
当您移动设备时,aGauge 应用程序会显示来自加速度计的原始数据。 它还可以帮助您找到设备的“翻转”阈值。
The aGauge app displays this raw data coming from the accelerometer as you move the device. It can also help you find the "flip" threshold for your device.
我创建了以下应用程序来尝试测试范围...
问题是,当我沿水平/垂直轴旋转 iPod 然后将其翻转时,我得到如下值:
xmin -1.271802
xmax 1.180959
ymin -1.344477
ymax 1.108285
zmin -2.30713
zmax 2.325581
如果我拿起 iPod 并摇晃它,我会得到...
x -2.325581 到 2.307413
y -2.325581 到 2.307413
z -2.307413 到 2.325581
你知道它在测量什么吗?
我想出的最好的办法是:
垂直轴
x = -1 如果向左倾斜 ( <| )
x = +1 如果一直向右倾斜 ( |> )
y ~ -1 如果屏幕面向您,垂直于地板(“站立”)
y ~ 1 如果背向您(并且上下颠倒)
I created the following application to try to test out the ranges...
The problem is, when I rotate my iPod along the horizontal/vertical axes and then flip it over, I get values like:
xmin -1.271802
xmax 1.180959
ymin -1.344477
ymax 1.108285
zmin -2.30713
zmax 2.325581
If I take the iPod and shake the heck out of it, I get...
x -2.325581 to 2.307413
y -2.325581 to 2.307413
z -2.307413 to 2.325581
Any ideas what it's measuring?
The best I've come up with is:
vertical axis
x = -1 if tilted to the left ( <| )
x = +1 if tilted all the way to the right ( |> )
y ~ -1 if screen is facing you, perpendicular to floor ("standing up")
y ~ 1 if facing away from you (and upside down)