View Single Post
  #7   Spotlight this post!  
Unread 20-08-2013, 16:40
alexhenning alexhenning is offline
WPILib Developer
FRC #0348
 
Join Date: Apr 2010
Rookie Year: 2003
Location: MA
Posts: 49
alexhenning will become famous soon enough
Re: Using the Gyro's "temp"?

As others have mentioned the WPILib gyro class doesn't support temperature and most teams don't seem to use the temperature. They seem find just the gyro output calibrated from WPILib accurate enough. However, if you want to incorporate the temperature of the gyro, the best way to start is to look at the datasheet. If you look at the datatsheet[1] for your gyro, it should describe the relationship between temperature and the voltage reading. Then you can just copy the code of gyro class and create a custom class for a gyro with temperature correction that reads the temperature at calibration and uses that when calculating the angular rate. The biggest difficulty with this is that you can't do this and use the FPGAs hardware accumulator, which may make a bigger difference depending on your application.

[1] For the 2009 Gyro. Page 9: http://www.usfirst.org/uploadedFiles...%20Rev%20B.pdf
Reply With Quote