|
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
|