CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

function

LieGroups.SO2.from_Matrix

Extract angle from 2x2 rotation matrix

Public declarations

Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.

RoleNameTypeDimensions / attributes / defaultDescription
inputRReal[2,2]2x2 rotation matrix
outputthetaRealRotation angle [rad]

Modelica declarations and implementation

Show parameters, interfaces and source

Parameters, inputs, outputs, defaults and equations from the source file.

function from_Matrix "Extract angle from 2x2 rotation matrix"
  input Real R[2,2] "2x2 rotation matrix";
  output Real theta "Rotation angle [rad]";
algorithm
  theta := atan2(R[2,1], R[1,1]);
end from_Matrix;