Regarding Sensor.TYPE_ORIENTATION :
As I understand it, each value represents an angle between a vector from the coordinate center to the North Pole(or some other strong magnet) and the respective axis.
Let's say, the smartphone is fixed on a sphere's surface. The sphere is rotating around it's center. It has the radius r.
How do you estimate the angle the smartphone would have in the sphere's center between a fixed coordinate system's axes in the sphere's center and the respective imaginary (=projected) axes?
How do you do it in c#?