Recording heading with magnetometer that is inside spinning object
Nope.  You can't tell the direction of travel of a ball, with only the 3-axis magnetometer.  The magnetometer doesn't "see" the translational component.  

Let's take a ball that can have a translational motion in any arbitrary direction, and can not spin at all.  The magnetometer inside of the ball will always give you the same reading, regardless of the direction the ball is traveling in.  So, it can't be used for detecting direction of travel.

[Humiliating, isn't it?]