CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

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.

RoleNameTypeDimensions / attributes / defaultDescription
inputRReal[3, 3]
outputvalueReal

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;