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é
Navaids, Replay and Tower view ! 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

Fancy Screenshot !

Lots of changes to report in this post !

The flight simulator earth modeling I’m currently in, contains a step I could not skip. The Navaids. A Navaid is a navigation equipment that is on the ground and that helps pilots when they are flying. There are hundreds of them all over the world. They emit a signal on a frequency and the on-board radios receive it and tell the pilot useful information.
I didn’t want to insert all these navigation aids by hand in the simulator, so I had to find out how the other simulators did to import all this data.
It turns out there is a US military website
that contains all sorts of worldwide flight related data (Airport locations, runway types, beacons, ILS …) This is called DAFIF (Digital Aeronautical Flight Information File) and once again, it's free !

I started with the navaids (VOR’s and NDB’s). The file that contained this data was about 1.5 mb of text. I parsed it and reformatted it to include only the US beacons for faster lookup in the game.

The system is now in place, and as you can see in the screenshot underneath this text, the DME shows the distance from KSNA to SEAL BEACH VOR (115.70 Mhz), that is located right next to Los Alamitos Air Force Base.
One thing that I now, is to see debug text like this one :
”Found : SEAL BEACH - SLI - 115.70 Mhz - Distance : 11.2811019896512”
I don’t know why, but I love to see text from real world stuff in my sim !

NAV/Com NAV/Com NAV/Com
NAV 1 on 115.70, Seal Beach VOR on the DME !

To use these navaids, I had to work on the instruments again. There was no NAV/COM radios in the aircraft yet. It took me quite some time to implement this cause I got stuck on a stupid bug. For some reason, at a certain angle, some of the objects were all lit … It took me a little time (3 hours  of “Ohh, I see ! Now it’ll work …”) to figure out that one renderstate was not properly set ...
Anyways, this got fixed and now the NAV-COM and DME instruments are working ! I like how they look especially at night.

I also implemented a new shader in the game, a saturation/brightness/contrast shader to spice up the colors of the sim ! I think I’ll leave this to default values and let people set these values to whatever they prefer.

Oh ! I almost forgot!
A replay mode is now available ! It records the 125 seconds and you can replay it just by pressing a key ! It’s a really neat feature, especially for a geek like me who enjoys watching his landings !
This replay feature had to come with another, the tower view ! What’s a replay without a tower view anyway !
This new view gave me the opportunity to shoot the aircraft from new angles and watch its behavior in crosswind landings ! This made me figure out that I’ll certainly add another force-point to the aircraft in the middle of the fuselage. The cross winds only ‘push’ the tail, and while this is not bad, I doesn’t feel like the real thing …

Well, enough said, here are some screenshots !

Rolling ...  Moments before touch down Tower View 
Tower views
Tower view - C210 in upwind Tower view - C210 Lifting off 
Tower Views again
Tower view
Tower view take off

Flight Simulator Project, DEM Data & Google Earth 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

This time, it's the actual thing. I finally integrated DEM data in the Flight Simulator Project.
Before last week, the landscape data in the FSP was just an height map that was generated in 3DS Max and loaded statically. This had to change.
I had read a bunch of articles on how to import DEM data downloaded from the internet but this data was incomplete or you had to download like a hundred separate files just to get a 30x30 kilometers area…
There’s another simulator out there that does this DEM importing, besides FS and X-Plane, it’s
MicroFlight. It’s a light aircraft simulator written by Illan Papini.
On his website, he has an SDK to build sceneries for his game, and he uses a tool (
3DEM) that converts DEM data into a file that contains a list of altitude points. This was the thing I needed !
I then had to download actual dem data for a large area at a time. The website pointed a service from the US government,
http://seamless.usgs.gov. It’s an awesome website were you can download loads of terrain data among other data types.
I splited the area I wanted into 4 squares and downloaded the it (roughly 40mb each)
After converting this data to an array of points with 3DEM, I needed to convert this data to something in my game, and actually build a coordinate system.
I thought at the beginning of the development that I had chosen 1 Game Unit = 1 Meter, but it turned out to be … well … not that at all …
The only reference I had to calculate what was the unit length in my game was the runway length at KSNA. Since I’m using satellite imagery, this was a great point of reference.

I pulled some hair to do that … there were lots of conversions involved, from game units to feet, to nautical miles, to kilometers etc … (why do I sense a precision issue coming here ?)
There would be too many things I did to cover all of them in this article, but basically now the game can import DEM data it’s positioned at the correct position on my virtual earth, I think …

With this, I could finally add support for the actual aircraft position in Google Earth !
Since having only a single plot in Google Earth wasn’t enough, I added support for path visualisation. The 500 last positions of the airplane are now shown, making GEarth a cool flight path analyzer !
Here are a few shots :

[Google Earth] Short flight over KSNA [Google Earth] Aircraft stall clearly visible (the peak) [Google Earth] Jet arrival [Google Earth] Aerobatic flight !

I’m having fun, I can’t help it ! =)

Happy Landings !


 

Flight Simulator Project & Google Earth 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

Well, it's no big news, but the Flight Simulator Project can now communicate with Google Earth !

