Saturday 23 July 2016

[WIP][Xposed]GyroEmu-Accelerometer/Magnetometer fusion



Hello,
Lots of devices from low to mid-end range don't have gyroscope installed, and thanks to that have AR capabilities severely decrased.
I'm working on Xpose module that uses Accelerometer and Magnetic Field Sensor to simulate Gyroscope output.

Module works by creating new Sensor instance and injecting it into SystemSensorManager sensor list after its constructor, so getDefaultSensor(Sensor.TYPE_GYROSCOPE) will return it.
Module registers then SensorEventListeners for accel and magnet sensors and does it's calculations on accelerometers update and calls onSensorChanged of listener that uses it.

I'm still working on calculating velocities properly and getting good quality noise-free output. I did some progress on this but it still does not work as intended. (rotation directions seem correct, or maybe are swapped or inverted, but that can by easily fixed, problem is with values, which are simply wrong.) Testing it is a problem though, since I don't own any device with actual gyro, so I'll be gratefull for any feedback.

xda won't let me post normal link yet, so here is repo: github.com/Mourdraug/GyroEmu/
And here is apk: github.com/Mourdraug/GyroEmu/raw/master/app/GyroEmu_0.1.apk



No comments:

Post a Comment