View Single Post
  #7   Spotlight this post!  
Unread 10-01-2006, 23:10
Shu Song's Avatar
Shu Song Shu Song is offline
Melodious Footware
AKA: *Crash!* Shuuuuuuuuuuuu
FRC #0639 (Code Red Robotics)
Team Role: Mentor
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Ithaca, NY
Posts: 539
Shu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud of
Send a message via AIM to Shu Song
Re: Ultrasonic Range Finder

Quote:
Originally Posted by sparksandtabs
Why do you need the range finder?

If it is to find how far from the goal you are then there is an easier method. If you plan on using the CMU cam then have a constant in the program for the height of the light and then just derive the angle from the PWM signal of the servo. THen all you need is to do some trig
Having the RC do trig calculations takes up a lot of time and might make the program very slow. Whats most of the time done to get around that is to store a table of essential trig values and just have the RC look the values whenever you need them. Now it becomes an O(1) operation and speeds up the code a lot.

But as you've probably guessed by now, you can't possibly store the sin/cos values of every angle so you must round your angles to the nearest 5 or 10 degrees, adding more error on top of whatever calculation you're already doing.

The ultra sound provides for a more accurate range measurement with minimal error.
__________________
Code Red Robotics - Team 639
Ithaca High School| Ithaca | New York | USA | Earth | Sol System | Milky Way | Universe | Some Alien's Locker

WINNER of the 2005 Finger Lakes Regional, thanks to teams 191 and 494.
WINNER of the 2004 Canadian Regional, thanks to teams 33 and 1112
WINNER of Delphi: Driving Tomorrow's Technology Award at the 2007 Finger Lakes Regional.