Just curious, is there any particular reason that you coded the quaternion conversions directly, rather than use the pyquaternion library? (Perhaps it didn't exist at the time that you first wrote your script?)
http://kieranwynn.github.io/pyquaternion/
https://github.com/KieranWynn/pyquaternion
Just curious, is there any particular reason that you coded the quaternion conversions directly, rather than use the pyquaternion library? (Perhaps it didn't exist at the time that you first wrote your script?)
http://kieranwynn.github.io/pyquaternion/
https://github.com/KieranWynn/pyquaternion