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é
V-Tail Support (sort of) 

For the longest time, simulating the rudder in Infinite Runway has been a big problem.
I remember in the early days of the simulator how much I struggled with matrix transformations to compute the right forces...
During turns, the airplane would slip or do completely weird things because the forces were not applied with the right transformation.
What painful times, but in a way, it made me feel like an 21st century aviation pioneer ;-)

I had solved this problem by simply adding support for a vertical wing and hard coding a bunch of things in the wing section code to transform the vectors in the proper space...

Fast forward to the today... I wanted to get back to engine/propeller simulation and I noticed that my propeller blades were using the old airfoil system which was okay, but not as precise as the new system which supports plugin airfoils and better support for multiple profiles along a wing.

The idea was to use the new wing system and actually attach wings as the blades of the propeller... problem was, there was roughly any support for wings that were other than 0 or 90 degrees of rotation on the longitudinal axis let alone wings that were facing up or down :-/ (remember, the hard coded thing...)

I then went back to the code that handled the angle of attack/lift/drag vector computation and tried to figure out how to get those value correctly once and for all :)

After a bit of matrix transformation struggles, I finally got the vectors in order and my first test was to build an experimental model with a V-Tail style rudder. I gotta say, it works great :) It's not like a real V-Tail where it handles both the rudder and the elevator, but more like an Hybrid version of a regular elevator and a split rudder...
I uploaded a video below to demonstrate the handling of the flight model.

This is a pretty good step forward because it will allow all sorts of wing types to be added to the airplane... some that come to mind are STOL Kits, struts, winglets, and propeller blades.
The big advantage of using this new wing system is that in the example of a propeller, i'll be able to simulate the drag generated by a idling propeller, or the drag of the wing struts. This opens lots of doors, and is even better when you think that all these wings can use the custom plugin model to compute the forces, so if anyone is not happy with the drag computation of a particular foil, they can replace it with their own math :)

-

In other news, I'm getting close to welcoming my second partner in this sim effort (First partner being Brian K. who did the modelling of the 172 in the video).
Philippe, a friend of mine from school and colleague from my FXComposer days @ NVIDIA has expressed interest in working on the terrain. I really enjoyed working with him @ NVIDIA so I think it could work out great! At least I could get back to focusing mainly on simulation stuff :)

Happy Landings!
(Follow me on twitter @ twitter.com/mlaban)

Update on Infinite Runway 

I'm in the middle of a move to a new apartment, so I haven't had time to code much on the sim, however, some progress has been made since last update.

I've mostly been working on the database for the world data.
What I'm trying to achieve is to simplify the vector data I'm getting from the Open Street Map database as well as the coastlines file to make things usable in real time in Infinite Runway.
The complexity and size of the database make it impossible to use it directly without some sort of pre-processing.

The first step in building ground textures is to figure out if we are dealing with land or ocean.
I initially thought I could use the OSM coastline database, however it turns out it's way too precise and it's extremely complicated to retrieve in a format that is easy to process.
After reading about the subject and how the guys at OSM were building their coastline data, I crawled my way to a filed called processed_p.shp which contains the world coastlines at a precision that fits my needs.
I then wrote some code to upload all the shapes to a database and updated my scenery builder to output the combined (simplified) shapes in files for quads of 10 degrees of latitude and longitude.
I'm quite happy with the results, the data loads extremely quickly from the simplified files and I can show a map of the entire world in a few seconds.

My next step is to create the files for the landclass, roads and various other types of landscape features. I'm currently building a path simplifier to reduce the number of points on roads while preserving their overall shape.

I recently exchanged some emails with Curtis Olson of FlightGear (very nice guy btw!) and he told me that everything about building a flight sim is always 10 times more complicated than you think at first, but that you eventually learn 10 times more than you thought...

I can totally relate to this with what I'm doing now, I'm amazed by the fact that building a simulator can take me to places like writing stored procedures for faster database queries... :)

I've been thinking lately that I might have another person join me in this insane flight simulator project... I like building the terrain system but I have to admit that making planes fly is much more interesting to me than dealing with threaded loading of quad tree elements...
I have a friend who would be interested in working on just that... I still need to think about it though :)

Infinite Runway Status 

I haven't written about Infinite Runway in a while, but development still has been progressing...

Here's a quick status update:

