function
LieGroups.SO3.Euler.to_Quat
Euler angles to scalar-first Hamilton quaternion
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | angles | Real | [3] | |
| input | sequence | LieGroups.SO3.Euler.Axis | [3] | |
| input | bodyFixed | Boolean | = true | |
| output | q | Real | [4] |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function to_Quat "Euler angles to scalar-first Hamilton quaternion"
input Real angles[3];
input LieGroups.SO3.Euler.Axis sequence[3];
input Boolean bodyFixed = true;
output Real q[4];
algorithm
q := LieGroups.SO3.Quat.from_DCM(
LieGroups.SO3.Euler.to_Matrix(angles, sequence, bodyFixed));
end to_Quat;