I dont know if the hall sensor sould generate a field and mess up a compass, doesnt matter now.
I have developed a project using a i2c compass module, they are 3 quid each, the circuit generates the heading from x and y vectors.
The maths involved gets complicated, you get x and y readings from the magnetometer, which are vector variables, and you need to convert them to a polar heading, tricky stuff.
There are some examples on the net using lookup tables.
My circuit produces a heading in degrees so might be over accurate, you might be able to use something simpler to get a rough heading.
If yu look through my posts someone here gave me guidance and some pic code a while back.