A complementary filter (CF) uses orientation obtained calculated from gyroscope, accelerometer and magnetometer to find a more accurate measurement of orientation.
However, when my sensor is accelerating linearly, the orientation from trigonometric equations using accelerometer readings is not correct. These equations seem to work only when the linear acceleration is 0. It seems that it is useless to apply accelerometer orientation in the Complementary Filter in this case.
Magnetometer on the other hand gives only the heading angle and the roll angle and not the pitch.
Is there any way of using CF to find orientation for a linearly accelerating vehicle? Or is CF intended only for cases when linear acceleration is 0?