I recently purchased the textbook “Aircraft Control and Simulation” by Brian L. Stevens, Frank L. Lewis, and Eric N. Johnson . This book covers the control and simulation of aircraft. It’s really dense and frankly hard to understand. As far as aerodynamics texts go, it’s pretty typical.
One interesting item in the appendices of the book is the source code for the simulation of an F-16. It has a flight model, based on scale model wind tunnel data. The flight model consists of a dozen lookup tables and the math equations to make it fly.
The only problem: it’s written entirely in Fortran.
The source code is available on Github.
You can play the finished project right now on itch.io
<a href=”https://vazgriz.itch.io/f-16-flight-sim”>F-16 Flight Sim by vazgriz</a>
Or watch the demo on Youtube:
While I am a professional software engineer and I have worked in the aerospace industry, that doesn’t mean that I understand what I’m doing.
Introduction
In previous posts on this blog , I covered the development of a flight simulator based on the lift equation and hand-tuned parameters. This gives the game designer direct control over a lot of flight parameters. For example, you can directly choose the turn rate and the G-limit of the aircraft, allowing the designer to easily tune the corner speed. This works well for game development, since the designer, and ultimately the player, care more about these high-level parameters.
... continue reading