Hello,
I've put a tutorial about the HMC5883L 3 Axis Magnetometer up on website here:
https://www.loveelectronics.co.uk/Tutorials/8/hmc5883l-tutorial-and-arduino-library The compass allows you to calculate your bearing to magnetic north, I've provided an Arduino Library (but you could port it to your fav microcontroller) to control the device, and also given instructions on how to actually calculate the bearing on a level plane.
The next tutorial is to cover how to incorporate a triple axis accelerometer to provide tilt compensated data.
I hope someone finds it useful, and not intrusive to the forum.
Cheers!