View Single Post
  #1   Spotlight this post!  
Unread 11-02-2007, 22:46
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Value of degree to calculate range?

Quote:
Originally Posted by Ianuser View Post
I dont understand whats wrong with what I did. I'm not using an arraylist or anything of that sort. I just want to know, for the pwm value at which the tiltservo is at NOW, what is its angle? thereafter, what is the range from the bot to the rack?
There's nothing wrong with what you did. Salik was just suggesting another way of doing it -- one which has a couple of very good features, by the way. It lets you turn a tilt servo value directly into a range value just by reading from an array, without doing any time-consuming calculations in the program. It lets you compensate for any nonlinearities in the system, such as vertical parallax from the motion of the camera lens or a changing centroid bias when the size of the target images changes, by giving you a way to manually tweak values for each angle. And it lets you fill in the array without doing any trigonometry at all if you want to, by placing the robot on the field and actually measuring the distance associated with each tilt servo value.