NOTE: The compass is currently not available on iOS devices since there is no implementation in the RoboVM - backend yet. The compass appears to be present with the Intel MOE backend on iOS.

    Once you determined that the compass is indeed available, you can poll its state:

    • The azimuth is the angle of the device’s orientation around the z-axis. The positive z-axis points towards the earths center.
    • The roll is the angle of the device’s orientation around the y-axis. The positive y-axis points toward the magnetic north pole of the earth while remaining orthogonal to the other two axes.

    Here’s an illustration of the axis relative to the earth.

    | Next