In short, I'm attempting to get the wiimote to work with my pc (and extract data from it), but I'm faced with a mathematical (or trigonometric) problem.
In order to obtain the orientation of the wiimote I need to know/calculate yaw, pitch and roll.
I've got pitch and roll (in radians) and yaw kind of, but only when I move the wiimote precisely in a horizontal way. This is because yaw is a bit harder to obtain, the reason behind it is that I need to use the IR sensor (bar).
The IR beacon in this image is a bit different than the regular sensor bar (which only has 2 LEDs and not 4) and the focus point (which is the center of the camera/wiimote lens) should be on the other side of the image plane in reality.
The camera lens of the wiimote registers the LEDs of the sensor bar on the image plane which results in an (average) x and y position (see image above). With the help of the x value I can calculate yaw. The problem is that when roll or pitch changes, the image plane changes along with it and x isn't accurate anymore (and nor is yaw). I got the advice to
"build a mental model of how the Wiimote's IR camera works in response to pitch and roll, since the camera image and thus the x and y values rotate with the Wiimote."
What I know is that the x value on the image plane changes when I pitch or roll with the wiimote with the result that yaw isn't calculated accurately anymore.
I know what the pitch and roll angle is at all times and I think they have to go into the yaw calculation as a precondition to get it right, only I'm not sure how.
I was hoping someone could give me some pointers perhaps?
At any rate, thank you for reading all this and if anything is unclear just ask.