Matthieu LABAN
.NET, My Life, Flight Simulation and Real Flight...

 
About Me :
25 Years old developer and aviation
enthusiast living in Santa Clara, California.
View Matthieu Laban's profile on LinkedIn 
Contact me at :
mlaban at gmail dot com


Photo & Video Galleries:
- Gallery List
- Flight Videos
Resume :
e-mail me to get my latest résumé
Propellers in Infinite Runway 

I'm glad to say that aircrafts in Infinite Runway are finally being propelled by actual computation of lift coming from rotating airfoils :)
 
In my last post, I wrote that I needed the following to properly simulate the propeller:

  • propeller pitch
  • propeller blade velocity at a specific angle (relative to the propeller itself)
  • airflow velocity (relative to the airplane)
  • angle of attack at a specific rotation point (function of the propeller blade velocity above, and the airflow velocity)
  • propeller RPM
  • air density
  • propeller diameter

It wasn't that difficult afterall. I managed to get all these info from a few vector computations. (except the air density, which is coming from elsewhere)
 
To get the lift generated by a blade, Infinite Runway does the following: 

  1. Get the velocity in feet/min of the propeller at 3 O'clock (the descending one)
  2. Create a vector pointing downward from the propeller blade
  3. Get the aircraft velocity at that point on the blade (taking into account the wind)
  4. Substract these two vectors to get a vector representing the velocity of the blade relative to the air flow
  5. Compute blade pitch vector. (Point a vector down, and rotate it by 'Pitch' degrees)
  6. Get angle of attack of the blade by computing the dot product between the normalized results of 4 and 5.
  7. Run this angle of attack and blade velocity (length of non normalized result of 5) through the code used to compute lift/drag for wings (which takes into account the atmospheric pressure, amongst other parameters)
  8. Get the lift force, and apply it on the PhysX model.
  9. Repeat for 9 O'Clock (some small tweaks and vector inversions required obviously)

This gives pretty accurate results. With the previous model, where a simple force was applied, it was easy to reach over VNE during stable flight.
Now, it is much more difficult as the angle of attack of the propeller blades will decrease with the airspeed, decreasing the generated lift required to accelerate the aircraft further. A variable pitch would be required in this case.
 
Also, this takes care of the P-Factor as during climb and high power settings, the descending prop will have both a greater angle of attack and a higher forward speed than the ascending one. This combinaison of factors cause more lift to be generated from the descending blade (3 O'Clock position), inducing a yaw to the left, which is why we have to apply right rudder on take off on most airplanes.

Below is a video showing the result of the blades lift generation.
Graphs:

  1. Difference between left/right angle of attack
  2. Right Blade angle of attack
  3. Left Blade angle of attack
  4. Right blade speed
  5. Left blade speed
  6. Overall angle of attack of the airplane. (not wing specific)

The first graph is the most representative of the effect where we see that both blades don't have the same angle of attack for any given aircraft pitch attitude. Click on the link below the video to view it in High Def and see the graphs in crystal clear quality ;)

Vector colors:

  • Blue is current aircraft velocity
  • Red is aircraft Up
  • Green is the pitch
  • Yellow is the current blade velocity


P-Factor Tests in Infinite Runway from Matt on Vimeo.

Propeller Simulation 

The more I read about it, the more I feel like propulsion theory, although very similar to regular airfoil theory, is much more complicated...
There are lots of variables that come into play when trying to simulate this. I'm currently trying to gather some data, formulas, papers about blade theory...
The problem is that some of them go way beyond what I could implement easily in Infinite Runway.

The hard task is to find the right balance between a flight simulator, and a propeller simulator... Gosh! there are complete books about this topic!
If I were to implement a propeller as real as possible, it would take me years, and Infinite Runway could be renamed "Incredibly Precise Propulsion Simulator" but it would stink at everything else... (flight model, 3D graphics...)

The current approximation I'm targeting right now is how to accurately compute the thrust at 4 or more points on the propeller blade.

This requires a few variables:

  • propeller pitch
  • propeller blade velocity at a specific angle (relative to the propeller itself)
  • airflow velocity (relative to the airplane)
  • angle of attack at a specific rotation point (function of the propeller blade velocity above, and the airflow velocity)
  • propeller RPM
  • air density
  • propeller diameter
  • ???

That is a lot of inputs... So far, I've found only pieces of the solution, no magical all-in-one formula...

I was thinking that using my current system to calculate lift for the wings would work for the propeller as well though... since the blades are wings really, only small rotating wings... they can for instance, stall, just like real wings...

I'm mentioning this part, since propeller handling in Infinite Runway has always been very badly implemented... It's always been a force applied where the prop would be... Not really what happens in real life... but it follows the Infinite Runway principle...

"It's not optimal, but it'll do until I come back to it later on... in the mean time, I can work on something else that's much more fun" :)

Anyway, I'm focusing on this because I wanted to implement P-Factor in a more realistic way, and that effect cannot really be simulated with a 1 point thrust... or well, it could... I could just offset the thrust force to the right of the prop based on the angle between the aircraft's 'at' and its velocity...
The only issue is that this offset would probably have to be set by the airplane designer... It's a simple approximation but it doesn't completely solve the underlying problem, which is that prop pitch, lift and such are not handled in a correct way.

The 4 points approach I mentioned above might (should?) solve the P-Factor issue as well as the proper thrust/airspeed problem...

We'll see how it goes...

Silverlight DeepEarth Tests 

Tonight I played a but with an open source silverlight project called DeepEarth. It's basically a Silverlight implementation of Microsoft Virtual Earth. It has smooth scrolling and panning and blending between different layers.

They have a live demo up here.

Of course, having tons of flight tracks handy, I thought I would add the functionnality to show them. The project doesn't currently support dynamic objects besides simple pins. But the code is clear enough, adding new features was extremely easy...

I added a simple line drawer with an open dialog to import a track file coming from my GPS Tracker.

Here's the result for a touch a go practice at Oakland last year. :)

I have some ideas about what to do with this... we'll see how it goes ;-)

Progress with PhysX 

Lots of progress has been done on the PhysX front... My initial frustrations, although not completely gone have been mostly solved...

I now have OK ground behavior and am making progress on the flight front... I've updated two aircrafts so far, the Cessna 150 and the Citabria 7ECA.
Interestingly enough, the Citabria feels much more realistic than the Cessna 150.

Infinite Runway now can handle much more precise weight and balance configuration. I added a new system to configure shapes with weights that can be placed at different relative locations on the airplane. It's really nice to tweak the shapes that way to make the weight and balance as real as possible.



The next step from here will be to add new PhysX related things... I thought today that the Wind Sock could actually be simulated like a cloth! How cool would this be??

Now take a look at the following videos showing two wheel landing, a 3 point landing followed by a prop strike :)

Sorry about the poor quality of these videos... Vimeo had issues tonight and none of my uploads actually made it through. Youtube might have the HD version sometime tomorrow though...

 


Citabria Wheel Landing - Infinite Runway from Matt on Vimeo.

This last one shows a couple mishaps in the 150 :-)


Mishaps in Infinite Runway from Matt on Vimeo.