I would like to estimate the yaw angle from accelerometer and gyroscope data. For roll and pitch estimate I've used the following trigonometric equations:
roll = atan2(Ax,Az) * RAD_TO_DEG pitch = atan2(Ay,Az) * RAD_TO_DEG
and a simpified version of the Kalman Filter to consider also angular rates. The roll and pitch estimates are accurate (accelerometer values need to be filtered in presence of chassis vibrations).
In order to get the Yaw angle I'm using the following equation:
yaw = atan2(Ax,Ay) * RAD_TO_DEG;
but the it doesn't work. Do you have any advice?