├── README.md └── 无人机轨迹跟踪仿真 ├── README.txt ├── demo.slx ├── drone.m └── run.m /README.md: -------------------------------------------------------------------------------- 1 | # MATLAB-Trajectory-Tracking-Control-for-UAV 2 | [MATLAB] Trajectory Tracking Control for UAV 3 | 4 | 先运行demo.slx 5 | 6 | 可以在demo.slx中修改期望轨迹 7 | 8 | 再运行run.m 9 | -------------------------------------------------------------------------------- /无人机轨迹跟踪仿真/README.txt: -------------------------------------------------------------------------------- 1 | 先运行demo.slx 2 | 3 | 可以在demo.slx中修改期望轨迹 4 | 5 | 再运行run.m -------------------------------------------------------------------------------- /无人机轨迹跟踪仿真/demo.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chenan-W/MATLAB-Trajectory-Tracking-Control-for-UAV/c9bb0e6cb557f5c4d1b980b9e51b08c289cdc6fb/无人机轨迹跟踪仿真/demo.slx -------------------------------------------------------------------------------- /无人机轨迹跟踪仿真/drone.m: -------------------------------------------------------------------------------- 1 | function [point1_trans,point2_trans,point3_trans,point4_trans] = drone(phi,theta,psai) 2 | Cbn = [cos(psai)*cos(theta),cos(psai)*sin(theta)*sin(phi)-sin(psai)*cos(phi),... 3 | sin(theta)*cos(phi)*cos(psai)+sin(phi)*sin(psai);... 4 | sin(psai)*cos(theta),cos(phi)*cos(psai)+sin(phi)*sin(theta)*sin(psai),... 5 | sin(theta)*cos(phi)*sin(psai)-sin(phi)*cos(psai);... 6 | -sin(theta),cos(theta)*sin(phi),cos(theta)*cos(phi) 7 | ]; 8 | 9 | x0 = 0; y0 = 0; z0 = 0; 10 | point1 = [x0-1,y0,z0]; point2 = [x0+1,y0,z0]; 11 | point3 = [x0,y0-1,z0]; point4 = [x0,y0+1,z0]; 12 | point1_trans = Cbn*point1';point2_trans = Cbn*point2'; 13 | point3_trans = Cbn*point3';point4_trans = Cbn*point4'; 14 | end -------------------------------------------------------------------------------- /无人机轨迹跟踪仿真/run.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chenan-W/MATLAB-Trajectory-Tracking-Control-for-UAV/c9bb0e6cb557f5c4d1b980b9e51b08c289cdc6fb/无人机轨迹跟踪仿真/run.m --------------------------------------------------------------------------------