AbsoluteAngles
Measure absolute angles between frame connector and the world frame
Library
Modelica/Mechanics/MultiBody/Sensors
Description
This model determines the 3 angles to rotate the world frameinto frame_a along the axes defined by parameter sequence.For example, if sequence = {3,1,2} then the world frame isrotated around angles[1] along the z-axis, afterwards it is rotatedaround angles[2] along the x-axis, and finally it is rotated aroundangles[3] along the y-axis and is then identical to frame_a.The 3 angles are returned in the range
-p <= angles[i] <= p
There are two solutions for "angles[1]" in this range.Via parameter guessAngle1 (default = 0) thereturned solution is selected such that |angles[1] - guessAngle1| isminimal. The transformation matrix between the world frame andframe_a may be in a singular configuration with respect to "sequence", i.e.,there is an infinite number of angle values leading to the same relativetransformation matrix. In this case, the returned solution isselected by setting angles[1] = guessAngle1. Then angles[2]and angles[3] can be uniquely determined in the above range.
The parameter sequence has the restriction thatonly values 1,2,3 can be used and that sequence[1] ≠ sequence[2]and sequence[2] ≠ sequence[3]. Often used values are:
sequence = {1,2,3} // Cardan or Tait-Bryan angle sequence = {3,1,3} // Euler angle sequence = {3,2,1}
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_sequence | sequence | Angles are returned to rotate world frame around axes sequence[1], sequence[2] and finally sequence[3] into frame_a | Vector of size 3 | |
mo_guessAngle1 | guessAngle1 | Select angles[1] such that abs(angles[1] - guessAngle1) is a minimum | Scalar |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo__nmodifiers | Number of Modifiers | Specifies the number of modifiers | Number | |
mo__modifiers | Modifiers | Add new modifier | Structure | |
mo__modifiers/varname | Variable name | Cell of strings | ||
mo__modifiers/attribute | Attribute | Cell of strings | 'start' | |
mo__modifiers/value | Value |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
frame_a | implicit | Coordinate system a of which the absolute kinematic quantities are measured | input | 1 |
angles | implicit | Angles to rotate world frame into frame_a via 'sequence' | output | 1 |