function
LieGroups.SO3.Euler.from_Quat
Scalar-first Hamilton quaternion to Euler angles
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] | |
| input | sequence | LieGroups.SO3.Euler.Axis | [3] | |
| input | bodyFixed | Boolean | = true | |
| output | angles | Real | [3] |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function from_Quat "Scalar-first Hamilton quaternion to Euler angles"
input Real q[4];
input LieGroups.SO3.Euler.Axis sequence[3];
input Boolean bodyFixed = true;
output Real angles[3];
algorithm
angles := LieGroups.SO3.Euler.from_Matrix(
LieGroups.SO3.Quat.to_DCM(q), sequence, bodyFixed);
end from_Quat;