This MATLAB class can take the outputs from RIT MECE-410 (Flight Dynamics) Project 4 and animate the aircraft motion using the resulting data in a 3D plot. It will help students visualize the meaning of the various plots and gain an intuitive understanding of the equations of motion.
Created by Kenny Kim, Brian Le, and Tyler Rodgers in Spring 2022.
Place PlaneAnimation.m
in the same folder as the Project 4 script and insert the following line of code. Change some of the variables/data types if need be.
PlaneAnimation.run(Vt, alpha, beta, phi, theta, psi, time, "Extreme Input", false);
All vectors should have the same length.
Vt
: Vector of true velocity dataalpha
: Vector of angle of attack data in degreesbeta
: Vector of sideslip data in degreesphi
: Vector of bank angle data in degreestheta
: Vector of pitch angle data in degreespsi
: Vector of heading angle data in degreestime
: Vector of time steps in secondsplotTitle
: String of what to make the title of the plotexportVideo
: Boolean of whether frames of animation should be captured and saved in a .avi file
The equations used in this class still need double-checking. Accuracy is not yet guarenteed.