MATLAB Airplane Simulator
MATLAB Airplane Simulator
Objective
Create an airplane simulator in MATLAB that can be controlled externally with an Arduino and a joystick, and includes physical models of gravity, propeller thrust & torque, lift, drag, aerodynamic torques, and side-slip forces.
Outcome
The desired physics were modeled using aerodynamic equations of motion placed into MATLAB functions, and then solved using a custom 4th order Runge-Kutta solver. The solutions provide new coordinates for the airplane, which is repeatedly drawn in a 3D plot. The Arduino successfully controls the elevator command on one axis, the aileron command on the other axis, and the thrust using the joystick switch.