Compute Altitude and Azimuth using either Quaternions or Rotation Matrix or Roll, Pitch and Yaw component

6.4k Views Asked by At

I am struck with a mathematical problem. I want to convert the iPhone device's attitude information which is available in one of the following forms:

  1. Quaternion
  2. Rotation Matrix
  3. Roll, Pitch and Yaw component

To, Altitude and Azimuth. Where:

  • Altitude should be between: 0 to 90 deg and / or 0 to -90 deg. which depicts the altitude of the object pointed by the device in the sky.

enter image description here

  • Azimuth between 0 to 360 deg. which depicts the direction. North being 0 deg, South being 180 deg. etc. enter image description here

I am no expert at mathematics, so guys help me in figuring out this problem. I have already posted this question in sister website without much help. Probably because it involves too much of mathematics.

Thanks & Regards,

Raj