RelativeVelocity
Measure relative velocity between the origins of two frame connectors
Library
PlanarMechanics/Sensors
Description
The relative velocity vector between the origins of frame_a
and of frame_b
are determined and provided at the output signalconnector v_rel
.
Via parameter resolveInFrame
it is defined, in which framethe velocity vector is resolved.
resolveInFrame = … | Output vector resolved in |
---|---|
Types.ResolveInFrameAB.world | world frame |
Types.ResolveInFrameAB.frame_a | frame_a |
Types.ResolveInFrameAB.frame_b | frame_b |
Types.ResolveInFrameAB.frame_resolve | frame_resolve (must be connected) |
If resolveInFrame = Types.ResolveInFrameAB.frame_resolve
,the conditional connector frame_resolve
is enabledand v_rel
is resolved in the frame, to whichframe_resolve
is connected.Note, if this connector is enabled, it must be connected.
Example: If resolveInFrame = Types.ResolveInFrameAB.frame_resolve, the output vector is computed as:
![r_rel = transpose([cos(frame_resolve.phi), -sin(frame_resolve.phi), 0; sin(frame_resolve.phi),cos(frame_resolve.phi), 0;0,0,1]) * [frame_b.x - frame_a.x;frame_b.y - frame_a.y;frame_b.phi - frame_a.phi]](../../../_mo/_mla/PlanarMechanics4.0.0/HTML/Sensors/../../Resources/Images/equations/equation-LZbFgA50.png)

![v_rel = transpose([cos(frame_resolve.phi), -sin(frame_resolve.phi),0;sin(frame_resolve.phi),cos(frame_resolve.phi),0;0,0,1]) * [cos(frame_a.phi),-sin(frame_a.phi), 0;sin(frame_a.phi), cos(frame_a.phi),0;0,0,1] * r_rela](../../../_mo/_mla/PlanarMechanics4.0.0/HTML/Sensors/../../Resources/Images/equations/equation-PGBmAMb7.png)
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_resolveInFrame | resolveInFrame | Frame in which output vector v_rel shall be resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve) | Structure | |
mo_resolveInFrame/choice1 | Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.world | Number | 0 | |
mo_resolveInFrame/choice2 | Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_a | Number | 0 | |
mo_resolveInFrame/choice3 | Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_b | Number | 0 | |
mo_resolveInFrame/choice4 | Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_resolve | Number | 0 |
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 | input | 1 |
frame_b | implicit | Coordinate system b | input | 2 |
v_rel | implicit | Vector of relative measurements from frame_a to frame_b on velocity level, resolved in frame defined by resolveInFrame | output | 1 |
Port 4 | implicit | Coordinate system in which v_rel is optionally resolved | output | mo_resolveInFrame.choice4 |