View Single Post
  #1   Spotlight this post!  
Unread 11-02-2007, 16:00
Ianuser Ianuser is offline
Registered User
FRC #0570
 
Join Date: Feb 2007
Location: new york
Posts: 64
Ianuser is an unknown quantity at this point
Re: Value of degree to calculate range?

We are looking for the Tilt_AngleMy tracking.H file says that the tilt min is 94 and the tilt max is 194. So, the center of that would then be 144, right? (It also says that Tilt_Center_Pwm_Default is 144). So, shouldn't the equation then be:

unsigned float Find_Distance(void)
{
float angle;
float range;
angle = (TILT_SERVO-144)*.757575;
range = HEIGHT_DIFF /*that's 116- camera height*/ /tan(angle);
return(range)
}

also, where did you get 25/33 from? where'd the 33 come from? Also, what does this mean?
Code:
#define TILT_SEARCH_STEP_SIZE_DEFAULT 50
wouldn't that mean that each step is 50, not 25? (And also its tan(angle), right? not atan(angle)...