functionequalityConstraint
Return the constraint residues to express that two frames have the same quaternion orientation
Extends from Modelica.Icons.Function (Icon for functions).
Information
Syntax
residue = Orientation.equalityConstraint(Q1, Q2);
Description
This function returns the Real residue vector with 3 elements. This vector has zero elements if quaternions objects Q1 and Q2 are identical, i.e. they describe the same orientation. The residue vector is determined by the relative quaternion object between Q1 and Q2 to formulate the residue in such a way that only identical orientation objects lead to a zero residue vector.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Quaternions.Orientation | Q1 | Quaternions orientation object to rotate frame 0 into frame 1 | |
| Quaternions.Orientation | Q2 | Quaternions orientation object to rotate frame 0 into frame 2 |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[3] | residue | Zero vector if Q1 and Q2 are identical (the first three elements of the relative transformation (is {0,0,0} for the null rotation, guarded by atan2 to make the mirrored solution invalid |