# der_Ceuler_by_v_NED¶

Provides the derivative of the product between the rotation matrix $$C^{AG}(\mathbf{\Theta})$$ and a constant vector, $$\mathbf{v}$$, with respect to the Euler angles, $$\mathbf{\Theta}=[\phi,\theta,\psi]^T$$:

$\frac{\partial}{\partial\Theta}(C^{AG}(\Theta)\mathbf{v}^G) = \frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}$

where $$\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}$$ is the resulting 3 by 3 matrix.

Being $$C^{AG}(\Theta)$$ the rotation matrix from the G frame to the A frame in terms of the Euler angles $$\Theta$$ as:

$\begin{split}C^{AG}(\Theta) = \begin{bmatrix} \cos\theta\cos\psi & \cos\theta\sin\psi & -\sin\theta \\ -\cos\phi\sin\psi + \sin\phi\sin\theta\cos\psi & \cos\phi\cos\psi + \sin\phi\sin\theta\sin\psi & \sin\phi\cos\theta \\ \sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi & -\sin\phi\cos\psi + \cos\psi\sin\theta\sin\psi & \cos\phi\cos\theta \end{bmatrix}\end{split}$

the components of the derivative at hand are the following, where $$f_{1\theta} = \frac{\partial \mathbf{f}_1}{\partial\theta}$$.

$\begin{split}f_{1\phi} =&0 \\ f_{1\theta} = &-v_1\sin\theta\cos\psi \\ &-v_2\sin\theta\sin\psi \\ &-v_3\cos\theta \\ f_{1\psi} = &-v_1\cos\theta\sin\psi + v_2\cos\theta\cos\psi\end{split}$
$\begin{split}f_{2\phi} = &+v_1(\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi) + \\ &+v_2(-\sin\phi\cos\psi + \cos\phi\sin\theta\sin\psi) + \\ &+v_3(\cos\phi\cos\theta) \\ f_{2\theta} = &+v_1(\sin\phi\cos\theta\cos\psi) + \\ &+v_2(\sin\phi\cos\theta\sin\psi) +\\ &-v_3(\sin\phi\sin\theta) \\ f_{2\psi} = &+v_1(-\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_2(-\cos\phi\sin\psi + \sin\phi\sin\theta\cos\psi)\end{split}$
$\begin{split}f_{3\phi} = &+v_1(\cos\phi\sin\psi-\sin\phi\sin\theta\cos\psi) + \\ &+v_2(-\cos\phi\cos\psi - \sin\phi\sin\theta\sin\psi) + \\ &+v_3(-\sin\phi\cos\theta) \\ f_{3\theta} = &+v_1(\cos\phi\cos\theta\cos\psi)+\\ &+v_2(\cos\phi\cos\theta\sin\psi) + \\ &+v_3(-\cos\phi\sin\theta) \\ f_{3\psi} = &+v_1(\sin\phi\cos\psi-\cos\phi\sin\theta\sin\psi) + \\ &+v_2(\sin\phi\sin\psi + \cos\phi\sin\theta\cos\psi)\end{split}$

Note

This function is defined in a North East Down frame which is not the typically used one in SHARPy.

param euler

Vector of Euler angles, $$\mathbf{\Theta} = [\phi, \theta, \psi]$$, in radians.

type euler

np.ndarray

param v

3 dimensional vector in G frame.

type v

np.ndarray

returns

Resulting 3 by 3 matrix $$\frac{\partial \mathbf{f}}{\partial\mathbf{\Theta}}$$.

rtype

np.ndarray