Ticket #4212: TestCrossFunction.mo
| File TestCrossFunction.mo, 418 bytes (added by , 9 years ago) |
|---|
| Line | |
|---|---|
| 1 | model TestCrossFunction |
| 2 | import Modelica.Mechanics.MultiBody.Frames; |
| 3 | Frames.Orientation R = Frames.nullRotation(); |
| 4 | Real v1[3], v2[3]; |
| 5 | |
| 6 | function f |
| 7 | input Frames.Orientation R; |
| 8 | input Real v1[3]; |
| 9 | output Real v2[3]; |
| 10 | algorithm |
| 11 | v2 := Frames.resolveRelative(cross(Frames.angularVelocity2(R), v1), R, R); |
| 12 | end f; |
| 13 | |
| 14 | equation |
| 15 | v1 = {0, 0, 0}; |
| 16 | v2 = f(R, v1); |
| 17 | end TestCrossFunction; |