- Flight Dynamics
Lots of progress here, I finished the separation of the flight model with the flight simulator engine. The airfoils are now defined in plugins so that if an airplane requires a very specific airfoil, or if someone figures out a better way to simulate lift/drag vs velocity/AOA, they can code their own system and use it.
There is no default embedded airfoil model, the default airfoil is also a plugin.
The engines use the same plugin system, so anybody with a little knowledge in C# could rewrite an engine plugin.

- Terrain
I've made lots of progress on the terrain as well, eliminated lots of leaks and added better support for a floating origin. The floating origin is necessary for huge streamed worlds such as the one in IR. The current system is not the best, the terrain and objects are recomputed when the airplane flies too far from the origin. I've solved the last remaining issue I had with PhysX and global position updates of an actor today, so I'm close to being ready for the ultimate test flight I've bee wanting to fly for a while: an autopilot controlled flight from Palo Alto to Santa Monica :)
I've been leaving the game fly around for about 2 hours as I'm writing this blog post, it's been going  just fine. Started from Palo Alto, flew to Moffet, San Jose, Reid Hillview, Tracy and now the plane is steady on the autopilot on a straight light to Sacramento Executive :)

- Roads, Land class
One thing that is missing in IR is the default terrain. The current system supports satellite pictures but it doesn't have any support for generic terrain when flying outside of areas with satellite image coverage.
I started working on a scenery database using Open Street Map. It does some basic parsing and works in small areas. The plan is to build a huge file system database of the land class, roads, water ways and other features that IR will use to create its textures. I will probably use a system similar to the one described ACES Adam Szofran's paper.
I tried importing a subset of the road database around Palo Alto, just to make sure it worked, and sure enough, the roads and the satellite image match perfectly :) (see screenshots)

New Flight Model 

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 :)



Some thoughts about X-Plane 

I've had some more time to play with X-Plane in the past week... And I have to say, I'm mostly disagree about what X-Plane fans are saying about it...

Here are some things that come to mind about X-Plane...

Flight Model
That's the one thing we hear all the time about X-Plane, that the flight model is so realistic, it blows FS to the ground... I understand that it is used by numerous companies to test their designs, but what I'm not clear about is the claim that you can just put a plane in X-Plane and it JUST WORKS (all caps, X-Plane style ;))
 
I haven't created planes in X-Plane, so I can't really say much about the creation process, but I can comment about the behavior of the C172 SP that's included by default.
 
I don't think it's that realistic, it feels way too light, the P-Factor is over-exagerated, at low speed, the plane is way too responsive, the stall doesn't seem that realistic... I've got a few hours on G1000 equipped 172SP's so I can relate to the real thing... and this is not cutting it...
I loooked around the internet for comments, and one guy on twitter wrote something like "yeah, the stock 172SP isn't that realistic, I never liked it either..."
 
How can something that you just plug in not be realistic? It should be right, shouldn't it? It's using the blade theory (tm), how can it behave incorrectly? Is it due to all those parameters that you need to adjust in the airfoil maker application? 
 
Again, since I haven't experimented with plane creation, I can't say much, but this seems rather odd to me that a basic plane such as the 172 would not be super accurate...

The UI
This is the worst thing about X-Plane... The UI is horrendous... 
  • The menus are hard to navigate through (way too small)
  • The numeric text boxes all have those up/down arrows to modify numbers, and they are super annoying
  • The airplane selection window shows this weird hierarchy of directories and file extensions... very unfriendly and it has a horrible browsing experience
  • The airport selection window has this weird filtering mode where the selected entry ends up in the middle of a list box... with empty space over and below it...
  • The views don't satisfy me at all, the external view is missing the mode with a fixed point around the airplane, which doesn't turn with the airplane but stays at a world constant heading. (no big deal though...)
I'll have to play more with it, I remember myself not liking Flight Unlimited 2 when I first got it, so perhaps the same thing will happen with X-Plane.
What's new with Infinite Runway? 

It's been a while... I haven't posted about Infinite Runway for about a year...

After some side work on other things, I realized that I continually wanted to go back to the coding on Infinite Runway. It's not making any money... but it's what I like to do...

One thing that made me seriously thing of going back to flight sim development is the fall of Microsoft Flight Simulator. It surprised the entire community... and it's a real shame...
It follows the list of cancelled flight simulators like Prop Pilot, Flight Unlimited, Fly!... (RIP)

