When reading about magnetometer / magnetic field / "compass" sensors it is often said that sensor tilt compensation e.g. by using an accelerometer is required in order to get correct measurements. (Note that I am not talking about hard iron and soft iron effects here.) All these sources make use of the two-dimensional compass for clarification which, when tilted, would not work.
When using a 3D magnetometer (e.g. HMC5883L), my understanding is that they provide a 3D vector pointing in (or along) the direction of the strongest magnetic field, which - in case of the earth - should be towards magnetic north.
I was under the impression that I could use the cross product of a gravity vector measured by an accelerometer and the magnetometer "north" vector to get all axes required for determining a reference frame and from that, local orientation.
Then, what is tilt compensation and why would it be required?