0

I am looking for a way of returning an euler angle that has been rotated by a quaternion.

I understand that extracting pitch roll and yaw from a quaternion is problematic at best, but if I could then I would simply add its values to my own in order to get the resulting euler angle.

I could also convert my euler angle to a quaternion and then combine the two but then I would be left with a quaternion that I cant convert into an euler.

I admit I struggle with quaternions at the best of times so any help will be well received.

For clarity I only need to return an euler angle, all other calculations can be done with quaternions if required.

I am using Bullet Physics, Direct X, C++

Thanks.

Paul Spain
  • 517
  • 3
  • 15

2 Answers2

1
  1. You can't combine Euler angles with Euler angles or Euler angles with quaternion directly.

  2. You should convert the rotation into representation allowing transformation composition. It is rotation matrix or quaternion.

  3. After combine of rotations convert back into Euler angles.

P.S. Euler angles is not useful representation of rotation at all. It only can be used for manual input of rotations.

minorlogic
  • 1,872
  • 1
  • 17
  • 24
0

It's possible to convert back and forth but you need to respect the order you are applying your different Euler angle or you will get some nasty result.

I didn'try it my self and as said minorlogic is better to stick to rotation matrix/quaternions.

here is a nice link

https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles

enter image description here

where q0,q1,q2,q3 stands for w,x,y,z On this site they suppose that

where the airplane first does yaw turn during taxiing onto the runway, then pitches during take-off, and finally rolls in the air.

Paltoquet
  • 1,184
  • 1
  • 10
  • 18