Skip to content

Get Euler angles from a rotation matrix

July 26, 2017
Matlab function:

function rho=fcn_EulerFromRotation(R)
% R is the rotation from body to world frame

% assume -pi/2<tht<pi/2

%R31=-sin(tht)
tht=-asin(R(3,1));

%R32=sin(phi)*cos(tht), R33=cos(phi)*cos(tht)
phi=atan2(R(3,2),R(3,3));

%R21=cos(tht)*sin(psi), R11=cos(tht)*cos(psi)
psi=atan2(R(2,1),R(1,1));

rho=[phi,tht,psi]';
Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: