GETERROROPT is the optimisation objective function. GETERROROPT simply finds the error vector for a certain transformation. The function differs from geterrorvec in that it takes the transformation as a 1x6 vector with the rotation vector in rodrigues notation (Not Euler angles). INPUTS: deltaphi: 1x6 vector. First 3 are the translation offset. Last 3 are the rodrigues vector. Lpts: 3xN vector containing all the laser board points. Nc: 3xN vector containing the corresponding normal vector. OUTPUTS: errorvec: 1xN vector representing the errors for each point.
0001 function errorvec=geterroropt(deltaphi,Lpts,Nc) 0002 % GETERROROPT is the optimisation objective function. 0003 % 0004 % GETERROROPT simply finds the error vector for a certain transformation. 0005 % The function differs from geterrorvec in that it takes the transformation 0006 % as a 1x6 vector with the rotation vector in rodrigues notation (Not Euler 0007 % angles). 0008 % 0009 % INPUTS: 0010 % deltaphi: 1x6 vector. First 3 are the translation offset. Last 3 are 0011 % the rodrigues vector. 0012 % 0013 % Lpts: 3xN vector containing all the laser board points. 0014 % 0015 % Nc: 3xN vector containing the corresponding normal vector. 0016 % 0017 % OUTPUTS: 0018 % errorvec: 1xN vector representing the errors for each point. 0019 0020 delta=deltaphi(:,1); 0021 0022 phi=rodrigues(deltaphi(:,2)); 0023 0024 errorvec=geterrorvec(Lpts,Nc,delta,phi); 0025