% calculate uncertain relative rotation R12 = R1' * R2 Rp rotation pair, Rp.Rp=[R1,R2])[3x6], Rp.Cp = [6x6] Rd relative rotation, Rd.R=[3x3] , Rd.C= [3x3] J [3x6] Jacobian wf 5/2020
0001 function [Rd,J] = calc_relative_R(Rp) 0002 %% calculate uncertain relative rotation R12 = R1' * R2 0003 % 0004 % Rp rotation pair, Rp.Rp=[R1,R2])[3x6], Rp.Cp = [6x6] 0005 % 0006 % Rd relative rotation, Rd.R=[3x3] , Rd.C= [3x3] 0007 % J [3x6] Jacobian 0008 % 0009 % wf 5/2020 0010 0011 % R1 and R12 0012 R1 = Rp.Rp(:,1:3); 0013 Rd.R = R1' * Rp.Rp(:,4:6); 0014 % Jacobian and CovN 0015 J = [-R1' R1']; 0016 Rd.C = J * Rp.Cp * J'; 0017 0018 return