Added: 3 years ago
From: hownottobeseen
Views: 1,168
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (4)

Sign In or Sign Up now to post a comment!
  • SENSORBAR_WIDTH of 19.30 worked for me :)

  • Nice job! Could you please share the source or at least describe the distance calculation algorithm?

  • 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

    what exactly is the SENSORBAR_MAGIC value?

  • @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 ;-)

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more