For the past couple of months, I've been working on a new flight model for Infinite Runway.
It's much more complex than the previous implementation. The old system was very basic, a wing was represented as a single point of lift/drag which was computed as an average for a certain wing profile.
The lift coefficient was manually created from a graph which was hand tweaked in the flight model editor.
With all the fuss around X-Plane's so-called superior flight model, I figured it was time for Infinite Runway to step it up and evolve towards a better and more precise flight model.
The new system allows more control over the wing and it supports two modes of wing creation.
The first mode has the potential to be the most realistic. It relies on the definition of a wing shape which is used to compute a lift coefficient. It is based on the Joukowsky Airfoil and takes as input the parameters in the form of the NACA numbers. (Based on Nasa Foilsim)
For example, if you know the wing profile of a wing, you can enter it as a wing definition in Infinite Runway, and the simulator will compute the proper Lift Coefficient automatically.
The new design also handles multiple wing sections with parameters like camber, thickness, twist, area, angle... Each of these sections can be tied to inputs like roll, yaw... This allows the creation of complex wing designs. Since each of these sections can be divided in subsections, the granularity of the airfoil simulation becomes much greater than before.
After doing this, I realized that the model I was using to compute the lift coefficient was not the best in high angle of attack situations... It was behaving incorrectly, stalling too early or too abruptly...
I came to this conclusion... which is that I had two options:
- Either take a smart-pill and go back to the equations for lift coefficient computation... :-/
- Or allow users to provide their own airfoil system as a plugin... to allow smarter people than me to compute a proper coefficient based on the wing inputs.
Option 2 sounded much easier... now, about that second mode...
To test the design, I created a second airfoil computation system. The task of these systems is easy:
The simulator engine provides them with the wing sub-section parameters (area of the sub-section, thickness, chord, angle of attack, local velocity...) and all they have to do it return the lift coefficient and lift force for that sub-section.
The second airfoil system is based on lift tables... I figured, instead of computing the parameters on the fly each frame for each configurations of wing shapes, why not allow the user to feed its own lift table per section? (to match an angle of attack to its lift coefficient).
I added an import feature to load output data of JavaFoil, an online tool that does analysis of airfoils and can export data as csv files. I also added a curve editor to fine-tune these lift curves.
The result is much better than I anticipated. The aircraft feels much more realistic, and, more tweakable.
I'll leave it to the fans of Infinite Runway (me and ...?) to tweak those parameters and make the flight model super realistic!
So in the end, if you think Infinite Runway's flight model sucks... you have three options:
-
Go on every forum and start trolling? :o)
-
Modify the lift table to reflect the wing shape of your aircraft. There are 2 lift table per section, interpolated for each sub-sections, so the granularity is fine!
-
Code your own lift code to compensate for my lack of knowledge of aerodynamics :o)
Here's a slideshow of what the debug information looks like:
And some new videos of lame landings :)