Conversion between quaternions and Euler angles: Difference between revisions

Content deleted Content added
#suggestededit-add 1.0
Tags: Reverted Mobile edit Mobile app edit Android app edit
Citation bot (talk | contribs)
Add: bibcode, date. | Use this bot. Report bugs. | Suggested by Whoop whoop pull up | #UCB_webform 27/64
Line 81:
If <math>q_0+iq_1+jq_2+kq_3</math> is not a unit quaternion then the homogeneous form is still a scalar multiple of a rotation matrix, while the inhomogeneous form is in general no longer an orthogonal matrix. This is why in numerical work the homogeneous form is to be preferred if distortion is to be avoided.
 
The direction cosine matrix (from the rotated Body XYZ coordinates to the original Lab xyz coordinates for a clockwise/lefthand rotation) corresponding to a post-multiply '''Body 3-2-1''' sequence with [[Euler angles]] (ψ, θ, φ) is given by:<ref name=nasa-rotation>{{cite web|last=NASA Mission Planning and Analysis Division|title=Euler Angles, Quaternions, and Transformation Matrices|date=July 1977 |url=https://ntrs.nasa.gov/citations/19770024290|publisher=[[NASA]]|accessdate=24 May 2021}}</ref>
:<math>
\begin{align}
Line 264:
:<math>\vec{t} = 2\vec{q} \times \vec{v}</math>
:<math>\vec{v}^{\,\prime} = \vec{v} + q_0 \vec{t} + \vec{q} \times \vec{t}</math>
where <math>\times</math> indicates a three-dimensional vector cross product. This involves fewer multiplications and is therefore computationally faster. Numerical tests indicate this latter approach may be up to 30% <ref>{{cite journal |pmc=4435132|year=2015|last1=Janota|first1=A|title=Improving the Precision and Speed of Euler Angles Computation from Low-Cost Rotation Sensor Data|journal=Sensors|volume=15|issue=3|pages=7016–7039|last2=Šimák|first2=V|last3=Nemec|first3=D|last4=Hrbček|first4=J|doi=10.3390/s150307016|pmid=25806874|bibcode=2015Senso..15.7016J |doi-access=free}}</ref> faster than the original for vector rotation.
 
=== Proof ===