"I got a slight bit carried away" -Josh Hurwitz
This project created a real-time 6-DOF flight simulator using C++ and Unreal Engine 5.3. I fit equations to the F-16 flight model from NASA wind tunnel data to create accurate physics. In addition, this simulator includes a full Heads Up Display (HUD), AIM-120 missiles, animated control surfaces and terrain data streamed from Google to allow for flight anywhere in the world. This was created as part of the MAE 6500 Flight simulation class offered at Utah State University, however, I added quite a bit more than was required in the class.
The simulator utilizes the quaternion-based flat earth equations of motion to integrate all states in real-time. This prevents gimbal lock without unduly increasing computational time.
The simulator utilizes a semi-nonlinear equation-based model for pseudo-aerodynamic forces. This allows for curve fits from any data source to be included in the flight simulator. It also allows for easy interchange of vehicles. These equations are also stall-corrected to allow for post-stall maneuvers
The simulator accurately models all the F-16 control surfaces including the speed brakes. Currently, the simulator does not include actuator dynamics, however, this is on the list of things to add to allow for the development of control systems
The simulator includes multiple view locations including a cockpit view as well as a chase cam. A dynamic HUD is modeled with important information for flight. The cockpit view includes a blackout effect for excessive g-loads that is calibrated to NASA data for time of consciousness under acceleration.
The data used to create the model was wind tunnel data published in NASA-TP-1538. This wind tunnel data was transformed and fit to curves to create the non-linear model. This data includes post-stall characteristics allowing for the stall model to be fit using a non-linear optimization algorithm.
An example of this process is shown here where the green line is the optimized lift vs alpha curve and the orange dots are wind tunnel data points from the NASA paper.
This simulator allows any aircraft to be loaded, providing the necessary coefficients can be determined. In addition, the simulator allows for CG shifts. This allows for the F-16 simulation to run without a controller as the CG is shifted forward to a stable point