Kinematics
Currently, only the kinematics of Direction Cosine Matrices and Quaternions are implemented.
Direction Cosine Matrices
Let A and B be two reference frames in which the angular velocity of B with respect to A, and represented in B, is given by
\[\boldsymbol{\omega}_{ba,b} = \left[\begin{array}{c} \omega_{ba,b,x} \\ \omega_{ba,b,y} \\ \omega_{ba,b,z} \end{array}\right]\ .\]
If $\mathbf{D}_{b}^{a}$ is the DCM that rotates the reference frame A into alignment with the reference frame B, then its time-derivative is
\[\dot{\mathbf{D}}_{b}^{a} = -\left[\begin{array}{ccc} 0 & -\omega_{ba,b,z} & +\omega_{ba,b,y} \\ +\omega_{ba,b,z} & 0 & -\omega_{ba,b,x} \\ -\omega_{ba,b,y} & +\omega_{ba,b,x} & 0 \end{array}\right] \cdot \mathbf{D}_{b}^{a}\ .\]
In this package, the time-derivative of this DCM can be computed using the function:
function ddcm(Dba, wba_b)
julia> wba_b = [0.01, 0, 0]
3-element Vector{Float64}: 0.01 0.0 0.0
julia> Dba = angle_to_dcm(0.5, 0, 0, :XYZ)
DCM{Float64}: 1.0 0.0 0.0 -0.0 0.877583 0.479426 0.0 -0.479426 0.877583
julia> ddcm(Dba, wba_b)
3×3 StaticArraysCore.SMatrix{3, 3, Float64, 9} with indices SOneTo(3)×SOneTo(3): -0.0 0.0 0.0 0.0 -0.00479426 0.00877583 0.0 -0.00877583 -0.00479426
Quaternions
Let A and B be two reference frames in which the angular velocity of B with respect to A, and represented in B, is given by
\[\boldsymbol{\omega}_{ba,b} = \left[\begin{array}{c} \omega_{ba,b,x} \\ \omega_{ba,b,y} \\ \omega_{ba,b,z} \end{array}\right]\ .\]
If $\mathbf{q}_{ba}$ is the quaternion that rotates the reference frame A into alignment with the reference frame B, then its time-derivative is
\[\dot{\mathbf{q}}_{ba} = \frac{1}{2} \cdot \left[\begin{array}{cccc} 0 & -\omega_{ba,b,x} & -\omega_{ba,b,y} & -\omega_{ba,b,z} \\ +\omega_{ba,b,x} & 0 & +\omega_{ba,b,z} & -\omega_{ba,b,y} \\ +\omega_{ba,b,y} & -\omega_{ba,b,z} & 0 & +\omega_{ba,b,x} \\ +\omega_{ba,b,z} & +\omega_{ba,b,y} & -\omega_{ba,b,x} & 0 \end{array}\right] \cdot \mathbf{q}_{ba}\ .\]
In this package, the time-derivative of this quaternion can be computed using the function:
function dquat(qba, wba_b)
julia> wba_b = [0.01, 0, 0]
3-element Vector{Float64}: 0.01 0.0 0.0
julia> qba = angle_to_quat(0.5, 0, 0, :XYZ)
Quaternion{Float64}: + 0.968912 + 0.247404⋅i + 0.0⋅j + 0.0⋅k
julia> dquat(qba, wba_b)
Quaternion{Float64}: - 0.00123702 + 0.00484456⋅i + 0.0⋅j + 0.0⋅k