I have achieved quite good results with the Seeed Studio Grove 3-Axis Digital Compass V2. https://wiki.seeedstudio.com/Grove-3-Axis_Digitial_Compass_v2.0/