equalityConstraint

Return the constraint residues to express that two frames have the same quaternion orientation

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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.

Syntax

residue = equalityConstraint(Q1, Q2)

Inputs (2)

Q1

Type: Orientation

Description: Quaternions orientation object to rotate frame 0 into frame 1

Q2

Type: Orientation

Description: Quaternions orientation object to rotate frame 0 into frame 2

Outputs (1)

residue

Type: Real[3]

Description: 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