Hard and soft iron distortions can be calibrated out but it is a giant pain in the ass.
I built my own but did it with a ring mount to gain a few inches away from the barrel, nut and carrier.
The other fun aspects are; you have to compensate for tilt as well, the most widely available code for common 9 DOF sensors (Kris Winer's) has some serious flaws which give incorrect output. The forums and info for these sensors and their use is primarily in the Arduino community and like most open source stuff erratic on being helpful or fully in context. AHRS sensors are the area of discussion you would want to be looking into.
This all being said I found myself using it less and less each match as I got used to the lay of the land and everything wasn't just "by that tree" or "by that rock" for me. Another snag was the particular match and club didn't allow sight picture except from the make ready before you shot, so gathering headings before hand to plan went out the window with a weapon mounted compass.
I ended up going to marine style binoculars with built in compass for gathering info for my stage cards. I still jot the heading down but I usually rely on arrows drawn on my card as to where to look from the firing point and from target to target ( <----------big transition to the left etc.).
In a way this all ties into Frank's discussion on levels (my device also displays tilt and slope), these acted as training wheels for me.
IMO the future will be something like a LRF that also gathers heading and sends it to an ATAK type system with an AR (augmented reality) type HUD. All of these systems exist but haven't been tied together in the public sector.
An example of a DIY Arduino HUD:
Arduino Data Glasses for My Multimeter : Video of the working device Trying to build a cheap Arduino Data Glasses for everybody. Why? I just wanted one. It's working, and now it can even help to avoid accidents. From the first idea to the working prototype, it took 4 Month The challenge…
www.instructables.com