I'm developing an app where the user needs to shake the phone in all directions and the smartphone needs to maintain steady guidance in the meantime. The problem is that all forms of spatial orientation such as TYPE_ROTATION_VECTOR
, TYPE_GEOMAGNETIC_ROTATION_VECTOR
, and even getRotationMatrix()
use the accelerometer together, and the moment the user moves the cell the direction of gravity changes due to forces sides.
Is there any kind of filter to isolate gravity? That is to isolate the movements of the user, so that the sensor only returns the direction of gravity to improve orientation.
There are several posts on how to remove gravity, but there is nothing about isolating it.