One person though seems pretty happy about MS FS being cancelled...Austin Meyer, the developer of X-Plane.
He put up a special page up on his website to help orphan FSX users transition to X-Plane...

I never really paid too much attention to X-Plane... I always remained with my first impression that this simulator was nowhere near the level that FSX had reached.

After listening to a podcast where he was interviewed and was bragging about his simulator I thought it was finally time to check it out a little more than the 10 minutes of demo.

The thing I was most interested in was the flight model, and it is indeed not bad :) However, some of the things didn't seem realistic... for instance, I was unable to make the C172 enter a proper spin... that same 172 seemed a bit too responsive on all axes at low speeds...
The ground handling is great better than FSX, X-Wind landings are much more realistic.
One thing I love is that flight model view where one can see the flow of air around the airplane, this is really cool!

After flying with it for a bit, I can say that with some more effort on Infinite Runway, I could reach a level where Infinite Runway could be a serious contender to X-Plane.

I think the keyword to achieve this is: iterations!

I'm planning on releasing more iterations of the game by developing a streamlined process to create the releases.

I can't say too much about the content yet as the feature set of a 1st release haven't been fully laid out yet.

One thing is for sure, I'll be making of lot of efforts to make the flight model as realistic as possible. For instance, I'm working in a new airfoil model to remove my dependency on lift coefficient tables. Instead, I'll be using wing shape data to compute the lift and figure out other parameters such as pressure, velocities around the airplane.
The first sandbox tests are very promising, and I'm just about ready to plug that new model in.

It will be hard, but fun to code :)


So to summarize, Austin, I'm coming for you! (just give me some time!) ;-)

Youlii 

Youlii - Share the fun!For the past few months, I've been working with a friend on a website offering simple online multiplayer games.

We've got 3 games so far, but many more are coming soon!

Action happens here:
http://www.youlii.com

The entire site is in Silverlight 2, so if you don't have it installed, I recommend that you do :)

We created a twitter account to let everyone know of what's going on with Youlii at twitter.com/youlii

As a reminder, mine is twitter.com/mlaban!

Let me know if you have any feedback on the website and games.

Flight Simulator Grounded :-/ 

This is a really sad day...

http://www.gamasutra.com/php-bin/news_index.php?story=21981

It appears that the entire team of developers at ACES in charge of Flight Simulator has been let go...

What are we going to do now? Use X-Plane? No thanks, I like pretty flight sims... and Flight Gear... well, same, I like pretty flight sims...

Perhaps now would be the time to ramp it up on Infinite Runway?

I wish the best of luck to all my buddies at ACES...

Acer Aspire One - Replacing Wireless Card 

I've been using my Aspire One for a few months now, and I'm still happy with it... I've always had one issue with it. Wireless kept dropping, the connection would sometimes get slow, or worse, the Atheros card would just simply disappear from the Device Manager.

And this happened at random times, but mostly when the computer had been put on standby. Probably a driver issue...

After some digging online, I found that I was not alone... Lots of people had the same issue, and no matter what driver or bios update they used, they kept on having having this problem.

I decided it was enough, and bought a replacement wireless card (an Intel PRO/Wireless 3945AGM).
Opening the laptop was quite easy with the help of handy 
this guide.

I now have a reliable wireless connection! Yay! And boooo to Acer/Atheros for not releasing proper drivers.

If you also are experiencing issues with the wireless connection of your Aspire One, try to change the wireless card, it's worth the effort!

[Tags: AspireOne, Acer, Wifi, Replacing, Mod]

Aircraft Pictures Compilation 

This summer, I've spent a fair amount of time sitting on a bench in Palo Alto Airport, just looking at airplanes take off and landing...

I took a ton of pictures... most of which would probably be denied from entering the Airliners.net database... so I'm creating my own :)

Below is a slideshow of the best pictures of this summer... I hope you'll enjoy it!

Obama Won... 

... and I'm happy!

Thank you America!

3D Graphics With Silverlight 

I've been playing with Silverlight lately, and there was one thing I wanted to try for a long time... Displaying my flight tracks in real time 3D with Silverlight.

There is a pretty advanced 3D engine on Codeplex called Kit3D that does 3D graphics with Silverlight the same way WPF 3D works.
I used this library to display the GPX tracks. I had to add lighting as the current version on codeplex doesn't support it.
The code is pretty clean and easy to understand, so it was quick to add reasonably fast lighting calculation (for one directional light only)

