This is a neat article I found on calculating heading with a rate gyro.
http://www.seattlerobotics.org/encod...onal_gyro.html
Not sure if FIRST provides us with this code though, I'll have to dig deeper into the documentation and report back.
[EDIT] I found this article from a Hall Effect sensor manufacturer about how they work.
http://www.micronas.com/products/ove...sors/index.php [/DIT]