The above-linked compass module and more details are available here:
http://www.acroname.com/robotics/parts/ ... MPASS.html
Unfortunately, as pointed out, it's not suitable for cave survey. The specs claim an accuracy of 3-4deg.
However, there's a new IC available from Honeywell, the HMC6352, that integrates all the junk on that board into a
tiny SMD package, for even less money ($45/1), and with an accuracy of 2.5deg. It talks I2C and spits out ASCII bytes for dead-simple interfacing.
http://www.sparkfun.com/commerce/produc ... ts_id=7892
http://www.ssec.honeywell.com/magnetic/hmc6352.html
2.5deg accuracy still isn't good enough for stringent cave survey though. Maybe you could stick two of these tiny chips in a box and average their values for increased accuracy?
Honeywell has
lots of other magnetic sensors/compass modules, with up to 3 axis (compas and clino, XYZ) and 1deg accuracy... but they're priced in the if-you-have-to-ask-you-can't-afford-it category.