Close

3D position from wiimote signals

A project log for Star Wars training droid

Flying training droid that interacts with its opponent.

djokeDJoke 04/08/2014 at 20:490 Comments

As it turns out, it requires some long-forgotten math skills (and patience!) to get a 3D-position from the wiimote outputs. I started with a 2D position determination.

Below you see the top view of our setup. Cam A to C represent the three wiimotes, each with their FOV. The 3 FOVs overlap in the pale blue part, this will be our field of action. Each wiimote returns an x-value between 0 and 1, the horizontal relative position of the quad in the wiimote's FOV. When the quad would be positioned on the red dot, the wiimotes would return e.g. 0.8 (camA), 0.1 (camB), 0.6 (camC).

Of course we have to work the other way around. The quad is positioned in the field somewhere and we get 3 x-values from the wiimotes. I almost finished the calculations to determine the quad's x,y-coordinates from the wiimote x-values.

The next step - after this piece of art :-) - will be to implement the y-values returned by the wiimotes (which define the vertical relative position of the quad in the wiimote's FOV) into my calculations to determine x,y,z-coordinates of the quad in our field of action.

Discussions