Thread: Gyro Oddities
View Single Post
  #7   Spotlight this post!  
Unread 30-01-2010, 20:01
Bochek's Avatar
Bochek Bochek is offline
Registered User
AKA: Adam Bochek
FRC #2200 (MMRambotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Burlington, Ontario, Canada
Posts: 577
Bochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud of
Re: Gyro Oddities

We came up with a very simple solution, Rotate the robot 360 while taking a reading from the gyro, lets say the gyro read 200 degrees.

In your code, whenever you use GetAngle(); just multiply by 360 and divide by your reading, in our case, 200.

so your code would look like

float fAngle = gyro.GetAngle()*360/200;

- Bochek
__________________
-----------------------------------------------
Adam Bochek - FRC 2200
http://www.mmrambotics.com
http://www.watchfirstnow.com