I want to get the device's deviation from the magnetic North in degrees, and use that value in some code I'm writing.
I don't want to use the device's location services and therefore I'm not interested in getting the True north but rather the Magnetic North (using only the device's magnetometer).
Which class (or coding process.. ) could provide me with that value (solely relying on the magnetometer) ?
the CLLocationManager class and its properties rely on Location Services being enabled/available
where as the Core Motion framework with its CMMagnetometerData class provides us with the following property:
@property(readonly, nonatomic) CMMagneticField magneticField
A structure containing 3-axis magnetometer data
typedef struct {
double x;
double y;
double z;
} CMMagneticField;
How do I get degrees out of that? or is there some other way (class/property/method) for getting degrees out of the magnetometer solely ?
Thank you in advance to anyone with some helpful information on that matter! :)