Ever since I saw that MyFSGoogleEarth program connect FS2004 to Google Earth, I had no choice but to do it with my sim ! ... There was a big problem though, I had no coordinate system in the simulator whatsoever ...
All I had was a local coordinate system that was not linked to anything in reality, except for the speed, and altitude which proved to be very wrong in the end ...

Since I'm currently working on the terrain engine of the FSP, I was kind of obliged to deal with all that earth coordinates crap ... That ground terrain thing is under heavy construction right now.
What I'm basically doing is import Digital Elevation Model data downloaded from the awesome USGS website (many thanks to them for making this available for free !) and display it in the simulator with the appropriate texture.
To display this data, I needed a proper coordinate system. I'm not gonna extend on that just now, this will be the subject of another post when it'll be fully integrated in the simulator.

Anyways, this is done and the FSP can now tell you exactly where you are on the earth. Well, this has not been tested on every place on earth ... but I know it should work fine on all North America.

I could then setup a simple kml file on a file share, and have Google Earth poll it every second, and tadaa !

Over Ontario International Airport in Flight Simulator Project   Ontario International Airport in Google Earth
The FSP and Google Earth in sync over Ontario International Airport (KONT)

Over Pasadena in Flight Simulator Project   Over Pasadena in Google Earth
The FSP and Google Earth in sync over Pasadena, a few nautical miles North of Los Angeles

Happy Landings !

Flight Simulator Update ! 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]


Though I went away on vacation for almost an entire month, I found time to work on the Flight Simulator Project.

Last time I wrote here, I was working on the beginnings of a Gauge System using GDI+. This has changed quite a lot since…

I thought this GDI+ technique would scale enough to handle all the instruments of a typical general aviation aircraft. As a matter of fact, it didn’t … After designing 6 instrument gauges, the successive copies from system memory to video memory generated stutters in the simulation …
I needed to find another way to render the gauges when Daz, an English tester of the Flight Simulator Project mentioned a render to texture technique I could use.
It took me a day to implement it. I was pleased to see that this new method worked way better than the previous one.
The principle is simple; rendering the 2D gauges into textures, and then apply this texture on a 3D quad on the instrument panel, each gauge having its own texture.
The original thing that Daz suggested was to do all the renderings in a single texture, but I didn’t feel like implementing that just yet.
The result is quite ok for now, I have 10 gauges or so, and the frame rate is still acceptable.

I’ve read lots of threads about 3D Cockpits in flight simulators like FS2004, X-Plane and so on, and what most people hate about FS2004 3D Cockpit is the gauge refresh rate. Since I didn’t want this system to hit performances too much, I added an option to set the gauge refresh rate to whatever rate the user prefers. That will make everyone happy.

About the openness of the system, right now, all gauges are included inside the main assembly, but the old scripting system still works, and FSP will eventually be loading gauges from a simple .cs file !

[Instrument Panel] Panel in flight [Instrument Panel] Before engine start

Scripting System:
The scripting system has been a little revised. The objects can now be clicked-on and the script behind can register itself to mouse events to take appropriate actions. The first script example is the one with the openable hangar doors. If you click on a door, it will open/close.
I took advantage of this system for the flaps lever, the throttle and mixture controls in the virtual cockpit that are now animated when you click on them.

With all these new things, the Cessna 210 can almost be started like an actual aircraft. You can check this on these two videos:
Engine Startup and Shutdown

Instrument Overview

The latest version is available on my website here.

Happy Landings !

Google Earth with GPS or Flight Simulator 2004 ! 

[This entry has been imported from my old blog, therefore, links and images might now show correctly. Sorry about that]

Everyone is talking about Google Earth ! It's my turn to jot some words on my blog about a couple things that use Google Earth to display data. Of course, this is aviation related ...

First thing, the GPS:
On the pilotlist last month, I read that some pilots were importing their GPS traces inside google earth. A GPS Trace is a list of positions that the GPS records when it is on. This trace is exportable via the USB port of my Garmin GPSMAP 96c via Navigation, a free software developed by François Fouchet. Navigation helps pilots planing their flights graphically, a really helpful program.
It didn't work at the begining, but after a few tests and some mails to the author about GPS incompatibilities, I could partially import the traces and export them to Google's kml file format. So here's what it looks like when within Google Earth.

[Google Earth] GPS Trace Within Google Earth
The trace of my last flight to Grenoble St Geoirs

Second Thing Flight Simulator 2004 :
While browsing my logs, I picked up a google search referer, searching something about Flight simulator and google earth. I typed this in google as well, and I found out this website :
http://www.elbiah.de/flusi/.
Jürgen Haible coded a bunch of utilities for flight simulator, amongt which, MyFsGoogleEarth, a Google Earth link. This program displays flight simulator data in google earth.
I tried it yesterday, and it works quite well ! It shows your aircraft position as well as all AI Controlled traffic around you. This is great for some tourism flights :)

[Google Earth] What it looks like in FS
What it looks like in flight sim
[Google Earth] Second Bay Overview
In Google Earth
[Google Earth] Bay Area Overview 1
In Google Earth Again ...