function
LieGroups.SO3.Quat.inverse_jacobian
Right-trivialized derivative of inverse with respect to its quaternion
Rule for inverse. Perturbing on the right and reading the
inverted result back on the right gives
log_map(inverse(q)^-1 * inverse(q*exp_map(dq))) = -Ad(q) dq = -R(q) dq
The identity is exact: inversion turns the right perturbation into a left one and negates it, and the adjoint carries it back to the right.
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | q | Real | [4] | Unit quaternion {w,x,y,z} |
| output | J | Real | [3, 3] | d/d(dq) of log_map(inverse(q)^-1 * inverse(q*exp_map(dq))) |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function inverse_jacobian
"Right-trivialized derivative of inverse with respect to its quaternion"
input Real q[4] "Unit quaternion {w,x,y,z}";
output Real J[3, 3] "d/d(dq) of log_map(inverse(q)^-1 * inverse(q*exp_map(dq)))";
algorithm
J := -LieGroups.SO3.Quat.to_DCM(q);
annotation(Documentation(info="<html>
<p>Rule for <code>inverse</code>. Perturbing on the right and reading the
inverted result back on the right gives</p>
<pre>log_map(inverse(q)^-1 * inverse(q*exp_map(dq))) = -Ad(q) dq = -R(q) dq</pre>
<p>The identity is exact: inversion turns the right perturbation into a left
one and negates it, and the adjoint carries it back to the right.</p>
</html>"));
end inverse_jacobian;