資源簡介
matlab simulink四旋翼模型,輸入為四個電機的電壓值,輸出為對應(yīng)的姿態(tài)角以及姿態(tài)角速度和三個方向的線加速度
代碼片段和文件信息
function?y=acceleration(upara)
phi?????=?u(1);
theta???=?u(2);
psi?????=?u(3);
thrust??=?u(4);
x_a?=?(sin(psi)*sin(phi)+cos(psi)*sin(theta)*cos(phi))*thrust/para.m;
y_a?=?(-cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*thrust/para.m;
z_a?=?cos(theta)*cos(phi)*thrust/para.m-para.g;
y=[x_ay_az_a];
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????313??2015-03-27?16:31??acceleration.m
?????文件????????456??2015-03-29?01:01??Omega2Dpqra.m
?????文件??????46845??2015-03-29?14:02??Volt2Euler.mdl
-----------?---------??----------?-----??----
????????????????47614????????????????????3
評論
共有 條評論