This library implements a way to get values from hmc5883l.
heading = atan2(y_raw, x_raw) * 57.29578;
Then you should add magnetic declination (in degrees) for your location, to get yours visit http://magnetic-declination.com, if you have an EAST declination use +, if you have a WEST declination use -.
Then add this value to your heading.
Calibration is suggested to get more accurate parameters.
Setup parameters are stored in file hmc5883l.h
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 1MHz.
If you include math.h add libm library to linker.
- read risk disclaimer
- excuse my bad english