mpu9250 - noise and tilt compensation problems.

I am using the mpu9250 sensor with the ak8963 compass on board. I have a problem with the results, after calibrating the compass still has +/- 3-4 degrees noise. Additionally, I have a problem with the correct tilt compensation. Do you know any specific examples of how to do this?

You can try the tilt compensation code posted here, which works very well provided you have carefully calibrated the magnetometer.

For best accuracy calibrate the accelerometer too.