dzimmer / PlanarMechanics

A free Modelica library for planar mechanical multi-body systems
BSD 3-Clause "New" or "Revised" License
29 stars 23 forks source link

Normalized versor of Prismatic Joint shouldn't be of type Distance #156

Closed dariomangoni closed 3 years ago

dariomangoni commented 3 years ago

The parameter e of the PlanarMechanics.Joints.Prismatic component is declared to be of type Distance, that in turns embeds the range limitation of min=0; however, since e=r/l and assuming that r is a generic direction (i.e. not necessarily in the first quadrant) then I think that e should be of type Position as well.

tobolar commented 3 years ago

It even shows e being unitless unit vector. Considering e=r/l with both r and l being of unit meter, e must have no unit. This also corresponds to r0 = e0*s with e0 = R*e, where both r0 and s (joint position, scalar) are of unit meter. Thus, both eand e0 must be unitless real. I will change the type of e corrspondingly.