androidalgorithmsensorsaccelerometergyroscope

Determining movement based on accelerometer and other sensors


I am making a application that detects orientation and movement of the android device, and send them to desktop for further usage. I could successfully get the orientation using TYPE_ROTATION_VECTOR and this had enough accuracy.

But the problem occurred when I got acceleration using TYPE_LINEAR_ACCELERATION. Accuracy was poor and became even more extreme when integrating it to obtain velocity or position.

After googling for a few hours, I got to know that there is techniques like Kalman Filter and Sensor Fusion to reduce noise. With them, Is there any way to get device's movement on time?

Also, I am curious about how the products like Nintendo Wii and Oculus Quest detect the controller correctly. Will it applicable to my application?


Solution

  • Because those sensors aren't good at determining velocity or position. If you want either of those, you use either network location or GPS. Accelerometers are EXTREMELY noisy. They also have a cap- an accelerometer may be able to detect an acceleration of say 1-5 m/s, but if the device moves faster than that it maxes out. They also only determine acceleration, not velocity. So if you're in a car moving 10m/s when you start your measurements, you would detect no movement, because there's no acceleration, only constant velocity.

    Use the correct sensor types for your mesasurement- accelerometers should only be used to detect sudden sharp changes in speed, and they're inappropriate for detecting position or velocity. They're also not incredibly accurate in consumer devices.

    As for the wii- it doesn't use accelerometers to determine position. It uses an LED light. That's what the sensor bar is for. The accelerometer is for detecting sudden movement. It's also why moving it to fast will result in inaccuracies (the accelerometer maxes out) and doesn't detect additional change.