Arduino 3DOF Head Tracker

Check out the Angle complementary filter on this site: The DIY Segway Its in the Segspecs.zip file, in PDF form. Its for filtering out drift using Gyro and Accel, mainly for a segway, but I think it would work for this.