To make this thing a bit more useful, I added the possibility to load 3D terrain underneath the GPX track!
Bear in mind, the resolution of the terrain is pretty limited. Right now, it's hard coded to a 20x20 grid for whatever the gpx area covers. I tried increasing it to 50x50 but it starts to get a bit slow, and retrieving the elevation data for that much points (2600+) takes quite some time...

For those who want to know how I got the elevation data, I did this using Geonames.org which has nice web services for all kinds of world positioning related things.

There is a link to a live demo below.
For those of you without GPX files handy, I added a link to a sample GPX file that came from a flight I did with Joost, the founder of Everytrail.com quite some time ago. It was a flight from Palo Alto to San Carlos, Hollister and back to Palo Alto.
Everytrail.com has tons of other GPX files available for download. If you want more test data, do not hesitate to visit the website!

Live demo!

Comcast's Shady Business Practices... 

So i've been in my apartment for 6 months now... And I was expecting Comcast to end their "6 months promo" price for my internet access... They didn't forget to update the rate...
However, they did forget to tell me when I subscribed how much I'd be paying...

If you go on the website, and click on "High Speed Internet" they will take you to a page that makes you believe that you will pay the 6 months promo rate of 33 dollars, after which the rate will to go 42.95.
That's what I remembered I would be paying eventually when I subscribed 6 months ago. However, this is completely misleading.
In reality, the intro price and the $42 roll to rate are only available to people who already have Comcast Cable with their high speed internet. (Both TV and Internet). The actual price that you are paying if you don't have cable is $58.
They fail to mention this clearly anywhere... and, there is NO WHERE on the website where you can find the rate without Cable. NO WHERE. Even if you go through registration, they will only mention the $33 rate, and never mention the $58 rate.

There is no way to actually find out online how much you will eventually pay past those 6 first months...

So I called Comcast to complain and ask for that $42 rate I was entitled to. The first person I got was rude and told me that it was written in clear and publicly available... in the "terms and conditions page".
Well, when she says in clear, and publicly available, she means it says "call for additional rules on restrictions".
In fact, if you call, they will tell you the actual price (I still have to verify that though...), and that this promo is only available with a TV Bundle... but you can't find it anywhere online... It's still "public" however... Jackasses!
I confronted her to the extreme absurdity of this practice, but all she could reply was that the rules were here, and that calling to get the info still meant that the information was public... gees...
So according to her, the website is not lying... it's, as some Republicans would say about McCain's lies, "stretching the truth" or "not passing the 100% truth test". (Who comes up with this shit by the way?)

I so hate people...

I finally called again to get another dude and tried to make him and his supervisor admit that this is borderline scam, and that this was a completely unfair business practice... He agreed to credit half an hour of Citabria ($50) to my account.

I'll try to call again sometime and ask for just High Speed Internet only and see how the "representative" behaves, and if there is anyway to extract the actual post 6 months rate...

At the end of the call, something funny happened... the manager told me he would tell his hierarchy that the website was misleading about that particular issue. Clicking on HighSpeedInternet only, and not a bundle page, should present the $58 rate and not a cable bundle rate of 42 bucks.
This made me laugh, and I couldn't resist telling him how idealistic he was... Like this misleading part was not completely intentional, come on dude :) What company do you think you work for?

So, am I still happy with the Aspire One? 

Hell yeah!

It's a great machine! The fan problem I had at the begining is now gone. I found a little utility on AspireOneUser.com that slows the fan a bit. It's still running but barely audible, which is exactly what I wanted :)

The only remaining complaint I have with this laptop now is apparently a widespread problem with the WLAN card that fails randomly upon waking up from stand by...
Rebooting fixes the problem, but that's lame... I hope they'll fix the problem soon...

Oh and also, they lowered the price to $350! What are you waiting for?

Happiness is Delano 

At the end of last August, I drove all the way to Delano California to attend the "Happiness is Delano" Aerobatic competition.

A bunch of people from all over CA came over with their airplanes to compete. My friend Bruno was there try to get to the top of the Primary group in a Decathlon!

He made it to the second place, nice for a first participation in the competition!

Delano is in the south of the Central Valley, needless to say it was very hot there... We had to drink lots of water.

It was a wonderful week end!

Here are the pictures of the week end: