first I have the ''Evaluate called 30 times'' following which I had to break my statements.
next I receive the error " division by zero'' for which I replaced 22/7 with PI and it works.
And then I have incorrect results.
Code: Select all
void joint_space(float p_foot, float q_foot)
int alpha = 188;
float p = sqrt(sq(p_foot) + sq(q_foot));
float beta = atan(p_foot/q_foot) * 180*7/22;
theta_j3 = acos((sq(l1) +sq(l2) -sq(p)) / (2*l1*l2)) * 7*180/22;
theta_j4 = 180 + asin(l2/p * sin(theta_j3*22/7/180)) * 180*7/22 - beta;
theta_j2 = 355 - (theta_j4-180) - theta_j3;