资源简介
Small Unmanned Aircraft:Theory and Practice 源码,小型无人机学习必备书籍项目源码,包含很多示例,全部由MATLAB/Simulink编写。
(The source code of Small Unmanned Aircraft:Theory and Practice,which is the best text for the beginers.)
代码片段和文件信息
function drawPathError(uuVFcolors)
% process inputs to function
pn = uu(1); % inertial North position
pe = uu(2); % inertial East position
pd = uu(3); % inertial Down position
u = uu(4); % body frame velocities
v = uu(5);
w = uu(6);
phi = uu(7); % roll angle
theta = uu(8); % pitch angle
psi = uu(9); % yaw angle
p = uu(10); % roll rate
q = uu(11); % pitch rate
r = uu(12); % yaw rate
t = uu(13); % time
NN = 13;
flag_path = uu(1+NN); % path flag
r_path = [uu(3+NN); uu(4+NN); uu(5+NN)];
q_path = [uu(6+NN); uu(7+NN); uu(8+NN)];
c_orbit = [uu(9+NN); uu(10+NN); uu(11+NN)];
rho_orbit = uu(12+NN);
lam_orbit = uu(13+NN);
% define persistent variables
persistent aircraft_handle; % figure handle for MAV
% first time function is called initialize plot and persistent vars
if t==0
figure(1) clf
S = 500;
switch flag_path
case 1
XX = [r_path(1) r_path(1)+S*q_path(1)];
YY = [r_path(2) r_path(2)+S*q_path(2)];
ZZ = [r_path(3) r_path(3)+S*q_path(3)];
case 2
N = 100;
th = [0:2*pi/N:2*pi];
XX = c_orbit(1) + rho_orbit*cos(th);
YY = c_orbit(2) + rho_orbit*sin(th);
ZZ = c_orbit(3)*ones(size(th));
end
plot3(YYXX-ZZ‘r‘)
hold on
aircraft_handle = drawBody(VFcolors...
pnpepdphithetapsi...
[] ‘normal‘);
title(‘UAV‘)
xlabel(‘East‘)
ylabel(‘North‘)
zlabel(‘-Down‘)
view(090) % set the view angle for figure
axis([-SS-SS-.1 S]);
grid on
% at every other time step redraw MAV
else
drawBody(VFcolors...
pnpepdphithetapsi...
aircraft_handle);
end
% figure(1) plot3(pepn-pd‘.k‘);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function handle = drawBody(VFcolors...
pn pe pd phi theta psi...
handle mode)
V = rotate(V‘ phi theta psi)‘; % rotate rigid body
V = translate(V‘ pn pe pd)‘; % translate after rotation
% transform vertices from NED to XYZ (for matlab rendering)
R = [...
0 1 0;...
1 0 0;...
0 0 -1;...
];
V = V*R;
if isempty(handle)
handle = patch(‘Vertices‘ V ‘Faces‘ F...
‘FaceVertexCData‘colors...
‘FaceColor‘‘flat‘...
‘EraseMode‘ mode);
else
set(handle‘Vertices‘V‘Faces‘F);
drawnow
end
end
%%%%%%%%%%%%%
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3685 2010-10-22 16:09 SUAV\chap10_follow\drawPathError.m
文件 67311 2010-11-01 10:51 SUAV\chap10_follow\mavsim_chap10.mdl
文件 36175 2010-10-22 16:09 SUAV\chap10_follow\mavsim_chap10_model.mdl
文件 1920 2010-11-01 11:00 SUAV\chap10_follow\path_follow.m
文件 1687 2010-11-01 10:50 SUAV\chap10_follow\path_manager_chap10.m
文件 1151 2010-10-22 15:09 SUAV\chap11_manager\createWorld.m
文件 8757 2010-10-22 15:09 SUAV\chap11_manager\drawEnvironment.m
文件 3685 2010-10-22 15:09 SUAV\chap11_manager\drawPathError.m
文件 3459 2010-11-08 13:30 SUAV\chap11_manager\dubinsParameters.m
文件 67853 2010-10-22 15:09 SUAV\chap11_manager\mavsim_chap11.mdl
文件 38890 2010-10-22 15:09 SUAV\chap11_manager\mavsim_chap11_model.mdl
文件 563 2010-11-11 18:31 SUAV\chap11_manager\param_chap11.m
文件 2542 2010-11-08 13:30 SUAV\chap11_manager\path_manager.m
文件 6775 2010-11-08 13:38 SUAV\chap11_manager\path_manager_dubins.m
文件 3255 2010-11-08 13:35 SUAV\chap11_manager\path_manager_fillet.m
文件 2621 2010-11-08 13:33 SUAV\chap11_manager\path_manager_line.m
文件 1646 2010-11-08 13:31 SUAV\chap11_manager\path_planner_chap11.m
文件 67861 2010-10-22 15:09 SUAV\chap12_plan\mavsim_chap12.mdl
文件 40340 2010-11-15 09:52 SUAV\chap12_plan\mavsim_chap12_model.mdl
文件 4146 2010-10-22 15:09 SUAV\chap12_plan\path_planner.m
文件 5962 2010-11-15 13:09 SUAV\chap12_plan\planCover.m
文件 8174 2010-10-22 15:09 SUAV\chap12_plan\planRRT.m
文件 4338 2010-11-22 09:23 SUAV\chap13_camera\camera.m
文件 13102 2010-11-22 09:24 SUAV\chap13_camera\drawEnvironmentCamera.m
文件 2432 2010-11-29 12:52 SUAV\chap13_camera\geolocation.m
文件 6535 2010-10-22 15:09 SUAV\chap13_camera\gimbal.jpg
文件 3729 2010-10-22 15:09 SUAV\chap13_camera\gimbal.m
文件 84251 2010-10-22 15:09 SUAV\chap13_camera\mavsim_chap13_geolocation.mdl
文件 55299 2010-10-22 15:09 SUAV\chap13_camera\mavsim_chap13_geolocation_model.mdl
文件 78323 2010-10-22 15:09 SUAV\chap13_camera\mavsim_chap13_gimbal.mdl
............此处省略156个文件信息
相关资源
- 恒压频比交流调速MATLAB仿真
-
simuli
nk仿真三相异步电动机的起动过 -
Simuli
nk单向感应电动机仿真模型 -
基于SIMUli
nk的F-14俯仰轴仿真程序代 - 双dq锁相环 算法matlab仿真
-
柴油机SIMUli
nk模型.rar - 大规模DFIG风电场的模型
-
工程用光伏电池 matlab simuli
nk 仿真模 -
直流电机制动simuli
nk仿真 - 模型预测控制MPC模型预测电流控制,
- 基于matlab的单相半波可控整流电路的
- 双馈风式风力发电机仿真.slx
- 双PWM调速系统的仿真模型.rar
- SAR ADC模型
- MATLAB实现SVPWM
- 车辆ABS系统滑移率Bang-Bang、PID控制模
- matlab整流电路
-
基于simuli
nkpq检测STATCOM的三角波控制 -
基于simuli
nk无锁相环检测STATCOM的三 -
qpsk调制解调器simuli
nk仿真 -
buck电路simuli
nk仿真(参数调好直接 -
BCH编码与解码的simuli
nk仿真 - 神经网络控制,有s模块源码及simuli
-
数字基带调制解调 simuli
nk仿真 -
QPSK调制与解调的simuli
nk仿真 - 基于MATLAB卫星姿态建模自适应PID仿真
-
simuli
nk串级控制模块 -
单相斩控电源的simuli
nk仿真 - 直流电机双闭环调试
-
单相逆变器驱动simuli
nk仿真
评论
共有 条评论