Electronic compass, RF and batteries
We sell a product that is very similar to what you propose.


RF should not affect it. We have a Bluetooth daughterboard to provide wireless comms and it does not affect the compass.
Temperature will affect the readings.
Metal parts such as USB connectors and SD card sockets will cause a magnetic distortion. Keep them away from the IMU.
Batteries will cause a large distortion depending on the size. We found Alkaline and Lithium AA batteries up to 10cm away can cause an effect.
If the batteries are close enough to have an effect, for high accuracy you will need to calibrate the magnetometer every time the batteries are changed. This is because different batteries, even of the same make and model, have different effects.
We found the calibration did not change as AA batteries discharged.


As for what battery to use, it depends on your power requirements. I think it is mainly the steel casing of the batteries that causes the biggest effect. Keep in mind that at very low power consumption alkaline batteries are just as good as lithium ones.