Correct path of two functions

This commit is contained in:
Thomas Dehaeze 2020-03-23 10:04:09 +01:00
parent 9a9debfaf4
commit cf7e075e4e
2 changed files with 23 additions and 2 deletions

View File

@ -48,7 +48,7 @@
:END: :END:
<<sec:computeReferencePose>> <<sec:computeReferencePose>>
This Matlab function is accessible [[file:src/computeReferencePose.m][here]]. This Matlab function is accessible [[file:..//src/computeReferencePose.m][here]].
#+begin_src matlab #+begin_src matlab
function [WTr] = computeReferencePose(Dy, Ry, Rz, Dh, Dn) function [WTr] = computeReferencePose(Dy, Ry, Rz, Dh, Dn)
@ -129,6 +129,7 @@ This Matlab function is accessible [[file:src/computeReferencePose.m][here]].
WTr = Rty*Rry*Rrz*Rh*Rn; WTr = Rty*Rry*Rrz*Rh*Rn;
end end
#+end_src #+end_src
* Compute the Sample Position Error w.r.t. the NASS * Compute the Sample Position Error w.r.t. the NASS
:PROPERTIES: :PROPERTIES:
:header-args:matlab+: :tangle ../src/computeSampleError.m :header-args:matlab+: :tangle ../src/computeSampleError.m
@ -136,7 +137,7 @@ This Matlab function is accessible [[file:src/computeReferencePose.m][here]].
:END: :END:
<<sec:computeSampleError>> <<sec:computeSampleError>>
This Matlab function is accessible [[file:src/computeSampleError.m][here]]. This Matlab function is accessible [[file:..//src/computeSampleError.m][here]].
#+begin_src matlab #+begin_src matlab
function [MTr] = computeSampleError(WTm, WTr) function [MTr] = computeSampleError(WTm, WTr)

20
src/computeSampleError.m Normal file
View File

@ -0,0 +1,20 @@
function [MTr] = computeSampleError(WTm, WTr)
% computeSampleError -
%
% Syntax: [MTr] = computeSampleError(WTm, WTr)
%
% Inputs:
% - WTm - Homoegeneous transformation that represent the
% wanted pose of the sample with respect to the granite
% - WTr - Homoegeneous transformation that represent the
% measured pose of the sample with respect to the granite
%
% Outputs:
% - MTr - Homoegeneous transformation that represent the
% wanted pose of the sample expressed in a frame
% attached to the top platform of the nano-hexapod
MTr = zeros(4,4);
MTr = [WTm(1:3,1:3)', -WTm(1:3,1:3)'*WTm(1:3,4) ; 0 0 0 1]*WTr;
end