What exactly does the iPhone accelerometer measure?

混江龙づ霸主 提交于 2019-12-04 17:48:23

问题


The apple documentation for UIAcceleration class says,

"When a device is laying still with its back on a horizontal surface, each acceleration event has approximately the following values:
x: 0
y: 0
z: -1
"

Now, I am confused! How can the acceleration be non-zero, when you clearly say the "device is laying still"?

UPDATE

Judging by the responses, I think this should be called something like 'forceometer' or 'gravitometer' and not accelerometer!


回答1:


You get a -1 on the Z axis because gravity is acting on the device, applying a constant acceleration of 1G. I assume you want user acceleration, which you can get from the DeviceMotion object using a device motion handler as opposed to an acceleration handler. The userAcceleration property filters out the effects of gravity on the device and only gives you how much the user is accelerating it.




回答2:


I found the answer [in the CoreMotion Reference guide, thanks to bensnider:

The accelerometer measures the sum of two acceleration vectors: gravity and user acceleration. User acceleration is the acceleration that the user imparts to the device.




回答3:


You'll find the best answers in datasheet of the accelerometer used (LIS302DL).




回答4:


It measures the gravity. The unit is chosen so that the gravity, 9.81 m/s^2, equals 1 unit. The sign tells how the phone axis is directed. In other words, what the phone considers downwards.

The phone measures 0 as acceleration in free fall. I don't know how much you want to throw your phone up and down to test it :)




回答5:


When you're sitting, gravity is pulling you down to your chair. If it weren't for the chair or ground for that matter, you'd be falling down with acceleration of about 9.8m/s^2. In order for the chair to prevent you from falling down, it has to act with a force in the opposite direction with at least the same value.

The accelometer shows the value of the pulling force and it's a three-dimensional vector. In this case it's directed straight down. And the value given is expressed in G, units of gravity acceleration multiplied by that value.




回答6:


Answerers keep missing the right wording that should set it straight for you... The device is "laying still" only relatively to you. It is actually not laying still at all. The http://en.wikipedia.org/wiki/Centripetal_force of gravity gives it (and you) centripetal acceleration. It is real, it is what keeps you from flying off Earth on a tangent, and it is what the accelerometer dutifully shows. (Earth is nothing special - we rotate about the Sun also etc etc, whose centripetal accelerations are way smaller, but they would be all shown by an accelerometer sensitive enough.)



来源:https://stackoverflow.com/questions/9293850/what-exactly-does-the-iphone-accelerometer-measure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!