How can I find the velocity using accelerometers only?

前端 未结 8 1260
情书的邮戳
情书的邮戳 2020-12-08 12:01

Using only the phone\'s (Android) built in accelerometer, how would I go about finding its velocity?

I have been tinkering with the maths of this but whatever funct

8条回答
  •  暖寄归人
    2020-12-08 12:26

    Gravity is going to destroy all of your measurements. The phone, at standstill, is experiencing a high constant upward (yes, UP) acceleration. An accelerometer can't distinguish between acceleration and gravity (technically, they are the same), so it would get to extremely high velocities after a few seconds. If you never tilt your accelerometer even slightly, then you can simply subtract the constant gravitional pull from the z-axis (or whichever axis is pointing up/down), but thats quite unlikely.

    Basically, you have to use a complicated system of a gyroscope/magnetometor and an accelerometer to calculate the exact direction of gravity and then subtract the acceleration.

提交回复
热议问题