AndersMalmgren / FreePIE

Programmable Input Emulator
644 stars 144 forks source link

[android] Sensible values without gyro #71

Open sthalik opened 9 years ago

sthalik commented 9 years ago

I found this - http://cache.freescale.com/files/sensors/doc/app_note/AN4248.pdf and it might be superior to Android framework code for pose estimation without a gyro.

I'm dropping it here not to forget to implement it sometime soon.

sthalik commented 9 years ago

If indeed works better it can also be made into xposed module. Infinite Flight works like shit.

AndersMalmgren commented 9 years ago

I just gave a quick read so i might missed something but it looks like its rotation only not translation?

sthalik commented 9 years ago

of course but right now rotation works almost worthlessly

sthalik commented 9 years ago

for gyro lackage that is

AndersMalmgren commented 9 years ago

Aha, pose estimation sounded like you wanted to get x y z translation as well. The C# code should be easy to port to Java.

AndersMalmgren commented 9 years ago

I get a lot of drift, could be the gyro, wonder if this also could help people with gyro devices

sthalik commented 9 years ago

Magnets nearby?

We COULD do translation support but with large-ish spring effect.

sthalik commented 9 years ago

See https://github.com/sthalik/FreePIE/compare/master...sthalik:freescale-estimator

It works up to the point that there's no singularity when poles align exactly. Very noisy. I should filter accelerometer readings prior to estimation or something.

Note, the branch's new code only works on phones with no gyro.

AndersMalmgren commented 9 years ago

Its going to be interesting to see if you can make it better than the Google team :)

sthalik commented 9 years ago

it already performs better with regard to the amount of singularities. Google code stops processing one or two degrees of freedom on certain positions. this one mostly stops when there's no possible solution.

accuracy still sucks though. requires way more filtering than bearable. I'll look into filter gain more but it's nowhere near a gyro-equipped phone.

sthalik commented 8 years ago

@AndersMalmgren care to give it a go? https://github.com/sthalik/FreePIE/commits/freescale-estimator

It's not rebased yet hence not ready for a pull request, but functionality is done.

AndersMalmgren commented 8 years ago

Sorry, i have not had the time to test this. Will try to find sometime this week.