KieranWynn / pyquaternion

A fully featured, pythonic library for representing and using quaternions
http://kieranwynn.github.io/pyquaternion/
MIT License
344 stars 72 forks source link

Convertion to Euler angles missing #32

Open cosama opened 5 years ago

cosama commented 5 years ago

I don't see a method that allows to extract the Euler Angles or the Aircraft principle axes (roll, pitch, yaw). The equations are straight forward (see https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles).

@KieranWynn if you are too busy to look into this I can give it a shot. Just let me know if you prefer a method or property. It probably would also be good to add a way of creating a quaternion from these angles.

cinabars commented 5 years ago

What about the property Quaternion.yaw_pitch_roll?

Agree that a method to create a quaternion from Tait-Bryan angles would be nice. I already write my own util function for this purpose.

KieranWynn commented 4 years ago

Apologies for the delay in getting to this.

There is a PR up for this conversion, https://github.com/KieranWynn/pyquaternion/pull/38/

Feel free to add your thoughts there.