You might be interested in the Nav6 open source IMU.
https://code.google.com/p/nav6
It's got 3 axis gyro, 3 axis accelerometer, 3 axis magnetometer. It's also got a dedicated chip running fusion algorithms and auto calibration algorithms. Also has open firmware source that converts all that to yaw/pitch/roll/linear acceleration values. It's very accurate.
There are also CRio libraries for c++, java and Labview, and sample robot code too.
But if you want to learn the fusion algorithms and do it yourself, I recommend reading the wiki at the link above. Under Advanced Topics section, see the References page.
- scott