The raw values that you get from the sensor do not need to be scaled for input to magneto. It performs internal scaling to the value you enter for Hm (the expected magnitude of the Earth's magnetic field in your vicinity).
And Hm itself is somewhat arbitrary because only the relative X and Y values of the magnetic field are used for calculating the yaw (compass) angle.
So, don't bother with the divide by 16.