Applying magnetometer data to graphics object
I'm trying to mirror the orientation of the MetaMotion R sensor in a graphical object (SceneKit).
I've managed to tie the two together, but the translation is not good and it's almost certainly because I don't really understand the data coming out. So what I'm looking for in the first place is a explanation of the data, some background.
The specific issue I'm having is that the object seems to 'over react' as compared to the sensor. Turning the sensor 180 degrees will, for some angles, turn the object all the way over (360 degrees). But it doesn't seem consistent for all angles.
What I'm doing in the code is simply to assign the x,y,z values from the sensor data directly to the absolute rotation of the object.
I have several other options, however, in the form of Euler angles, quaternion and a choice of absolute or relative rotation. But I need to have a better understanding of how to correlate the data to one of these choices.
Any tips or suggestions on how to proceed from here would be greatly appreciated.