Processing Wiimote Data
Loading...
1,170
Loading...
Uploader Comments (hownottobeseen)
see all
All Comments (4)
-
SENSORBAR_WIDTH of 19.30 worked for me :)
Loading...
Nice job! Could you please share the source or at least describe the distance calculation algorithm?
ignuss 3 years ago
It's pretty simple:
const SENSORBAR_MAGIC = 1389.4621; //Magic value ;)
const SENSORBAR_WIDTH = 12.07; //Distance between the LEDs in mm
distx = ir2.X - ir1.X;
disty = ir2.Y - ir1.Y;
distance = (SENSORBAR_MAGIC * SENSORBAR_WIDTH) / Math.Sqrt(distx * distx + disty * disty);
hownottobeseen 3 years ago
@hownottobeseen
what exactly is the SENSORBAR_MAGIC value?
Elimentz09 1 year ago
@Elimentz09 I actually can't say it exactly.
I just measured the real distance between the sensorbar and wiimote and got that "magic" number. You sure can calculate that number with the size, resolution and focal length of the camera but hey, it's just a toy ;-)
hownottobeseen 1 year ago