View Single Post
  #8   Spotlight this post!  
Unread 20-03-2013, 00:39
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Gyro problem, please help!

Code wise if you are using the gyro from the Kit of Parts then you should keep its sensitivity at 0.007 so the getAngle() reports in degrees.

How much is it drifting? It is normal for the gyro to drift a fraction of a degree because of the nature of a gyro being a rate of change sensor. To get the current angle the gyro is facing it sums up all the changes in angle. The calculated rate of change is not 100% accurate and thus has error. Due to this error it builds up as more and more of these are added up as drift. You would have to reset the gyro when you know its heading to reset the error in getAngle() to 0.