Question

Please excuse me in advance if I should be asking this in a Physics forum, but given that I'm talking about the iPhone's acceleration, coming from the accelerometer, I decided to post it here.

Whenever I push the iPhone (device lying on the table - screen facing upwards) forward (towards the top of the device), the accelerometer seems to be recording negative acceleration for the most part, with a few positive acceleration values, on that same Y-axis, appearing here and there from time to time.

This is a sample of the acceleration values on the Y-axis, during such a forward movement across the Y-axis :

-0.02
-0.03
-0.04
-0.03
-0.04
-0.04
-0.07
-0.02
-0.02
-0.02
-0.02
 0.00 // what's happening here ?
 0.02 // what's happening here ?
 0.02 // what's happening here ?
-0.00
-0.02
-0.03
-0.03
 0.02 // what's happening here ?
 0.04 // what's happening here ?
 0.01 // what's happening here ?
-0.00
-0.04
-0.03
-0.02
-0.03
-0.05

What do the negative acceleration values stand for and what do the positive ones stand for in the above example ?

If I understand correctly, negative acceleration values mean the device is accelerating forward at that point.

Now, positive acceleration values would mean the device is moving backwards, while 0.00 acceleration would mean the device is either standing still* or moving at a constant speed.

So why do I get those positive acceleration values during that forward movement of the device?

Am I missing something ?

The only reason I'm asking, obviously, is because I want to create a method in order to know whether the device is moving forward or backwards on the Y-axis.

*I also noticed a 0.01 value comes and goes even when the device is completely immobile, but I'm guessing this is just "noise" right?

Was it helpful?

Solution

So why do I get those positive acceleration values during that forward movement of the device?

Ehm, you seem to be understanding that an acceleration of 0 means no acceleration, i. e. being still or moving at a constant speed. Now if you move the phone at a seemingly constant speed in one direction, it might not be perfectly constant - both small positive and negative accelerations may occur.

*I also noticed a 0.01 value comes and goes even when the device is completely immobile, but I'm guessing this is just "noise" right?

Right. The accelerometer sensor is not perfect. It reacts to many other factors than just pure acceleration. I'm not aware of the exact internals of how the iPhone's accelerometer works, but if I guess right, it's a piezoelectric one, so it can be sensitive to other kind of physical (mechanical and electromagnetic) effects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top