angvec2dcm

PURPOSE ^

ANGVEC2DCM gets the direction cosine matrix from the Euler angles.

SYNOPSIS ^

function [phi,phix,phiy,phiz,dphix,dphiy,dphiz]=angvec2dcm(rot)

DESCRIPTION ^

 ANGVEC2DCM gets the direction cosine matrix from the Euler angles.

 ANGVEC2DCM gets the direction cosine matrix from the Euler angles.

 CONVENTION:
     Let Ri be the rotation matrix that rotates the 'axes' about axis i.
     Then phi=Rz*Ry*Rx. See angvec2dcm for further details.
 
 INPUTS:
     rot: 3x1 vector of Euler angles.
 
 OUTPUTS:
     phi: 3x3 rotation matrix.
 
     phix: x rotation matrix.
 
     phiy: y rotation matrix.
 
     phiz: z rotation matrix.
 
     dphix: x differential rotation matrix.
 
     dphiy: y differential rotation matrix.
 
     dphiz: z differential rotation matrix.
 
 Abdallah Kassir 1/3/2010

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [phi,phix,phiy,phiz,dphix,dphiy,dphiz]=angvec2dcm(rot)
0002 % ANGVEC2DCM gets the direction cosine matrix from the Euler angles.
0003 %
0004 % ANGVEC2DCM gets the direction cosine matrix from the Euler angles.
0005 %
0006 % CONVENTION:
0007 %     Let Ri be the rotation matrix that rotates the 'axes' about axis i.
0008 %     Then phi=Rz*Ry*Rx. See angvec2dcm for further details.
0009 %
0010 % INPUTS:
0011 %     rot: 3x1 vector of Euler angles.
0012 %
0013 % OUTPUTS:
0014 %     phi: 3x3 rotation matrix.
0015 %
0016 %     phix: x rotation matrix.
0017 %
0018 %     phiy: y rotation matrix.
0019 %
0020 %     phiz: z rotation matrix.
0021 %
0022 %     dphix: x differential rotation matrix.
0023 %
0024 %     dphiy: y differential rotation matrix.
0025 %
0026 %     dphiz: z differential rotation matrix.
0027 %
0028 % Abdallah Kassir 1/3/2010
0029 
0030 phix=[1,0,0;
0031       0,cos(rot(1)),sin(rot(1));
0032       0,-sin(rot(1)),cos(rot(1))];
0033 phiy=[cos(rot(2)),0,-sin(rot(2));
0034       0,1,0;
0035       sin(rot(2)),0,cos(rot(2))];
0036 phiz=[cos(rot(3)),sin(rot(3)),0;
0037       -sin(rot(3)),cos(rot(3)),0;
0038       0,0,1];
0039 
0040 if nargout>1
0041     dphix=[0,0,0;
0042            0,-sin(rot(1)),cos(rot(1));
0043            0,-cos(rot(1)),-sin(rot(1))];
0044     dphiy=[-sin(rot(2)),0,-cos(rot(2));
0045            0,0,0;
0046            cos(rot(2)),0,-sin(rot(2))];
0047     dphiz=[-sin(rot(3)),cos(rot(3)),0;
0048            -cos(rot(3)),-sin(rot(3)),0;
0049            0,0,0];
0050 end
0051 
0052 % phi=angle2dcm(rot(1),rot(2),rot(3),'xyz'); % requires aerospace toolbox
0053 phi=phiz*phiy*phix;
0054 end

Generated on Thu 08-Apr-2010 14:35:09 by m2html © 2005