tilt compensation and imu

Hi all, I want to build an imu to drive a sailboat model, basically i need just to control the left-right movement (the yaw) of the boat regardless of the pitch and roll. I planned to use magnetoscopes, gyro and accel to determinate the correct heading of the boat using kalman filter to compensate the sensor errors. My doubt is: what is the best way to have tilt compensated Yaw value? i mean i have just to use and control the yaw value despite the pitch or roll of the boat since i can move the model just on the horizontal axis. And, do you think it is too much for my purpose? i never used this kind of sensor, maybe i can use just a tilt compensated compass but i think the signal would be too noisy.

Thx Gabriele