devopera
devopera copied to clipboard
Update 2014-03-26-w3c-device-orientation-usage.md
Hi,
I'm the author of Quaternion.js ( https://www.npmjs.com/package/quaternion ), I saw your conversion from Euler angles to quaternions uses the wrong order. The author commented he's using ZXY, but it is actually ZXY in multiplicative order and thus YXZ! and thus always rotates in the wrong order. Also the typo in the formulas made it impossible to use.
Besides that I added some more notes for people who never had contact with quaternions. Also important is that x,y,z is NOT the axis, but it only encodes the axis besides the sine! The same for the w component, it is NOT the angle, but it encodes the angle within the co-sine.
I could not fix the image with the formula, hope you can provide this.
Thanks Robert