Author Topic: Distance between IR points  (Read 7511 times)

Offline slick8086

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
on: October 02, 2008, 10:51:06 AM
I'm useing a video projector instead of a TV and I bought a wireless sensor bar, but it runs on batteries.  I'm planning to make my own sensor bar that runs off ac power.  Does anyone know the optimum distance between the two IR light sources in relation to screen size (for normal wii use).


Offline UndCon

  • Support Admin
  • *
  • Posts: 566
  • Karma: +11/-3
    • View Profile
    • UndCon
Reply #1 on: October 04, 2008, 03:05:17 PM
Actually there is no such value...the IR's are needed to triangulate to get distance and angles from the IRbar. This is how the concept works and as long as you have a given number the math's will do the rest...

Of course there is some limitations , the wiimote has a viewing angle of 45 degrees so an oversized Irbar might go out of bound earlier...

Offline yashardel

  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Reply #2 on: November 11, 2008, 11:01:23 AM
Hi .
Thanks for your comments.

Could you plz help me how the distance is calcued utilizing the Triangulation Principle.
i know that Wii CPU uses two distances for finding d where :

mi: the seperation distnce of two bright dots when they are focuses onto the image sensor
m : fixed distance
d : the distnce from Wii remote and the Sensor bar.

This is not very clear for me what "mi" really is and how that is related to triangulation
for finding the distance d?
Can anybody help me with that.

 Thanks in advanced.

Offline Deceit

  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Reply #3 on: December 19, 2008, 05:38:42 AM
ok well i actualy just figured this out... i dont know if this is the "way it works" lol but this "way works" ;D

the distance is simple math... the view prespective is where the trig comes into play.

so here it is:
"dx is the Distance between dot1 and dot2 in the IR cameras view on the X axis"
dx = dotOne.x - dotTwo.x

"dy is the Distance between dot1 and dot2 on the Y axis"
dy = dotOne.y - dotTwo.y

now we have our dots on a 2D plain...
imagin looking down at them placed on a grid, as you move your head closer the dots spread further (or the Distance between them gets larger)

so if we find the square root of the distances...

distance = sqrt(dx*dx + dy*dy)

it essentialy gives you a Z axis, or a corrisponding number that can be placed there  :D

hope that helps explain it for you,