Hi Jim, you would need to calibrate the compass to get a good heading. Here is some information about the types of interference an that can effect a magnetometer https://ozzmaker.com/compass3/
The biggest one is hard iron distortion.
If you are using python, you can use this script to get your calibratation values.
Mark --OzzMaker.com --