Content deleted Content added
Replace all q_0/1/2/3 with q_w/x/y/z (vector rotation section needs some work) |
→Vector rotation: Use consistent notation for the vector rotation section "Q = (Q_w,vec(Q))" hope I got it right |
||
Line 261:
== Vector rotation ==
Let us define scalar <math>
Note that the canonical way to rotate a three-dimensional vector <math>\vec{v}</math> by a quaternion <math>q</math> defining an [[#Conversion|Euler rotation]] is via the formula
:<math>\mathbf{
where <math>\mathbf{
:<math>\vec{t} = 2\vec{q} \times \vec{v}</math>
:<math>\vec{v}^{\,\prime} = \vec{v} +
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.
Line 274:
:<math>
\begin{align}
\mathbf{
& = (
\vec{
\end{align}
</math>
Using this relation one finds for <math>\mathbf{
:<math>
\begin{align}
\mathbf{
& = (\vec{v} \cdot \vec{q},
\end{align}
</math>
Line 289:
:<math>
\begin{align}
\mathbf{q
& = (0,
\vec{q}\times(\vec{q}\times\vec{v} )) \\
\end{align}
</math>
where anti-commutivity of cross product and <math>\vec{q}\cdot \vec{v} \times \vec{q} = 0</math> has been applied. By next exploiting the property that <math>\mathbf{q}</math> is a [[#Definition|unit quaternion]] so that <math>
:<math>
\vec{q}\times(\vec{q}\times\vec{v}) = (\vec{q}\cdot\vec{v})\vec{q} - (\vec{q}\cdot\vec{q})\vec{v}
Line 301:
:<math>
\begin{align}
\mathbf{
2\vec{q}\times (\vec{q}\times\vec{v} )) \\
\end{align}
Line 307:
which upon defining <math>\vec{t} = 2\vec{q} \times \vec{v}</math> can be written in terms of scalar and vector parts as
:<math>
(0, \vec{v}^{\,\prime}) = (0, \vec{v} +
</math>
|