I understand that it is not possible to get magnetic heading readings from the CoreLocation framework on an iPod Touch 4G, but it is possible to produce magnetometer readings using the CoreMotion framework.
I also understand that I need to use CMMotionManager
and set the deviceMotionUpdateInterval
to achieve this. I can then start and stop the updates with - (void)startMagnetometerUpdates
and - (void)stopMagnetometerUpdates
respectivley.
Now that I have my raw magnetometer data (x,y,z), how can I use it to achieve a magnetic heading?
I've seen some pretty complicated explanations online but would appreciate a code like example.
EDIT: My mistake, it is not possible to get magnetometer readings on the iPod Touch 4G.