Electronic compass soft iron distortion
Likely not, my advice would be to try what shipbuilders do for centuries: mount the compass on the frame and calibrate it so you know what true heading corresponds to each indicated.