On the subject of yaw drift error, this might be useful - from those nice Oculus folks:
Help! My cockpit is drifting away. It's about magnetometer integration.
Just thinking, since you would kind of assume that
*on average* over say 15-20 minutes, your head would be centered/ oriented straight ahead as far as tracking is concerned, could you code in a very faint bias to slowly drag orientation back to 'zero' over that time? (Zero being calculated as the running average of where your head is pointing). After all, absolute permanent accurate head tracking isn't necessary I guess, just short/medium term fidelity.
Hope you see what I mean, and apologies if I've overlooked something obvious.
No, totally understood - there was quite some discussion on this within the Alpha forum, n0ahg found some good material out there.
Quite clearly relying on purely a gyroscope and accelerometer is never going to avoid drift; put simply, the axes in the MPU rely on gravity pushing down on them to provide a reading, and the X axis (yaw, if you like) tends to be perpendicular to gravity all the time, hence very hard to keep a reading accurate on it.
Static drift (ie. standing still) is generally very consistent and easy to address, you could do as you suggest but we've found a simple static adjustment factor applied regularly fixes it.
The problem at the moment is quick, high-G maenouvres that throw the sensors a curve ball. There are open-source filters out there from various sources, public on the net, that purport to address this by bringing in magnetometer readings.
Currently we're looking to see if we can make use of the "black magic" of the DMP (Digital Motion Processor), a feature of the InvenSense chip that could offload all the computation for us, but it's closed-source and figuring out the firmware settings is a bit trial and error. Most of it is reverse-engineered by others out there on t'internet.
I guess if we can't get it to work, we just have to implement our own filters in the AVR code.
But, and again this is the key bit to remember, having said all of that, drift really is at a low level - maybe not acceptable for £300 worth of Occulus Rift headset, but for a tenner, it's fine - I tend to have to reset every 30 minutes of gameplay. Provided you don't attempt any headbanging during game, it's fine
