Is it possible to calculate velocity by integrating accelerometer data over time?

前端 未结 3 1289
逝去的感伤
逝去的感伤 2021-01-05 22:03

I\'m wondering if I can use (linear) accelerometer and compass to calculate velocity without using location services. I want to do that by calculating acceleration component

3条回答
  •  孤街浪徒
    2021-01-05 22:51

    In general, the accelerometer found on android devices is far too noisy to be able to integrate the signal and get the velocity. Further, you also need an almost perfect estimate of the device orientation and even using a gyroscope (which few devices have) is usually too noisy.

    The main problem is subtracting the gravity from the accelerometer signal, since the force of gravity is usually a very large component of the signal. With a phone orientation estimate that is slightly off, the gravity is subtracted in the wrong direction. This leaves components of acceleration in the wrong direction, and your velocity estimate quickly becomes useless.

    What's needed is basically a way to reset the velocity estimate regularly (once per second or so) when you know the device is not moving. One way to do this, provided the user of the device is walking, is to mount the device on a foot and try to detect when the foot is on the ground (velocity is zero in all directions). However, mounting the device on the foot of the user is usually a constraint too severe for practical use.

    There are other approaches one can take to track movement. For example, using step detection and a gyroscope I've been able to track a walking person for a minute or two, with an accuracy of a few meters.

提交回复
热议问题