View Single Post
  #2   Spotlight this post!  
Unread 02-03-2016, 00:44
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 243
BitTwiddler is on a distinguished road
Re: Using a Gyro without Encoders

While I don't have answers to all of your questions I would like to point out that the gyro reports angles in the range of 0-360 degrees. You'll probably want to normalize any readings greater than 180 degrees to their negative equivalents in order to get the PID vi in drive straight to work properly. Simply compare the reported gyro angle to 180 degrees. If greater than 180 degrees then subtract 360 and voila you get reported angles from -179.999 to +180. That way a reported angle of 350 degrees gets converted to -10 degrees which I believe the PID vi can make sense of.
Hope this helps.

Last edited by BitTwiddler : 02-03-2016 at 00:47.
Reply With Quote