dcmfromeulertest.m

来自「飞行器姿态角的欧拉角表示方法与余弦矩阵表示方法的matlab转换程序」· M 代码 · 共 42 行

M
42
字号
clc, close all,clear all,format compact

% % rotation angles in radians
roll=1.5;
pitch=1.2;
yaw=2.3;

% % Rotation sequence can be given either in r, p, y format or in X,Y,Z format
% % roll=r=X
% % pith=p=Y
% % yaw=y=Z

disp('Sequence of rotation: rpy'); 
DCM=dcmfromeuler(roll,pitch,yaw,'rpy') % order is roll-->pith-->yaw OR X-->Y-->Z

disp('Sequence of rotation: ryp');
DCM=dcmfromeuler(roll,pitch,yaw,'ryp')

disp('Sequence of rotation: pry'); 
DCM=dcmfromeuler(roll,pitch,yaw,'pry')

disp('Sequence of rotation: pyr');
DCM=dcmfromeuler(roll,pitch,yaw,'pyr')

disp('Sequence of rotation: yrp');
DCM=dcmfromeuler(roll,pitch,yaw,'yrp')

disp('Sequence of rotation: ypr');
DCM=dcmfromeuler(roll,pitch,yaw,'ypr')


% % -------------------------------------------------------------------------
% % This program or any other program(s) supplied with it does not provide any
% % warranty direct or implied. This program is free to use/share for
% % non-commercial purpose only, for any other usage contact with author.
% % Kindly reference author.
% % Thanking you.
% % @ Copyright M Khan
% % Email: mak2000sw@yahoo.com
% %        mak2000@GameBox.net 
% % http://www.geocities.com/mak2000sw

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?