Well well well! I am still going with my trig work, but the more I equate, the easier it becomes. The first set of functions described what to do with the values and this set calculates how to get said values.
The equation I spent the entire afternoon working on takes a distance between 2 points seen by the Wiimote and uses triangulation to calculate the distance of the sensor bar from the Wiimote. Unfortunatley, because the distance between the points is measured in pixels and the distance between the sensor bar and the Wiimote is measured in ‘real’ units (i.e. cenitmetres or inches) there is a conversion or ‘scale’ factor to be taken into account.
…and after all these scribbles, the final equation is as follows:
$$d = {s \over 2 tan \langle{{s \over 2}\times \langle{{\langle{Horiz FOV \over 1024}\rangle + \langle{Vert FOV \over 768}\rangle} \over 4}\rangle}\rangle}$$
Where:
d = distance between Wiimote and sensor bar
s = distance between the 2 points as seen by the Wiimote (pixels)
Horiz FOV = Horizontal field-of-view of the Wiimote, roughly equal to 41° (to be measured)
Vert FOV = Vertical field-of-view of the Wiimote, roughly equal to 31° (to be measured)
The problem, as I mentioned is that the scale of the model has not been set, and d may need to be multiplied by a certain number to make the numbers work, but nevertheless the relationship between d and s should work out to be correct.
Yet more maths to follow!













