Skip to content

Commit 6deee9f

Browse files
authored
Merge pull request #4194 from HansOlsson/RemoveUnitFrom
Correct units for normalizing vectors.
2 parents a804e39 + 4ada630 commit 6deee9f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Modelica/Math/package.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ v = {2, -4, -2, -1};
255255
input Real v[:] "Real vector";
256256
input Real eps(min=0.0)=100*Modelica.Constants.eps
257257
"if |v| < eps then result = v/eps";
258-
output Real result[size(v, 1)] "Input vector v normalized to length=1";
258+
output Real result[size(v, 1)](each final unit="1") "Input vector v normalized to length=1";
259259

260260
algorithm
261261
/* This function has the inline annotation. If the function is inlined:

Modelica/Mechanics/MultiBody/Frames/TransformationMatrices/from_nxy.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ function from_nxy "Return orientation object from n_x and n_y vectors"
44
import Modelica.Math.Vectors.length;
55
import Modelica.Math.Vectors.normalize;
66

7-
input Real n_x[3](each final unit="1")
7+
input Real n_x[3]
88
"Vector in direction of x-axis of frame 2, resolved in frame 1";
9-
input Real n_y[3](each final unit="1")
9+
input Real n_y[3]
1010
"Vector in direction of y-axis of frame 2, resolved in frame 1";
1111
output TransformationMatrices.Orientation T
1212
"Orientation object to rotate frame 1 into frame 2";

Modelica/Mechanics/MultiBody/Frames/from_nxy.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
within Modelica.Mechanics.MultiBody.Frames;
22
function from_nxy "Return fixed orientation object from n_x and n_y vectors"
33
extends Modelica.Icons.Function;
4-
input Real n_x[3](each final unit="1")
4+
input Real n_x[3]
55
"Vector in direction of x-axis of frame 2, resolved in frame 1";
6-
input Real n_y[3](each final unit="1")
6+
input Real n_y[3]
77
"Vector in direction of y-axis of frame 2, resolved in frame 1";
88
output Orientation R "Orientation object to rotate frame 1 into frame 2";
99
algorithm

Modelica/Utilities/Internal.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ package PartialModelicaServices
2121
"Position vector from origin of world frame to origin of object frame, resolved in world frame" annotation(Dialog);
2222
input SI.Position r_shape[3]={0,0,0}
2323
"Position vector from origin of object frame to shape origin, resolved in object frame" annotation(Dialog);
24-
input Real lengthDirection[3](each final unit="1")={1,0,0}
24+
input Real lengthDirection[3]={1,0,0}
2525
"Vector in length direction, resolved in object frame" annotation(Dialog);
26-
input Real widthDirection[3](each final unit="1")={0,1,0}
26+
input Real widthDirection[3]={0,1,0}
2727
"Vector in width direction, resolved in object frame" annotation(Dialog);
2828
input SI.Length length=0 "Length of visual object" annotation(Dialog);
2929
input SI.Length width=0 "Width of visual object" annotation(Dialog);

0 commit comments

Comments
 (0)