actually it would be adequate if the compass just referred to "local" magnetic north (i.e. by a more proper expression, compass north minus local deviation) and showed the heading to it jus like an airoplane compass or a nautic compass does, regardless of the vertical or inclined angle of the local magnetic field lines to the horizonal.
In other words, I would need only the local horizontal part of the magnetic field vector, regardless in which angle the compass is twisted, like as if mounted by a Gimbal (German: kardanische Aufhängung)
NXC CHESS for NXT: http://www.mindstormsforum.de/viewtopic.php?f=70&t=6790
indispensable for NXC + EV3-C: easy + trouble-free network & sensor+motor remote control for rs485, BT, USB!