0
$\begingroup$

I wish to know when should I declare an smart phone static by reading its 3 axis accelerometer reading.

I have notice that modulo of all 3 axes gives 9.8 when ever smart phone is static. What does it say, if the phone is not moving shouldn't it show 0 instead of 9.8.

$$ |a| = \sqrt{x^2+y^2+z^2} $$

My android device Accelerometer with 3 axis never shows 1g when its placed on table ,facing screen upward , Fall value is the magnitude of all three axis value using above formula .

Answered myself :

Since the acceleration measured by the sensor includes the force that gravity is exerting on it—and since we know that the acceleration of gravity (barring any other forces applied to an object) is 9.8m/s/s—this lets the sensor determine which direction its facing. While at rest, the sensor will return no acceleration forces on two of its axes, but one axis should be feeling acceleration of 9.8m/s/s. This is also sometimes referred to as 1 “g” of force.

2022-04-05 09:17:02.581 13223-13223/org.pjsip.pjsua2.app E/x: 0.0503082275390625
2022-04-05 09:17:02.581 13223-13223/org.pjsip.pjsua2.app E/y: -0.03803062438964844
2022-04-05 09:17:02.581 13223-13223/org.pjsip.pjsua2.app E/z: 9.877481460571289
2022-04-05 09:17:02.595 13223-13223/org.pjsip.pjsua2.app E/FALL: 9.9
2022-04-05 09:17:02.595 13223-13223/org.pjsip.pjsua2.app E/x: 0.07606124877929688
2022-04-05 09:17:02.595 13223-13223/org.pjsip.pjsua2.app E/y: -0.060489654541015625
2022-04-05 09:17:02.595 13223-13223/org.pjsip.pjsua2.app E/z: 9.892154693603516
2022-04-05 09:17:02.611 13223-13223/org.pjsip.pjsua2.app E/FALL: 9.9
2022-04-05 09:17:02.611 13223-13223/org.pjsip.pjsua2.app E/x: 0.06258583068847656
2022-04-05 09:17:02.611 13223-13223/org.pjsip.pjsua2.app E/y: -0.08264923095703125
2022-04-05 09:17:02.611 13223-13223/org.pjsip.pjsua2.app E/z: 9.901138305664062
2022-04-05 09:17:02.626 13223-13223/org.pjsip.pjsua2.app E/FALL: 9.9
2022-04-05 09:17:02.627 13223-13223/org.pjsip.pjsua2.app E/x: 0.0886383056640625
2022-04-05 09:17:02.627 13223-13223/org.pjsip.pjsua2.app E/y: -0.07396507263183594
2022-04-05 09:17:02.627 13223-13223/org.pjsip.pjsua2.app E/z: 9.863407135009766
2022-04-05 09:17:02.658 13223-13223/org.pjsip.pjsua2.app E/FALL: 9.9
2022-04-05 09:17:02.658 13223-13223/org.pjsip.pjsua2.app E/x: 0.09223175048828125
2022-04-05 09:17:02.658 13223-13223/org.pjsip.pjsua2.app E/y: -0.03803062438964844
2022-04-05 09:17:02.658 13223-13223/org.pjsip.pjsua2.app E/z: 9.85472297668457
2022-04-05 09:17:02.673 13223-13223/org.pjsip.pjsua2.app E/FALL: 9.9
2022-04-05 09:17:02.673 13223-13223/org.pjsip.pjsua2.app E/x: 0.07336616516113281
2022-04-05 09:17:02.673 13223-13223/org.pjsip.pjsua2.app E/y: -0.04791259765625
2022-04-05 09:17:02.674 13223-13223/org.pjsip.pjsua2.app E/z: 9.853225708007812
2022-04-05 09:17:02.689 13223-13223/org.pjsip.pjsua2.app E/FALL: 9.9
2022-04-05 09:17:02.690 13223-13223/org.pjsip.pjsua2.app E/x: 0.08234977722167969
2022-04-05 09:17:02.690 13223-13223/org.pjsip.pjsua2.app E/y: -0.07516288757324219
2022-04-05 09:17:02.690 13223-13223/org.pjsip.pjsua2.app E/z: 9.873289108276367
2022-04-05 09:17:02.720 13223-13223/org.pjsip.pjsua2.app E/FALL: 9.9
$\endgroup$
7
  • $\begingroup$ So if you are standing still on the ground you are weightless? $\endgroup$
    – Jon Custer
    Commented Apr 4, 2022 at 13:43
  • 1
    $\begingroup$ Please do not post formulae as screenshots, but use MathJax instead. $\endgroup$ Commented Apr 4, 2022 at 13:58
  • 2
    $\begingroup$ An accelerometer measures acceleration, not speed. Presumably you mean static is speed zero. This can't be measured with an accelerometer. $\endgroup$
    – Kurt G.
    Commented Apr 4, 2022 at 14:05
  • $\begingroup$ @JonCuster what does it means by getting 9.8 as acceleration for static object ? I believe acceleration is increase in speed and I cannot correlate why its 9.8 $\endgroup$
    – tomtom
    Commented Apr 4, 2022 at 14:46
  • 1
    $\begingroup$ Does this answer your question? Accelerometer measures 1g along z-axis $\endgroup$ Commented Apr 4, 2022 at 17:27

1 Answer 1

1
$\begingroup$

Your smartphone is measuring the gravitational force. It has microscopic cantilevers which bend due to forces from inertia, which it interprets as an acceleration. Of course, they also bend by just sitting in gravity. You can’t simply subtract this value, unfortunately, because gravity will act differently on your three axes depending on the orientation of your phone.

$\endgroup$
5
  • 1
    $\begingroup$ See the answer linked by John Rennie in his comment above. As far as the accelerometer is able to tell, gravity is not a force. If you toss your phone into the air (John actually did it) the accelerometer reads zero until the phone hits something (his bed). It reads zero in spite of being near the surface of the Earth, very much in Earth's gravitational field during the whole time it is airborne. The force that it measures when your phone is sitting on your desk is the force of the desk, pushing up against the phone, and preventing the phone from falling to the center of the Earth. $\endgroup$ Commented Apr 4, 2022 at 20:48
  • $\begingroup$ @SolomonSlow this is semantics. I (and I’m guessing most others) would say that the reason my backpack feels heavy is because gravity pulls on it, not because the earth pushes on my feet. $\endgroup$
    – Gilbert
    Commented Apr 4, 2022 at 21:39
  • 1
    $\begingroup$ "semantics," as in, "meaning." Agreed. We are talking about what it means when the accelerometer reads zero (e.g., when it is following a ballistic trajectory through the air) vs. what it means when the accelerometer reads 1G of upward acceleration (e.g., when it is sitting motionless on a desk.) $\endgroup$ Commented Apr 4, 2022 at 22:38
  • $\begingroup$ @SolomonSlow can you please have a look at my updated question with Accelerometer reading from my android phone when its placed on table. I am getting every time new reading , but when I calculate the magnitude of all value ,I do get same value through out . But I did notice that z axis value is quite same through out the time . Does that means as long as magnitude of all 3 axis remain same ....phone is in static state ? $\endgroup$
    – tomtom
    Commented Apr 5, 2022 at 7:22
  • $\begingroup$ @tomtom, Still not sure what you mean by "static," but the accelerometer can not tell you for certain whether the phone is moving or stationary. Constant acceleration of 1G could mean that the phone is sitting quietly on a desk, or it could mean that the phone is sitting quietly on the console of a car that is cruising at a constant speed on a smooth highway. Acceleration doesn't directly correlate to motion. Acceleration correlates to changing motion. $\endgroup$ Commented Apr 5, 2022 at 12:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.