I'm using an HMC5883l compass module to find the angle at which my module is pointed from magnetic North. I found this code as an example with "HMC5883L_Simple.h" library.
#include <Arduino.h>
#include <Wire.h>
#include <HMC5883L_Simple.h>
// Create a compass
HMC5883L_Simple Compass;
void setup()
{
Serial.begin(9600);
Wire.begin();
Compass.SetDeclination(1, 56, 'E');
Compass.SetSamplingMode(COMPASS_CONTINUOUS);
Compass.SetScale(COMPASS_SCALE_088);
Compass.SetOrientation(COMPASS_HORIZONTAL_X_NORTH);
}
void loop()
{
float heading = Compass.GetHeadingDegrees();
Serial.print("Heading: \t");
Serial.println( heading );
delay(1000);
}
And the results I'm getting right now are like this.
Heading: 294.57
Heading: 294.44
Heading: 286.88
etc....
Is it the angle at which my module is pointed from magnetic North in degrees? If not, How can find the pointing angle?