3
I’m developing an app in which the user needs to shake their phone to all directions and the smartphone needs to maintain stable guidance in the meantime. The problem is that all ways to achieve spatial orientation like TYPE_ROTATION_VECTOR
, TYPE_GEOMAGNETIC_ROTATION_VECTOR
, and even the getRotationMatrix()
use the accelerometer together, and the moment the user moves the cell the direction of gravity changes due to lateral forces.
Is there some kind of filter to isolate gravity? That is to isolate the user’s movements, so that the sensor returns only the direction of gravity to improve orientation.
There are several posts on how to remove gravity, but there is nothing about isolating it.