Measuring Tilt Angle

I am trying to find a way to measure tilt angle of a car from inside the car when it is moving around. I can measure tilt using an accelerometer, however this changes once you put the device in a non inertial reference frame such as an accelerating car. Is there any way to measure tilt while the car is accelerating or is it how I am guessing it is... physically impossible?

An accelerometer will always include the acceleration of the car.

A gyro will detect the rotation motion, but not the acceleration. Even though the gyro shifts, it will be more accurate than the accelerometer (for a short time).

A 3-axis magnetometer (compass) will point in the direction of the magnetism, regardless of what the car is doing. But I don't know how accurate a magnetometer inside a car is.

This is a good start,,58048.0.html

Combining the accelerometer and gyro should be able to solve it. With the compass as third sensor, it would be even better.