thaytan / OpenHMD

Free and Open Source API and drivers for immersive technology.
Boost Software License 1.0
137 stars 12 forks source link

Update wmr.c #39

Closed l33tlinuxh4x0r closed 3 years ago

l33tlinuxh4x0r commented 3 years ago

Fixes vertical sensor calibration for looking up and down.

thaytan commented 3 years ago

Slightly cleaner just to remove the negative sign from the -0.125f constant, but that's just a nitpick. An actual problem is that the accelerometer reading also needs to negation on the X axis removed, otherwise the fusion will always try and apply gravity correction in the wrong direction.

l33tlinuxh4x0r commented 3 years ago

agreed... that is more elegant.

thaytan commented 3 years ago

I made the simpler change, plus accelerometer change directly in my branch. Let me know if it does/doesn't work for you now

l33tlinuxh4x0r commented 3 years ago

It is working as expected. Thanks for the fixes... now if only we can get the controllers to work.

l33tlinuxh4x0r commented 3 years ago

I did notice that when I calibrated the room the headset is always in/on the floor no matter how I move. Other head tracking appears to be working though.