Mobile Camera Orientation

It’s actually neither. I don’t think this issue has been properly solved yet.

Though I think I’ve found a good starting point for this…

http://www.researchgate.net/publication/264707640_Implementing_a_Sensor_Fusion_Algorithm_for_3D_Orientation_Detection_with_InertialMagnetic_Sensors

Is a good white paper on how to do this.

You’ll see equation 2 and 3 on page 2 is how you figure out the Roll/Tilt (via the Gravity vector)

The Roll can then be deducted directly from the Tilt vector.

I’ll keep you posted with progress I make with this.