View Single Post
  #4   Spotlight this post!  
Unread 21-01-2006, 19:00
Andrew Blair's Avatar
Andrew Blair Andrew Blair is offline
SAE Formula is FIRST with Gasoline.
FRC #0306 (CRT)
Team Role: Alumni
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Corry
Posts: 1,193
Andrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond repute
Send a message via AIM to Andrew Blair Send a message via Yahoo to Andrew Blair
Re: get distance from cmucam

From the base of the robot to the base of the target. However, you can easily modify it so as to give you the distance to the target, directly.

To derive the hypotenuse of our virtual triangle:

(height_of_camera_to_goal)/(sin(angle_to_goal))= distance, directly to goal.

For anyone who hasn't had trigonometry, I would highly recommend it; it's a very applicable math course! For those who have it coming up, but haven't had it yet, have someone on the team teach you the basics! It really is the most useful math you'll ever learn!
__________________
Reading makes a full man, conference a ready man, and writing an exact man.
-Sir Francis Bacon

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
-Albert Einstein