It seems that the correct sensor fusion for the accelerometer / gyroscope / compass is already implemented at SDK level 15:
link
In this thread, they reference the Android source code:
"frameworks / base / services / sensorservice: virtual gravity, orientation and rotation sensors are now based on the readings of the accelerometer / gyroscope / compass filter Kalman filter"
But I really can not find the hierachy folder "frameworks / base / services / sensorservice:"? !!
Can someone help me? Many thanks!
EDIT: Well, I found it myself in the Android source code, which can be viewed here: https://android.googlesource.com/platform/frameworks/native/+/master/services/sensorservice/
source
share