View Single Post
  #15   Spotlight this post!  
Unread 15-11-2005, 19:45
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: EDU Mini Controller & 2005 Nav Code

Quote:
Originally Posted by jaustin
Ok guys, here is my gyro "issue"...
Re-reading your post, I realized that you're reaching deep into the code and looking at half-baked data. The variable gyro_angle is just a summation of all of the preceeding gyro rate measurements and won't make sense until you examine the return value of Get_Gyro_Angle( ). Here's the function:

long Get_Gyro_Angle(void)
{
// Return the calculated gyro angle to the caller.
return(((gyro_angle * GYRO_SENSITIVITY *5L) / (ADC_RANGE * ADC_UPDATE_RATE)) * GYRO_CAL_FACTOR);
}

I only calculate the angle "on demand" to keep the load on the microcontroller to a minimum.

BTW, I've spent quite a bit of time in Mukilteo -- mostly waiting for the ferry to Whidbey Island <grin>.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org