function
LieGroups.Analysis.attitudePotential
Sign- and coordinate-independent SO(3) potential 1-cos(angle)
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | R | Real | [3, 3] | |
| output | value | Real | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function attitudePotential
"Sign- and coordinate-independent SO(3) potential 1-cos(angle)"
input Real R[3, 3];
output Real value;
algorithm
value := 0.5 * (3.0 - R[1, 1] - R[2, 2] - R[3, 3]);
end attitudePotential;