function parallelogramAngles
extends DeltaRobot.Icons.Function;
import Modelica.Math.atan2;
import TM = Modelica.Mechanics.MultiBody.Frames.TransformationMatrices;
input SI.Position p[3] "Coordinates of the platform frame resolved in base frame";
input SI.Distance L "Length of the upper arms";
input SI.Distance l "Length of the parallelograms (long side)";
input SI.Diameter Db "Base diameter";
input SI.Diameter Dp "Platform diameter";
input SI.Angle beta_base "Angle from the x-axis of the base frame to the direction where the joint #1 is located";
output SI.Angle angles[3, 3] "Rotation angles. In sequence: around upper revolute joint, parallelogram joint, lower revolute joint (angles[#parallelogram,#angle])";
end parallelogramAngles;