function
LieGroups.SE23.Generic.to_Matrix
SE_2(3) homogeneous matrix
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | element | Element | | |
| output | matrixRepresentation | Real | [5, 5] |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function to_Matrix "SE_2(3) homogeneous matrix"
input Element element;
output Real matrixRepresentation[5, 5];
algorithm
matrixRepresentation := zeros(5, 5);
for i in 1:5 loop
matrixRepresentation[i, i] := 1.0;
end for;
matrixRepresentation[1:3, 1:3] :=
Rotation.to_Matrix(element.rotation);
matrixRepresentation[1:3, 4] := element.velocity;
matrixRepresentation[1:3, 5] := element.position;
end to_Matrix;