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

Hiking for the Lazy Aviator 

Last saturday, Julie and I went hiking with a group of friends in a park in the mountains between San Mateo and Half Moon Bay. It was quite cool, and it brought back some memories of when I was a kid... when my parents would take me and my 2 brothers in the hiking trails in the region of Lyon.

The total distance we walked was 7 miles, and it took us a few hours.

The next day, I had scheduled a flight in a Citabria and the weather was more than perfect, so I headed for the hiking trail, just to see what it looked like from above... and it is quite small! I circled around the entire trail in about... 30 seconds :-)

After this 30 second hike, I went on along the coast all the way down to Santa Cruz... then back to Palo Alto for a few touch and goes... 1.5 hours of fun!

G1000 Bay Tour ! 

Yesterday, I flew with two friends from my school who live in the area. We went for an extended bay tour, departing from Palo Alto, overflying SFO Airport, San Francisco, Alcatraz, the Golden Gate Bridge... then we continued north to Petaluma for a quick touch and go... and finally straight to Point Reyes before coming back to PAO via the shore line.

Flying the G1000 is just fantastic, traffic awareness, moving map, integrated radios, in flight weather (metars, cloud coverage...), and even XM Satellite Radio :)

Petaluma was really crowded... I was expecting an empty traffic pattern, but there were lots of airplanes all over the place... That was probably because there was almost no wind and no turbulences, which is not a frequent occurence at Petaluma. On our way home, I was monitoring Norcal, and we kept hearing airplanes asking for flight following to Petaluma... At some point, we heard something like:

Airplane: "Cessna 123K, request flight following to Petaluma"
Norcal: "Who isn't today?" :)

Another thing I like about the 172SP is the autopilot. It comes really handy when transitioning through SF Class Bravo to leave time for traffic spotting and listening to the controllers... and also, when used in NAV mode, you are sure to go directly to a point, and not wander around your desired track :)

Unfortunately, I couldn't keep the track for this flight... My 96C was in the back, over my flight gear, and couldn't even get a fix from there... (because of the high wings I suppose...)Too bad it doesn't have a better GPS receiver in there... my $50 bluetooth receiver works much better...

G1000 Checkout! 

I finally had time to fly with an instructor at West Valley to complete my G1000 checkout and BFR. We flew for about an hour, played around with the G1000 (but looked outside 90% of the time ;)) did some stalls, slow flight, touch and goes, landings in different configurations, go around and used the autopilot a bit...

The 172SP G1000 is a very cool machine, it flies so much faster than the planes I usually fly in, and it is incredibly easy to control!

So two days ago, while I was watching Max Trescott's G1000 CD section about the KAP 140 (autopilot), I realized that the designers of the autopilot must have had the same problems as me... I mentionned in an earlier post that I had difficulties tweaking the autopilot PID's at low/high speeds... But here are the autopilot limitations:

Cessna 172R/S Autopilot Limitations
(Reference the appropriate PIM for the complete list of limitations)
Maximum Airspeed ........................................................... 140 KIAS
Minimum Airspeed .............................................................. 70 KIAS
Minimum Approach Speed.................................................. 80 KIAS
Maximum Flap Extension...................................................... 10 deg

How interesting! And thinking I was trying to make the AP work at 65kts or less with full flaps!! I should have come up with such limitations as well! And I will ;-)


So Bruno, when are you coming with me so I can teach you how to use the G1000 ? :)

Garmin G1000: First Impressions from the left seat 

Two weeks ago, I flew in the evening with Cory, for my introductory flight in a 2006 Cessna 172S NavIII equipped with a Garmin G1000. The Garmin G1000 is the set of two LCD panels replacing traditional steam gauges.

Since I joined West Valley, I flew on PA-28's, Citabrias and Cessna 152's. I was fine flying the Archers/Warriors, but I wanted something new for a change. I flew on a G1000 aircraft with Ismael a while back, but never got around to try it from the left seat. So a G1000 transition was a perfect idea.

G1000 Cessnas are little more expensive to fly but much more fun.

We flew to Hayward in N1322K for a couple touch and goes and back to Palo Alto. Flight went without a hitch. The G1000 is a really impressive piece of equipment. All the information you need is there on these two screens. It can be a little overwhelming at times especially when you are busy with radios. 

One note I have though... I've been a little disturbed by the fact that the airspeed indicator is a vertical bar where the current airspeed is written text. The good thing is that you know exactly what your airspeed is... on the other hand, you have to read the values...
Steam gauges make it easier as I just remember where the needle should be, angle wise, so a quick glance can tell me if I'm above/below that angle that I set to myself...

I haven't flown since that time, all subsequent flights have been cancelled due to weather... Let's hope next week end will be better! I've been practicing on the simulator enough! And Max Trescott's G1000 CD-ROM gave me lots of tips I want to try for real!

Garmin GPSMAP 96C, another review... 

I often receive emails or comments about the Garmin GPSMap 96C that I bought and reviewed about 3 years ago...

Here are a few keypoints I felt like mentionning to people considering the purchase of this GPS Unit.

  • I still like my 96c, it's lightweight, very durable, it's been tossed around in airplane cockpits, thrown in bags and it still works great!
  • The screen is still in goodshape, it didn't scratch too much considering I have no protective cover for it. With regards to the screen and direct sunlight, a common concern for LCD screens, nothing to worry about. The screen is perfectly readable under all conditions.
  • The battery life is fantastic! It lasts 20+ hours. And probably more without backlight.
  • I was impressed with the GPS fix quality when I first got it, but not so much anymore since I've seen what those SirFStar III gps's are capable of... The 96 gps gets a fix rather quickly but has a tendency to lose it very easily when in a side pocket of an airplane, or under my arm when flying a high wing airplane...
  • The unit can be painfully slow when scrolling with the directional pad... this is one of my biggest frustration with the GPS... menus are fast, no problem here, what is the slowest is the moving map... When panning out of the current view, it sometimes reloads the entire screen, which can sometime hang the screen and controls for a few seconds... very frustrating when you are trying to find a distance, an airspace altitude or a frequency....
  • The tracking system is very convenient, I've logged almost all the flights I've done since I've had it...
  • The price might be a show stopper for some... Considering the price of the car units... why the heck are the slower and older aviation gps units more expensive ?

I sure hope that Garmin comes up with a faster version with the same form factor. I'd definitely buy it :-)

If you are looking at buying a good GPS Unit now, the Garmin GPSMAP 96C is definitely a good buy! I'd recommend it to anyone!

Tailwheel Endorsement 

This month, I've started taking lessons to get my tail wheel endorsment! I have the phase check out next saturday with the chief pilot and if everything goes as planned, I'll be able to fly the Citabrias of the club!

 

I didn't know I would find tail dragger flying so fun! I already knew that landing was the most exciting part of the flight, but now, it's even more exciting! :)

 

Bruno was at Palo Alto during one of the flights I did with Cory, my new instructor, and he took some pics of my landings at Palo Alto.

 

 

Click here to watch them all!

Night Pictures at Palo Alto 

I just uploaded a new album with pictures I took at dusk in Palo Alto. I had to buy a tripod to do these. The exposure time was too long to get a sharp picture.

For some of the pictures I exposed at long as 10 seconds to see a light trail when the airplanes were landing. That makes a really neat special effect!

 More pictures here

Day in Half Moon Bay 

Two weeks ago, Julie, Eric and I flew to Half Moon bay on the pacific coast to have lunch there. The flight was short, but a little bumpy.
After lunch we hung out at the pier next to the airport.

The weather was nice, and warm, that changes from the cold french winters ;-)

See Pictures here

Flight to Tracy and Castle Air Force Base 

As I said in my last post, this sunday we flew to Castle Air Force Base!

The plan was simple, fly in a Piper Archer to Tracy to meet up with Mike and his Mustang II and Jimmy and his Pitts 12, take off to Castle AFB, visit the museum, have lunch, fly back home!
Everything went alright and we even had the time to fly in formation on the way home. That was a blast!
We took off from Palo Alto at 9h30 and flew directly to Tracy. When we landed there, Mike was already on the field, refueling his Mustang while Jimmy was flying in the pattern for runway 30.
At 10h30, every one was ready to leave. Bruno hopped in the Pitts, leaving the front seat of my Archer for my Copilot Julie to fill.
We started to taxi to 30. Mike was ahead of us and took off for closed traffic while Jimmy and I were still taxying. He made a high speed low pass on the runway as we were doing our before take-off checklist. That was nice :)

I took off after Mike's low pass and climbed to 3500ft heading 99 direct to our next waypoint. We then switched to 123.45, the air-to-air frequency so that we can chat together.

The Pitts and the Mustang were way faster than me and they flew ahead of me in no time.
Surprisingly enough, by the time we arrived at Merced (Castle AFB), they were only a few
seconds ahead of us. We reported overhead the airfield while mike was on right downwind and Jimmy on right 45 for runway 31.

Mike landed first, then Jimmy, an Experimental was in front of me, he made a direct right base entry when I was in downwind, I had a Cessna Cardinal and a Cessna 152 behind me! That was busy! Good training for the radio!
Since the experimental in front of me was doing a touch and go, I taxied right behind Mike and Jimmy. Mike's plane was really easy to spot. His new plane is so bright yellow it's tough being lost while following him ;-)

We parked on the tarmac, next to all the other airplanes and took the shuttle to the Museum.

It was less crowded than last time we went, but a few airplane cockpits were open.
Very cool nonetheless.

After a quick lunch, we took the shuttle back to the airport. The plan for this last leg was to make a flight of three, mike being first and taking care of the radio, Jimmy following him, and me in the back of the line since I had the slowest airplane.

We took off simultaneously on runway 31. Mike said something like that: "Castle, Experimental 123XX, Group of three, taking off runway 31, Castle."
We all applied full thrust, and after a few seconds, we were airborne. It took me about 5 minutes to catch up with these guys. Then we flew in formation for a few minutes. It was really great!

Funny thing was that while we were chatting on the Air-2-Air frequency, we heard Lou, (Bruno's instructor and the Navy Pilot I flew in an Aeronca last spring), talking on the radio about 70km north of us. He was probably having fun in the sky again :)

After the formation flight, we headed directly to Palo Alto.

A really nice day!

 All the pictures here!

Enough is Enough 

I just read this news article from Phil Boyer of AOPA (Aircraft Owners and Pilots Association)

It's about some slow witted policitians in the US that have something against general aviation... their rant came back following of the tragic crash of the SR-20 in New York a couple days ago...

Very interesting read! Let's hope all those idiots will give it a read...

Flight Videos on Youtube 

I tried uploading my first videos on youtube today. we'll see how it goes.

The process was pretty simple and they got online a few hours later.



Google Earth Tracks 

Here's an overview of all the GPS tracks I have recorded since I've been here... I find that pretty cool !
Guess where my home base is ?

This other one on the right is a close up of Palo Alto Airport. I'll keep recording all my flights, I just love to review these at home...

Flight to Santa Rosa and Napa 

Bruno, a friend from work had planned a flight to Santa Rosa airport, about 70 nautical miles north of Palo Alto.
The plan we made was that I meet him and his friend Mike at Santa Rosa for lunch.

They flew together in Mike's awesome Pulsar, a light sport aircraft and I joined them in a Cessna 152.
The weather we had that day was perfect, the weather briefer told me nothing was going on, expect the high temperatures.

After my preflight, I took off at around 12:15pm and asked a Class-B transition directly to the north of San Francisco.
The flight went alright, altough two things happened. First, San Carlos tower couldn't catch my transponder signal... That was clearly a problem and they couldn't let me go through the Class B airspace like that... I asked them to circle a couple of minutes west of 
Highway 101 until my sleepy transponder wakes up !
While I was circling, he told me he got my signal from time to time, but that it was unstable...
After 5 minutes of circling, they could finally catch me on the radar and I was cleared to Norcal that in turn, cleared me through Bravo airspace.

Second thing, my plan was to climb up to 6500 feet to find some fresh air... but the 152 was getting kind of hot during the climb, so I asked norcal to remain at 4500 feet for a while to lower the rpm and cool the engine down...
The rest of the flight went without a glitch. There was no marine layer to block me from seeing the ocean, and although the air was very hot, it was very calm...
I arrived at Santa Rosa after approximately 1 hour of flight and rushed to the FBO where Bruno and Mike were waiting for me.


On the tarmac, we met with Saket, another NVIDIA employee who was doing his cross country flight. He was on his way back to Palo Alto in a Cessna 172. Unfortunately for him, he couldn't start his engine; the starter wouldn't crank the propeller... Since none of us was experienced enough to hand prop his plane, there wasn't much we could do to help him.
Everything went fine for him though, his instructor came to help him in the afternoon and he hand propped the plane.

 

Since the restaurant at Santa Rosa was closed, we decided to fly to Napa to have lunch. Flying together from the same departure point to the same destination, couldn't go without some formation flying !
We decided to meet up at 3500 feet over an old navy airfield next to Santa Rosa (Santa Rosa NAS). I took off before them and went straight to the rendezvous point.
This meeting point was just perfect, I wanted to check out this old airfield. It’s now closed and I always wondered how it looked like from above. It was still entirely visible in Flight Unlimited 2 but nowadays, people have built houses and all sorts of constructions on it... Really a sad view :(

After a few minutes of waiting for them, I heard Mike talking on the Air to Air frequency (123.45Mhz) and I started looking for the white Pulsar.
I found them over the Highway 101 and Bruno took control of Mike's plane to execute his crazy maneuvers :)
I continued straight ahead and after a few seconds, they were on my tail, but not too close though.
That was really cool; formation flight is really a thrilling thing !
We flew in formation for 5 minutes or so before breaking it up and contacting Napa Tower. The ATIS at Napa was reporting a temperature of 40 degrees :)
We landed and met at the terminal in front of the restaurant where we rushed to get some fresh air!


While at the restaurant, just like at every place I've been with Mike, a woman came to us and asked what kind of plane was Pulsar :) This bird sure attracts everyone's attention !

After lunch, Mike went back to Tracy and I headed back to Palo Alto. It didn't go smooth for me at the beginning of this last flight. I experienced my last glitch of the day at runup in Napa. When I checked the magnetos, I had a big drop on the right one... I waited a while, but nothing changed... I still had a drop in RPM... I decided to go back to the terminal and taxied back while watching Mike and Bruno taking off in Pulsa 9 0 Lima Papa...

Once stopped, I called the front desk to ask them what I could do... She told me that I could try running the engine at 2000RPM for a minute of so and retry the magneto check. I tried and it worked. Since it was hot, I probably didn't mixture enough the engine during taxi and this might have left some things on the ignition system...

I could then fly back safely to Palo Alto in 45 minutes of flight around Oakland.

What a great day... let’s hope fore more like that!

You can check out the entire gallery here!

Sepulveda Boulevard... 

During the trip to south California, we stopped in a place I really wanted to go to. It might be stupid, but it’s a small park on Sepulveda Boulevard, in Los Angeles, next to a In n Out burger…

Nothing interesting, really… except this park is located right under the approach path of the runway 24R of Los Angeles International Airport.

 

It will certainly be familiar to those who visit Airliners.net regularly. Lots of awesome shots on the site were taken at this place.

It’s great for practicing plane spotting. If you miss one, another one will be over your head in no time!

I thought it was easy, but they are coming in fast and it’s hard to match the motion of the plane… As you can see in the gallery, most of the pictures are blurry, the airplanes are not in the center of the frame and I either zoomed too much or not enough...

 

 

 

 

 

It was really cool to be there, it was one of the things I had to do… One of them was flying in California, another was seeing LA… There are many others, but I will keep them to myself :-)

Click here to view the complete gallery

A different view of an approach for landing... 

~/Downloads/Videos/Flights/Touch_PaloAlto_Cockpit.aviYesterday I flew one of the club's Archers for some touch and goes at Palo Alto. Sadly this aircraft didn't have enough room to put the camera on the dashboard, so I came up with an alternative way of filming my landings... Putting the camera on the right seat and filming the cockpit and my actions!

I'm glad I did this, the video is quite interesting to watch. You can see my hands moving and especially how the left hand moves to counter act the effect of the turbulences during the approach...

It's funny how this hand can land an airplane considering how dumb it is compared to my right hand... (I'm right handed).

The touch down is approximately at 1 minute in the video, when you hear the landing gear sound and I pull the yoke all the way back.

Have a look at the video and let me know what you think !

Click here to go to the video page, today's video is the last one in the list (Touch Palo Alto Cockpit)

Trip to Atwater - Castle Air Force Base 

This week end, Bruno (a co-worker) and I went to Castle Air Force Base to visit a aviation museum close to the airport. (http://www.elite.net/castle-air/)

We took off from Palo Alto at 11h15am, and about an hour later, we were arriving at Castle Air Force Base in the middle of the Central/San Joaquin Valley. We flew by Livermore, Tracy, Nasa Crows Landing... Interesting flight in awesome weather !

The museum was pretty nice, lots of old airplanes and we could even get inside the cockpits!

I uploaded lots of pictures I took at the museum in the gallery.

We also saw an SR-71 there ! I had never seen one in real... really impressive ! There was a navigation officer or something, that flew on that very airplane ! He told us this story about the time one of the SR-71 had stayed out for a long time, and was covered in bird poop... they took the plane for a ride at Mach3 and when they came back, the plane was spotless, everything had burned !

The return flight was somehow bumpy... Bruno insisted that we did this branch without GPS hehe :-)
We flew over the San Luis Reservoir, South County, San Jose... Again in great weather, but quite windy...

The landing in Palo Alto was tricky ! There was lost of gusts and I thought my landing was going to suck really bad... But I got lucky, no gusts at touch down and a nice kiss landing !

For the pictures, if you think the in-flight pics are crappy, blury, noisy, blueish... blame mister smarty pants co pilot who thought he could to better than the Automatic Mode of my digital camera ;-)

 

See all the pictures here


New Flight Videos 

I've uploaded 2 new videos on the website !

~/Downloads/Videos/Flights/Landing Half Moon Bay.aviOne of a landing at Half Moon Bay two weeks ago and another one of a landing in Palo Alto on a clear april day.

The second one is particularly interesting. I had set the airplane speaker on COM1 so that the camera would record the radio communications... It's nice to get the feeling of what it is to be up there :)

 

I think I'll film all my landings from now on... It's nice to be able to review it afterwards and see if i sucked or not ...
Don't worry, I'm not holding the camera while landing, I put it on top of the panel and leave it there...

So this week end, I flew twice on saturday, first with a guy from Epitech visiting from Oregon. We flew for about 45 minutes... weather was not very good... but still okay...

The second flight was with Glitch, and we flew over NVIDIA, Santa Clara, San Jose... The weather had cleared so it was way nicer... a little bumpy though... This time we went to Livermore (KLVK) for a touch and go.

Nice little week end here, besides the crappy weather on sunday...
I spent my whole sunday flying in Flight Sim, landing an Aeronca everywhere I could... and watching at YouTube videos...

Anyways, it's getting late...
Happy Landings

 

 

I like it here... 

Last Thursday, Bruno came to my cube and asked if I wanted to take a tail dragger lesson with his instructor, Lou, on an Aeronca... I hesitated a bit, I only flew once on a tail dragger (with a little wheel in the back instead of a nose gear), and I always heard that it was difficult to handle...
But what the hell… this morning at 11:30am I drove to Oakland International Airport to meet Lou and his Aeronca.

Lou is a fascinating man... He has been flying for many years and like all the pilots with thousands of hours of flight time, he has a lot of aviation tales to recount... Like this one where he soloed on a T33... this solo being the first time he ever flew this aircraft... no dual flight prior to that... kind of a funny/scary story...
The aircraft we flew on is an Aeronca 7AC, build in 1946... Yes, nineteen fourty six :) After a short briefing on how a tail dragger differs from an airplane I'm used to fly, we got to the airplane...

Funny thing is that this plane doesn't have a starter... Lou hand-started it from outside while I was holding the brakes on !
Engine started, Lou hopped in and we taxied to runway 15... Man what a nice feeling ! It changes from the pipers, DR400 and all those comfortable planes I know...
Lou did the first takeoff and landing, and then I got to try a few... This aircraft is very light, and it reacts vividly to the wind gusts... The stick was kind of hard to manipulate but overall it was alright :) The trickiest part was of course, the landing...
We had a little crosswind from the left, so the first landings were all done with offset to the right of the runway, until I figured out how much pressure I had to apply on the stick to keep this baby on the center line… The stick was not the only part… On a Piper for example, you need to work with the feet to control the rudder and do proper landings and turns, but on a tail dragger, it’s a way bigger deal… you have to plan ahead and see what the aircraft is going to do, and counter act with the feet… well, you get the picture…

After these tail dragged adventures, I got a call from Bruno, he was a Rio Vista with his friend Mike and his Pulsar, an experimental airplane…
He said they were coming back to Oakland and that I could get a ride with Mike ! Sweet !

While waiting for these guys, some sort of Pitts, that belonged to a friend of Lou landed… They were coming from Livermore to visit him… Two guys were in the airplane, the owner and a friend of his… We chatted a little bit, interesting guys :)

Then when Bruno and Mike landed, I sat in the right seat of the Pulsar and we went for a spin in the pattern of the 27R at Oakland… Mike’s Pulsar is a nice plane, a little small for a tall guy like me, but still, nice machine, quite fast and flies well !
Man I’d like to get my own plane…

Anyways, I had a great deal of fun today, great airplane, awesome weather, nice instructor…

Here are the pictures for today and last week end’s flights !

Mount Diablo and North Bay Tour 

It was back in 1998, I used to fly a lot with Flight Unlimited II… Going from airport to airport and sometimes spending hours just flying around in the Bay Area, from one spot to another… I liked this feeling of freedom I had back then in this simulator. I was making up stories in my head like picking up stuff at an airport and flying it to another… I really had great times…
After all these hours of flight in the same region, I knew my way around the bay…
I’m pretty sure that the flight I did today, I practically did the same one back then in the Flight Unlimited days…

Since I couldn’t fly yesterday, I booked a plane for today and had to decide between that and a friendly beach/surf trip… Well, I wanted to train with the radio and the weather was too beautiful to not fly…

The aircraft I took today was a Piper PA-28 161. I decided after calling 1-800 WX-BRIEF (the weather briefing…) that I would go to the east towards Livermore, Mount Diablo and then fly according to my likings :)
I took off and headed east to Livermore. Over at Sunol lake, I started monitoring Norcal Approach… and man the frequency was busy! Lots of airliners coming in, people talking freakingly fast… I managed to say something after a few minutes and requested flight following. I flew south of Livermore and to the edge of the Central Valley and headed towards Mount Diablo.
That was just great, the air was very calm, not a single bump, not a single cloud within a 30 NM radius… a pilot’s dream hehe :-)
I then flew overhead Concord Buchanan to avoid Travis Airspace, and this is where I changed my plans. Originally, I was supposed to go back to Palo Alto by staying clear of Oakland/San Francisco Class B Airspace but I decided I would make a tour of the San Pablo Bay instead…
I passed Napa County, Somona Skypark, Sonoma Valley, Gnoss, Hamilton Airforce Base… I landed to these places so many times in Flight Unlimited, that is really cool to fly over them and see them for real hehe ?

And then, change of plans again… the ocean didn’t look as bad as they said, no low stratus of any kind… just a little haze but still very fine…
A few minutes later, I was approaching the Pacific Coastline !
Couldn’t go any farther in that direction so I headed south and got cleared through the Class B airspace as long as I stayed at 3500 feet and west of San Francisco Airport.
I did so and flew along the coast leaving San Francisco and the Golden Gate on the left… That was really an amazing sight there… I want to go back !

After passing SFO, I got transferred to Palo Alto tower. I didn’t even have to contact them; they knew I was coming... Sweet !

They told me to hold over the SLAC and remain clear of Class D airspace… I circled over my position and waited patiently to be cleared… Apparently, a Cessna had a problem with its landing gear and was circling over Stanford trying to fix it… too bad… (I heard later that they landed in San Jose and everything was alright)
Tower called me back and told me to enter downwind Runway 31…
There was a looooooot of traffic. When I was circling over the slak, I heard “Cessna 1234V, Number 6…”
Well downwind, long downwind actually, all the way to Moffet where I turned base over Google Headquarters hehe :)
The landing was alright and I was observed by four of five airplanes holding for takeoff....

Man what a flight! I just love to fly like that and wander in the sky aimlessly :-)
Next time I’ll go south, or more to the north ?

Click for More Pictures

Happy Landings

First Solo tour of the Bay ! 

Well, I can fly solo now! My CFI checked me out on the club’s PA28-181 and 161s.
So to celebrate that, I decided to fly last Saturday and go to Monterey with Julie and a co-worker friend of mine who happens to be a pilot too.

Weather of course sucked, so we had to change plans. I decided right before startup that we would go to Reid Hillview, then somewhere north like Oakland or Hayward, and that we would advise, depending on weather conditions over San Francisco.

“Palo Alto, Ground, Cherokee 12345V, at Lima 16, with Hotel, ready to taxi for a straight out departure to Reid Hillview”. Well, I messed up the message a bit, but it resembled something like that ;-)
Right after take off, we were sent off to Moffet Tower, that is just south of Palo Alto. We flew over the airfield, and apparently, Moffet controller didn’t want to talk to us very much so he told us to switch to San Jose tower thirty seconds later. This part is very fast, 4 different frequencies in less that 5 to 10 minutes.
We flew over Santa Clara, NVIDIA’s HQ, Great America Parkway, San Jose Airport. Overhead the airport, we switched to Reid Hillview tower who cleared us for a direct approach runway 13 Right.
There was a strong crosswind that day, so I decided not to deploy full flaps. This had implications on the speed of the airplane… I arrived a little too fast, so I executed a go around, then another hehe, better safe than dead as they say, right?
Next try went alright ;) One thing to note is that the tower controller was very nice at Reid Hillview.

Anyways, after that, we headed to the north, living San Jose to the left, and with a nice view of the mountains on the right…
After half a dozen miles, we decided Oakland was going to be our next destination. This is the home base of my co-pilot of the day, Bruno. (Thanks again for the help with the radio ;))
We contacted Norcal approach, and got cleared for approach to runway 27L, which we later changed to 27R. Not much traffic in the pattern besides a Learjet arriving from the north. The runways at Oakland are much wider and longer, so this was better that Reid Hillview and Palo Alto :)
We did a touch and go and asked for the same again, followed by a departure to the north for the continuation of our bay tour.
“Cherokee 45V, number 2 behind the Learjet on final, cleared to land runway 27R, caution wake turbulence”
After this last touch and go, we flew towards Oakland (the city this time) and then to the Golden Gate Bridge, overflying Treasure Island, Alcatraz… Even though the weather was not very good, it was still a wonderful sight!

At the Golden Gate Bridge, we decided to go home, and request a direct through Class Bravo. We got cleared and flew south east, over San Francisco City, Daly City, KSFO… It got a little bumpy when we flew close to the mountains west of the airport… Julie didn’t quite appreciate that, so that’s why there is no more photos from that moment on hehe :-)
The rest of the flight went smoothly and we landed after a flight of an hour and 36 minutes :)

Great fun !

Here are the pictures :

Bay Tour of 04/15/2006
Bay Tour of 04/09/2006 (Checkout flight with CFI)

Happy Landings !

Flight Videos 

I have added a new section to the blog : Flight Videos

It will contain videos I or my passengers made during my flights. Eight videos are already available. I hope you have fun watching them. They were all shot by my brother Sébastien during a flight we made to Chambery in August 2005.

Previews : (click image to download)

Landing at LFLY
~/Downloads/Videos/Flights/Landing at LFLY.avi

Taking off at Chambery
~/Downloads/Videos/Flights/Taking off at Chambery.avi

Flying with the Clouds...
~/Downloads/Videos/Flights/Flying with the clouds.avi

You can watch the rest of the videos in the Flight Videos Gallery.

Happy Landings !

Last flight of 2005 ! 

Last saturday, I could finally fly !
Considering the fact that the day before, the whole country was under a big snow storm, I thought a flight just the day after would have been a treat, with lots of white scenery ... well, no it wasn't ... The cold weather we had was long gone when I took off and the temperature had be way above zero from the early morning, so all the snow was melted away ...
I was unsure about whether we (My lovely copilot Julie and I) would take off or not ...
First turn off was the fact that we had to pull about 6 aircrafts prior to reach the one I booked, which was in the very back of the hangar...

Since another aircraft was closer to the door, we decided to go back to the Flying Club's desk and book the other one instead... Bad timing made it impossible, another pilot was just getting in to book it ... Well, at least, we'll have more hands to clear all these birds out of the way :-)
Five minutes later, we were ready on the tarmac, with full tanks! There was only a quarter left but I always feel better with more fuel than less ... I like this French saying: "bidon plein, coeur léger !"...
Anyways, the aircraft hadn't flown for 6 days. I had to manually spin the propeller to ease the starter during engine startup... It has something to do with oil being moved around in the engine or something ;-)
After a quick preflight check, we were ready for startup, took me three attempts before Kilo Bravo would start, and man it was coughing!!
Little birdie was cold! But after a few seconds, the engine ran like a charm though ;-) We took off about five minutes later, and we were almost alone on the field :)

Weather was not perfect that day, ceiling and visibility where quite alright, but we could see rain showers in the distance … We headed south, to Sierra Alpha report point… After this point, I started climbing and we flew into a light rain shower … A quick look to the north (my intents where to make a quick tour of Lyon by the east), made me realize I might not meet friendly weather … The visibility there was more than crappy, kind of like if it was raining heavily … I decided I wouldn’t fly in this soup and return to the airfield … Made radio contact again and flew back to the airfield… I forgot to mention that the wind was quite high that day. If I remember correctly, it was something like 190° at 18 to 25 knots … Runway 16 was in use, so the crosswind factor was limited…

Anyways, I still took the time to make a little detour to the north of the airfield to fly over my house ;-)
On the way back, it was kind of shaky! My copilot wasn’t feeling very good; we were bouncing off on turbulences. Since the wind was kind of high, I only deployed 10° of flaps…
The landing was a perfect kiss, once I reduced power prior to the flare, the aircraft was stable and I could land it without a single shock or anything ? I love DR400 for that, it’s so easy to make kiss landings!
40 minutes of flight … It’s always wayyyyyy better than nothing ;-)

Happy Landings …

USA Air Traffic 

I found this on a post on Pixelpoke's Blog.(One of the FS Developpers).

It's a website that contains videos of air traffic in the US. I just love the "Color coded aircrafts" video, especially at the moment when day starts at the end of the video.

Happy Landings

So what’s up with the simulator ? 

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

Not much news since last post about a month ago… I’ve been very busy on other stuff, but now I’m back to business.
I’m sure every reader of this blog saw that the final build of Visual Studio 2005 was released last week. I had to try to build the simulator with it.
Of course, I ran into problems ?

Managed C++ Wrappers:

I knew these would not compile and I would get one of these weird link errors …

First one I got was about unknown references to DirectX assemblies. Apparently the project converter forgets to transform a macro and leaves a “{reference path}” instead of the actual path or something. I removed the references and added them by hand and the error got away.

Second thing I had was a problem during the linking. I got a link error that was saying that some .ctor function was missing. Of course with no information on what type this constructor was not found in. I only had a mangled function name to work with :-/
I browsed Google and found that I had to add these libraries to the linker additional dependencies.
In case it might help anyone, it was : “msvcrt.lib mscoree.lib msvcmrt.lib”. (does that make sense ?)

ODE :
There was another linker error with ODE. It was unable to find this function: “__iob”. I found out it was called from a printMessage() function withing ODE source code.
I recompiled ODE with the content of this function commented out and everything compiled alright.

fmod :
No specific problem besides the ctor and the reference path thing.

So now, I have the simulator running against the .NET Framework 2.0 !
I put some generics in the sim. It seems like it’s running a little bit faster. But I have 63 ArrayLists and Collections to convert so I’m far from being done on that one.
One problem I have though is that when I run the simulator with F5, it is freakishly slow, about 12fps … I get 60+ in Ctrl F5 … If anyone has a clue on that, let me know.

Also, take a look at this. This is the class diagram I generated with VS2005.

I’ve also created a simple Line Counter Visual Studio add-in (real easy with VS2005) and it tells me my .cs and cpp files count a total of 13000+ lines. Of course, this is the raw count, leaving the InitializeComponent()’s, comments, empty lines, and other generated functions.

Happy Landings,
Matt

 

New release of the Flight Simulator Project and Thoughts... 

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

Last Saturday, I released a new version of FSP. This version includes the following:

Changes in version 1.0.2107 (2005-10-08) :
- Added Com/Nav Radios

- Added a DME
- Added a Contrast/Saturation/Brightness Filter
- Added an option in the Options window to disable the post processing filters (for better performance)
- Added a new aircraft: Cessna 172SP
- Added Google Earth Communication!
- Added a tower view
- Added a Replay
- Added DEM support
- Added Fullerton (KFUL)
- Fixed a bug that was screwing up the lighting inside the airplane
- Tuned evening and sunset colors

So in short, lots of changes.

One note though, there's a bug with frequency tuning on the NAV instrument. The frequencies are not properly set. This has been fixed since and will be included in a later release.

One other note about the people in general...
I added two new questions in the FAQ because apparently people think:
- FSP is a side project of a Microsoft developer (
http://del.icio.us/tag/simulator?setcount=100 search for : FlightSimulatorBeta)
- FSP is FS2006 ... (
http://flyawaysimulation.com/postt8779.html)

Of course, this is *NOT TRUE* ...

Happy Landings

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 !

Panel Gauges with Dynamic Textures 

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

Cessna 421 - New envmap and Specular Ligthing

As some of you have noticed, on the latest screenshots of the game, was an attitude indicator gauge on the lower left corner of the screen. The placement of this instrument  was becoming annoying so I decided I would put it at its proper place that is, inside the cockpit, screwed to the instrument panel.

To create an instrument, I had to go through a few steps.

1 - Create an object in the model editor (A plane, with a dummy texture)
2 – Assign an xml tag to this object. This tag contains the name of the gauge class to use on this particular object. The texture of the gauge will replace the dummy texture.
3 – Load the airplane, and find all objects that reference a gauge in their xml properties
4 – Load the specified gauges from the code
5 – Every interval (1 second by default), call the Paint() method of every gauge, for them to update and render their stuff on their internal bitmap.
6 – After the Paint() call, copy each gauge bitmap to dynamic textures
7 – At 3D object rendering, replace the dummy texture by the gauge dynamic texture.

Two great things about this:
- I can place a gauge almost anywhere on the airplane.
- The drawing part is done with GDI+ so I don’t need to implement some sort of API for drawing stuff in gauges.

One thing that I fear:
- I don’t know how this will behave with lots of gauges
- I already know that big textures (>512) slow the game during the copying from system memory to video memory. That’s why I do this every 1 second. So far, I have not witnessed any slow downs with current gauges. Their sizes vary from 128x128 to 256x256.

I had already coded some gauges back when I was working on the instrument panel so it only took a couple minutes to adapt the code of each one to the new system.
So now, there are 4 gauges inside the Cessna 421 :
- An attitude indicator (Artificial horizon)
- A variometer
- An Altimeter
- A Garmin 430 only showing Com1 and Com2 radios for now.

Screenshots :

[Gauges] Stress test [Gauges] Inside view
Stress test and new Garmin 430

[Gauges] Inflight [Gauges] Zooming on the cockpit
Views from oustide of the airplane

[Gauges] Garmin 430 close up [Gauges] Garmin 430 
Close up showing Com1 and Com2 radio settings and Inside view

[Gauges] Panel from oustide
Another outside view

There is no user interaction yet but I’ll implement that soon. I’ll try to make something better that FS2004 system. I hate it; it’s a pain to change radio frequencies. I think I’m going to do something similar to what we had in Flight Unlimited 2 and 3, the click and drag method…

Since this is a big update to the game, I’ve released a version today, it’s downloadable on my website here:
http://matt-online.homeip.net/flightsimulatorbeta.aspx

Happy Landings,
Matt

 

Pixel Fog and Flight Simulator Project Update 

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

Cessna 421

I’ve just released an update of the flight simulator project. This update has the following changes included:

Changes in version 1.0.2036 (2005-07-29) :
- Fixed another bug with axis assignments (I hope it'll work this time :-/)
- New physics routine, it's now frame rate independent!
- New Pixel Fog (requires shader model 2.0) (Switches to vertex fog for 1.1 cards)
- Changed Grip of wheels on the ground
- Added a wind configuration window
- Added a visibility configuration window

A couple of comments on this list

Winds:
You can now practice your cross-winds landings with the Flight Simulator Project ! A new tab has been added in the Weather window. It adds the ability to set wind direction and speed.
The turbulences are ready behind the scenes, but I haven’t set any public way of setting them yet. This should come up soon.

Visibility Settings:
During my first shader tests I posted screenshots of a fog shader that could show haze at low altitudes. I have now exposed public values to set the general visibility and a factor of how much fog you want to see at low altitude.

This actually uncovered some problems due to the way the fog is implemented by default in DirectX I think. When objects are not tessellated enough, the fogging becomes inaccurate.
I then implemented a pixel fog shader. This shader computes the fog values to the pixel and not to the vertex, making it more precise and realistic without adding new faces to objects.
Comparing these two pictures shows the difference between the two techniques, especially on the runway and ground :

[Fog] Vertex Fog 
Vertex Fog
[Fog] Pixel Fog
Pixel Fog

Frame Rate Independent Physics:
Up until today, the physics were updated at the same rate as the graphics. To make this work in most cases, I had to lock my frame rate to 60fps. That was becoming harder and harder as I added new things to the program.
This won’t be an issue anymore. The physics are now updated at a fixed rate, but no longer frame rate dependent.
I had tried to do this before but I never got good results due to a simple mistake I did in the early days of the simulator. This error apparently messed up the frame time calculations making the whole thing unstable … It’s fixed now, and I’m happy about that !

Some screenshots to complete this post :

[Fog] Short Final [Fog] Low approach with fog  [Fog] Pixel fog again 
[Fog] Pixel Fog on final [Fog] Low layer of fog 

The update is downloadable here :
http://matt-online.homeip.net/flightsimulatorbeta.aspx

Happy Landings

Flight Simulator Project - Public Beta 

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

[Cessna 421] Parking

The Flight Simulator Project is now available for download to everyone.

The closed beta test has been of great help to get rid of the most important bugs. Some still remain but most of PC configurations should be able to run the simulator.
I would like to thank Stefan, Darren, John, Mike, Antony, Raoul, and all those who helped me locate many bugs in the simulator.

If you are interested, click this
link to go to the download page.
Note that this Simulator requires at least a video card that supports shader model 1.1. (2.0 prefered but not mandatory).

Happy Landings !

Garmin GPSMap 96c - Short Review 

[Update 2008-04-13: I posted a "3 years after" review of the device here]

Last Friday was my first flight since I got myself a Garmin GPSMap 96C. This device is a handheld GPS receiver that can operate in Aviation, Automotive and Marine mode.
Complete specifications can be found here :
http://www.garmin.com/products/gpsmap96c/

During my quest for the best GPS I could afford, I was unable to find any review of this device anywhere on the internet. That’s the reason why I’ll write a quick review of it here. It’ll only cover the aviation part.

The Screen:
One of the first things that struck me with this GPS is the screen. I was afraid the display dimensions would be too small to read anything on it (160x240-pixel, 256-color), but the people at Garmin really did a great job to make everything clear and crisp.
It is very readable, even under direct sunlight. I kept the GPS on my laps during the whole flight and I never had any problem reading the information on the screen in any of the display modes.
The backlight is quite good as well, but I didn’t use it during this flight, it was on only while learning how to use the GPS at home.

Learning:
Once you figure out the way the menus work, you can do anything in the 96c without any problem. The owner’s manual is good, although some parts lack explanations.

Flight Planning:
I thought planning my flight on a device with 8 buttons and a directional pad would be a pain, but it was not !
The flight planner can create routes from a lookup by name, or a visual edition directly on the map. I programmed my flight in the GPS in a couple of minutes from the route I had planned on my ‘real chart’ of the area.
The flight was in a PA-28 from Lognes (LFPL) to St Cyr L’Ecole (LFPZ).

 

During the Flight:
During the flight, I didn’t have any problem with the GPS whatsoever. It worked like a charm with no signal loss, even when it was sitting on my laps. The big numbers on the screen helped my read the information quickly, allowing me to concentrate on the vital flight stuff.

I found this very reinsuring compared to the times when I didn’t have a GPS on board with me. Now instead of being sure of where, I’m *really* sure of where I am, and that counts when you fly in the vicinity of the weirdly shaped Paris Class A airspaces.

The waypoint switch was seamless. When passing near a waypoint, the GPS automatically switched to the next waypoint in the flight plan.
The page I used the most during the flight was the Moving Map Page with 4 data fields, including the ETE to next, Bearing, the Distance to next and the Time to next. Of course, this was combined with the 1/250’000 map of the region on my laps as well.

Battery Life:
So far, I’m impressed! Almost 15 hours of use (okay okay, I play with it a lot, and I use it when I’m in a car as well …) and most of these 15 hours were spent with backlight on. The battery indicator now tells me 2 out of 4 bars. It really beats the PDA-GPS with their 2 hours top battery life.


 

Log Book:
I was surprised after the two flights to see that both of them had been logged in the logbook section of the GPS.

Tracks:
The track feature of the GPS is stunning. After the flight, I could review my flight path, and get the time at each position on the track. In this case, it couldn’t be a succession of straight lines, I had to avoid a lot of cities along the way. (maximum altitude was 1500ftQNH)

Reception:
No problem at all during the flight, I got a correct signal all the way to St Cyr and back.

 

Well, that’s all I can write for now, I’ll certainly post an update if I feel like some feature of the 96C is worth writing about.

Happy Landings !

Environment.TickCount hidden bug with Flight Simulator Project 

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

Last monday, after two days away, I decided it was time to release a new beta version.
Just to be certain I wasn't packing a broken version, I fired up the flight simulator to check if it was still working ...
To my big surprise, it crashed! I got a NullReferenceException that i was not getting on my other computer. The exception was thrown on a portion of code similar to this one :

At Load time :
_nextUpdateCameraTime = 0;

At Runtime :
if (_nextUpdateCameraTime < Environment.TickCount)
{
    // This function will place the camera in front of the aircraft, on a fixed position, and looking at the aircraft. 
    _camera.UpdateCameraPosition()
    _nextUpdateCameraTime = Environment.TickCount + _cameraUpdateInterval;
}

// This function will update only the target of the camera, not the position
_camera.Update();

I had a null reference exception in _camera.DoSomething() because UpdateCameraPosition() had never been called.
Normally, since _nextUpdateCameraTime is set to 0 during loading, the condition "_nextUpdateCameraTime < Environment.TickCount" should have been be true on first execution and UpdateCameraPosition() should have been called, but it wasn't.
Why ?
-> Environment.TickCount was returning a negative value.
After reading the documentation, I quickly found out that this property can return a number from Int32.MinValue to Int32.MaxValue cycling every 24.9 days. This is because this property returns an signed integer representing the number of milliseconds elapsed since computer startup. My computer was up for 26 days at this time ...
If I recall correctly, this was causing problems on older versions of windows ...

Anyways, I know that the use of this function is very questionnable, but I want to note for the record that I didn't want extra precision for portions of code where I used this, so I figured I could use ticks instead of a high precision timer. This problem is fixed now and i'm using a high precision timer.

I'm glad I found this bug by myself, it would have been a pain to debug this on someone else's computer ...

Flight Simulator Project - Update 

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

[Cessna 421] Parking
Cessna 421C Golden Eagle at KSNA

Beta Testing :
It is still running, and I’m always looking for new people to test the simulator. This testing helped a lot on a wide variety of problems. The biggest issue I’ve had to fix was with the joysticks. A few days after the beta testing started, I received bug reports from people who were having problems with their joystick configuration. Apparently, the axes were mis-configured. I tried to fix this by implementing a settings window where you could chose wich joystick axis to assign to each simulator axis.
The problem didn’t go away on some people’s configuration. It turned out they were using joysticks that were made of different physical entities, therefore, different devices.
Since I was only picking out the first device I found, there was simply no way they would have been able to configure the game properly. Only their USB Pedals were found in most cases. I then made a couple modifications to the configuration window, and this problem went away.
Below is a screenshot of the configuration window, with the axis and device listing.

[Joystick Configuration]
Click to enlarge

The New Aircrafts :
Two new aircraft joined the fleet. A Piper J3 Cub, and a Cessna 421C Golden Eagle.

The Piper J3 Cub :
Find everything about this airplane here :
http://www.airliners.net/info/stats.main?id=298

To be honest, I had never planned to add this aircraft to the simulator, but an e-mail from a beta tester kinda challenged me to make a tail dragger like this one. It was interesting for two reasons :

  • It has really different flight characteristics than the aircrafts I’ve designed so far.
  • It’s a tail dragger, so the ground handling is different, and I didn’t know if the simulator was able to handle such a thing.

It turns out it is able to handle it :-) All I had to do was to move the front gear to the back of the airplane and inverse its rotation angle and it was working!

This aircraft was pretty easy to create; it doesn’t have complicated shapes, a real pleasure to design!

Enough words, screenshots:

[Piper Cub] [Piper Cub] [Piper Cub] 
[Piper Cub]  [Piper Cub] [Piper Cub]

The Cessna 421C Golden Eagle:
This airplane is one of my favorites. I’ve been wanting to do it in the sim from the very beginning. It’s a twin engine pressurized airplane from the Cessna Corporation.
Read more about it here :
http://www.airliners.net/info/stats.main?id=154

After completing the J3, I thought modeling an aircraft had become a piece of cake for me… well, no it hadn’t … It took me two whole days to come up with what I have now. What’s great is that I didn’t have to change anything to the simulator; it’s nice when it goes well like that :)

[Cessna 421] Retracting Gears  [Cessna 421] Take Off [Cessna 421] Test Flight 
[Cessna 421] Final [Cessna 421] Parking [Cessna 421] Rolling [Cessna 421] Parking

The Instrument Panel:
You might have noticed that on the Cessna 421 screenshots, there is an attitude indicator on the lower left hand of the screen. I’ve reworked a little bit on the instrument panel. This time, the instruments can be viewed in 3D.
For that, I use dynamic textures that I fill every time the instruments are updated. The gauges are drawn in individual images using GDI+, and these image are copied in textures, then displayed on the screen. This technique might not be the best, but it sounds alright so far.

That’s all for today. By the way, I’m still looking for people to test the game ;-)

Happy Landings


Flight Simulator Project – New Videos 

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

Not a lot of updates on the sim, just a few things have changed since I’ve been kinda busy on other stuff.

Intensive work should restart in a week or two, meanwhile, have a look at the latest videos of the simulator here :


http://matt-online.homeip.net/FlightSimulator.aspx (bottom of the page)

 

Some images from the latest build, with tweaked gloom.

 
Cross Country flight - New interior view

 
Turning Final 01R - Final, Gears down

  
Flaps down, landing and at parking

Happy Landings Everyone !

Bloom / Glow / HDR and Rain 

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

I snapped, I finally bought a video card that supports shader model 3.0 :) That means i could work on my HDR shader again !
Two new things to write about then, HDR and Rain.

HDR:
To achieve the HDR effect, the rendering goes through 6 steps. All of these steps are rendered to textures that are re-used in the next step.

1 – Render to small texture
To make a better rendition of the blur effect, a render to a small texture is used. The texture size I chose is 128x128.

2 – Perform luminance / brightness filter
The goal of this step is to transform the image to black and white, and to reduce or increase the brightness of the whole image.

3 – Perform a Horizontal Gaussian Blur
With a technique I found in NVIDIA and DirectX SDK, a horizontal blur is applied on the rendering.

4 – Perform a Vertical Gaussian Blur
Same as above, but vertical.

5 – Render the original image on the back buffer

6 – Render the texture of Step3 with blending, on the back buffer
This last step renders the blurred texture over the original image. The result is what is on the images below.

 
    Rain ... Dark skies ...  -       Night flight

  
Left : Light gloom effect  - Right : HDR


God's Airplane in heaven hehe :-)

 
Left : Overbright tests - Right : Blurry :)

I like what this effect does to the flight simulator, it makes it look less crispy and more movie like.
I know you have comments on the overbrightness of some of the images, but these were only tests, and all the parameters in the shaders are completely customisable. I think i'll leave it up to the users to configure them to whatever value they prefer :-)

One last comparison for a light effect :


 
Left : No Gloom - Right : Gloom

Rain:
To create a rain effect in the simulator, I had two options in mind.
The first one was to create some sort of particle system, with rain drop textures on every particle, and make them move down, just like real rain.
The second one was to render a couple of blended cylinders with rain texture (vertical lines) on them, center them around the camera and perform UV animation on the texture to make the rain drops slide down.
I chose the second option since I think it takes less processing time to do a simple UV animation than it takes to render hundreds of rain drops.
To reduce the CPU effort on the UV Animation and to avoid uploading the vertex buffer to the video card each time I modify the cylinders, I moved the UV Animation logic to a vertex shader.
Here are some pictures of what it looks like. It might look crappy on still images, but when moving, it looks really nice.
All these images were rendered with gloom shader on.

 
Nasty weather


Cessna 210 Light rain
 
Rain ...

Happy Landings!

Clouds & Autogen 

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

Two big updates to talk about today. The return of the clouds and a cool autogen feature.


Clouds :
One morning last week as I opened my window to a nice weather, with puffy clouds on a nice blue sky, I thought it would be nice to re-enable the clouds in the simulator.
Clouds were one of the first things I added to boost the realistic factor of the simulator. They give a nice impression of volume to the scenery and it’s always nice to fly around/through them, you can trust me on that one ;-)

As I’m trying to do everything by myself, I decided to take pictures of the clouds and use them in the simulator. The clouds this morning were perfect for that kind of work, sharp with a uniform background. I took like 50 cloud pictures isolated the parts I wanted and applied a couple filters on them. Then I cut and pasted the parts on a texture that contained 16 clouds chunks.
There was all the artwork I needed. The rest I took from watching how the guys from flight simulator proceed to render the clouds.
The basic idea is not to use a single billboard per cloud, but a bunch of billboards at random positions around a center point. This gives an impression volume, kind of like a  volumetric cloud when it’s just a group of billboards. It sounds stupid but it actually looks great, even when flying around/through them.

  
 
Clouds

Autogen:
A great feature that Flight Simulator 2002 brought was Autogen. This technique draws generic buildings, trees, houses on a terrain from land data. In flight simulator, you have a tool to assign a texture a group of autogen chunks. In these chunks will appear the type of objects you want to see at this position like trees, light building, skyscrapers, light houses, bushes …

 
Autogen

The great thing about this feature is that is gives both an impression of altitude and speed. You really have the feeling that you’re flying over lots of things, and not over a huge flat plan.
I’ve been wanting to implement this feature for a long time but never had the time to code it. Now the base code is done, and it works really great.
The main idea behind my implementation of Autogen scenery is to draw rectangles on the scenery and assign them a type of object (Only trees or buildings for now).
During loading, these zones are detected and an Autogen builder generates random building/tree types at random positions inside these rectangles. These objects are then rendered at their position every frame.
Result : this killed my frame rate :-/

As I was about to dump this whole super cool Autogen feature, I changed the approach of the whole rendering procedure. Instead of rendering objects separately, I created a huge vertex buffer of all the objects that were sharing the same material within each autogen area. Instead of a thousand calls to their render method, only one render was called, therefore, only one DrawIndexedPrimitive, and only one set of RenderStates changes ....
Result : I went from 26 fps to 200+ J
As always, it need improvement, but the basics are here. Next steps for this feature will be to add more building types.
Let’s move on to the screenshots :

   
Autogen

  
Autogen

More screenshots here : http://matt-online.homeip.net/FlightSimulatorProjectGallery.aspx

Happy Landings !

Flight Simulator Project - Beta Program 

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

Note : this project is NOT Microsoft Flight Simulator 2006, it is a completely different project i'm working on. I'm not working with Microsoft, and can't provide ppl with beta versions of FS2006 ...

Update (2005-07-20) :
A downloadable beta is now available here

At the beginning of the week started the Flight Simulator Project - Beta Program. I’ve posted a message on the PilotList and a bunch of people replied for being part of the testing.

   
   
   
Various Screen shots of the Flight Simulator Project

The reason why I’m not giving it out for download to every one is to avoid the load of bug reports and I’d rather eliminate the more obvious problems on a small group of people. The main idea in this program is to eliminate the big problems and first launch issues.

Be aware that you will have to install the April 2005 Redist of DirectX and the .NET Framework 1.1.

If you are interested and want to help me, feel free to e-mail at :
FlightSimulatorProject[@]gmail.com (remove the brackets)
Please, use this as your email subject : [Flight Simulator Project Beta Program]

Happy Landings Everyone!

Note : this project is NOT Microsoft Flight Simulator 2006, it is a completely different project i'm working on. I'm not working with Microsoft, and can't provide ppl with beta versions of FS2006 ...

Cessna Citation CJ1 

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

The flight simulator project welcomes a new aircraft to its fleet, the Cessna Citation CJ1. This aircraft is a light jet and I thought it would be a great idea to have such an aircraft to test my new physics parameters. Indeed, even though the Piper PA28 and Cessna 210 Centurion, are quite different, their flight model is quite similar and aside from the engine horse power, nothing really changes, from my simulation stand point at least.

Last Thursday night, I decided to start modeling this new aircraft. I chose the Cessna CJ1 because I like its shape with the elevator on top of the rudder wing :)

The model is not finalized yet, but the main parts are completed and the overall impression is satisfying enough. It’s textured and has moving parts (ailerons) but no moving landing gears. That’s why they are down in the screenshots. But let’s just say for the record that they are down because during the first flight, I didn’t want to take any risks of it not extending properly ;-)

For the flight model itself, I haven’t really changed a lot of parameters yet. Only the aircraft mass, engine horse power, brakes strength, and wheel damping were changed. With those updated, the aircraft now takes off at approximately 100 knots, and stalls around 80. I thing it’s still quite slow, but I’ll tweak this later. I’m happy with just the fact that increasing the weight did all the trick !

Anyways, screenshots tell more that my crappy English writing, so here we go.

  
CJ1 at parking              -                CJ1 on Final 

    
Taking Off

More screenshots can be found at : http://matt-online.homeip.net/FlightSimulatorProjectGallery.aspx (Click on 'Cessna Citation CJ1')

Happy Landings !

Flight Parameters, Shadows and Aerobatic airplane ! 

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

Live from Orange County Airport Test Facilities, here’s an update on the Flight Simulator Project.
There are three things I’d like to write about tonight: Aircraft shadows, flight parameters, and a thought about optimizations.

First of all, Shadows. I’ve received several comments about the shadows in the sim. I know there were crappy. I didn’t spend a lot of time on this feature since I only needed it to get some kind of visual reference of the aircraft distance from the ground when landing. But time had come to make a little research on the subject.
Considering the fact that I had just completed my render to texture marathon, I figured I would use this approach to render shadows below the aircraft.
The process was simple, render the aircraft from above in a texture. Post process this rendering in a shader that would do some stuff to make the texture usable on a blended quad.
I tweaked and tweaked and it worked. I had my rendered shadow. One thing though, I completely forgot about the fps counter that dropped down 20 fps :-/ Well, since there was no way I would go back to the old shadow system, I decided to do this the quick and crappy way: a blended texture created off-line applied on a quad. I know, shame on me, or not, I was surprised with the results! So I’m going to stick with this technique for now :-)

Flight Parameters:
Up until a couple weeks earlier, there was no flight behavior difference between the Cessna 210 and the Piper PA-28 in the simulator. Their flight parameters were sort of hard coded. I had externalized a bunch of values already, like engine position, mass, and so on, but none of the actual flight parameters were modifiable.
I then decided to externalize more parameters, like engine power, controls inertia, lift & drag parameters … With these out of the .cs files, it’s now possible to tweak aircraft physics so that you have a more powerful aircraft or an aircraft that will stall at whatever speed you choose.
To test this, I couldn’t possibly think of doing anything besides creating an aerobatic airplane ;-)

Enters the PA-28 Aerobatic with special livery!
It’s an extended version of my PA-28 but with extra sensitive controls and a nitrogen powered engine ;-)
The flight feeling with this aircraft is different from the default PA-28, but you’re going to have to trust me on that one ;-) (When will I release a version anyways ?)

 
Touch down - Crazy aircraft

  
Final with flaps - Steep climb - Very short final !

 
Special livery - Take off

The lift and drag calculations have also been changed from a linear equation to pairs of angles/values within the aircraft configuration file. It’s now possible to have a precise control on when the aircraft is going to stall.

Optimizations:
I also worked on some optimizations, but though they should have, none of them changed *anything*, so I’m simply not going to talk about them … that’ll show them! :-P

That’s it for today.
Happy Landings !

Life.Glow() 

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

Don’t ask me why, but for the past couple of weeks, I’ve had this thing for blur, glow and all that sort of special effects …
I’ve read a bunch of articles on how to make glow in games, and I’ve taken a bit of every one to make my own glow technique…
Since I’m developing mainly on my laptop, that has ATI 9000 video card, I’m kind of limited performance and shader wise. Therefore, I wanted to avoid multiple full scene renderings and anything that would take too much time to render.

The technique I used to glow the scene is the following.
Step One :
I render a full scene to a texture that has the same size as the backbuffer. (We’ll call this texture _fullSceneTexture)

Step Two :
I render this texture applied on a fullscreen quad, in a smaller texture (say 128x128) that will be user later on. (Call it _SmallTexture)

Step Three :
I render _fullSceneTexture applied on a fullscreen quad directly to the backbuffer.

Step Four:
I render _smallTexture applied on another fullscreen blended quad directly to the backbuffer.

This last rendering has some special treatment done to it.
A Blur/Luminance shader is used for this rendering. It does two things:

  1. Blur the scene (based on the technique I’ve found on a nvidia shader sample)
  2. Transforms the pixels from their rgb to their luminance (some sort of grayscale image comes out of this)
  3. Decreases the impact of pixels whose luminance is below some threshold I’ve set.

The result is a black and white image with blurry bright zones where the original image is brighter.
Since this texture is blended on the screen, it gives a nice shiny-bright effect.
Check out the pictures:

 <- off, on ->


Flight at noon


Evening shot


Daylight


Sunset

More at :
http://matt-online.homeip.net/FlightSimulatorProjectGallery.aspx (Glow)

As always, there is plenty room for improvement, this is just a first draft and the next step will be to enable this effect on specific objects. The sky is really over brightened by this effect and it should be excluded from it. I like the whole feeling of blurriness brought by this technique. It makes the whole image less crispy and more realistic.

Ideas, comments ?

Happy Landings,
Matt

Animations (Part Deux) 

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

At last, i got these damn animations to work !
Turns out it was indeed due to some transformations on the objects hierarchy. So now, the animation support is almost complete :-P
As a test for this feature, I decided to implement some kind of semi-hard-coded retracting gears for the Cessna 210. It was not as easy as I thought it would be. The fact that the wheels are handled by ode and not children of the airplane brought a little difficulty to the process, but it works now.

  
Retracting Gears

I also took this opportunity to refactor the code of the moving surfaces (ailerons, flaps, etc...). They were kinda hard coded with some kind of an axis about which the ailerons were supposed to rotate … this was crappy. So now, I’m playing animations to move these parts. Well, not exactly playing, more setting the animation at a specific position in time. That way, the animations are now created within 3DS Max and this technique works for every aircraft.


Cessna 210

I also added some dynamic elements to the scenery and started with a hangar that has animated doors. A script opens them when an aircraft gets within 10 meters of the door and closes them when it gets away. This is really fun to watch :)
Pics:

  
Hangar doors open ...


Cessna 210 parked inside


So what’s next ?

Happy Landings, Matt

Cessna Centurion and Animations 

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

After the ChaosLogic rush of last week, I finally had the time to continue to work on the simulator. There are two things that I’d like to talk about in this post. The modeling of the Cessna 210 Centurion and my big failure in implementing hierarchical animations in the sim…

The Animations
I thought that would be an easy part to complete since I had looked over the output from the IGameExporter before, and it appeared quite easy to read and implement… I could have not been more wrong…
I forgot the fact that every time there are transformations involved in something that comes from 3DS Max, I’ve got to pull some hairs to do what I want … The exporter provides a series of quaternions for the rotations, and translation/scale vectors. So, to test this, I created a simple scene within 3DSMax, added a bunch of animations to linked objects and exported it. Believe it or not, that it was actually working! I had my teapots moving around… It's only a semi-failure then :-P
I then decided to move on the the real stuff, the retracting gear animation of the Cessna 210 … And that’s where things got out of hand.
The animations were all messed up and rotating about the oddest angles … After some investigations, I finally came to the conclusion that this might be due to the parent/child relationships and the successive transformations that I applied during the modeling … I tried resetting xforms, resetting pivots and clicking on whatever buttons I could find, but nothing worked …
I can’t really recount here all the funny animations I’ve experienced along the way; this would take too much time. I’m sure however that all those who have worked on a 3D project have faced that kind of problem...
In the end, I decided I would give this animation thing a break and come back to it later … it’s not like it’s the only thing left to do in this project!

The Cessna 210 Centurion
It’s nearly completed, the texturing is done and I’ve corrected the remaining things that were going wrong with it. The interior is now modeled including the control panel.
I’m just back from a photo shoot flight ;-), check out the pics below.

 
 
 

Happy Landings !

Cessna 210 Centurion 

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

Well Well, after a pause in the flight simulation area, it was more than time to get back to work! So what’s new since last time?
A few things, the arrival of a new aircraft in my library, a brand new Cessna 210 Centurion (I love this bird), followed by a code refactor of the aircraft section and one last improvement in the model loader to correctly support 3DSMax smoothing groups. (it was becoming more than necessary !). It's also possible now to change the aircraft model at runtime !

The Cessna 210 Centurion:
I was getting fed up with the good old Piper PA28, I wanted to add a new aircraft to my fleet. I decided to roll up my sleeves once again and started to work from scratch on the 3D Model, and I’m amazed to say it turned out pretty well :)


Cessna Centurion in 3DS Max

I had to change a couple of things in the code to make this new aircraft work, since some portions of the code were apparently a tad too hard coded :-P. Each aircraft now has its own flight data xml file with like engine mass, aircraft mass and so forth…

The First Flight :
The flight model tweaking done, serious stuff could start! Flying ! But prior to that, i had to correct one last thing ... I found out that the normals that were calculated for the aircraft objects were completely messed up somehow … I found a way to correct the problem and added support for smoothing groups while I was at it :). Pictures are better than words, let’s move on to the visual stuff of the First Flight !


Fashion Picture ! She's pretty :)


Flare ...


At Parking ...


Close up


One last, steep turn
At Parking

Next step, design the interior and texture this new bird ! (More info on the Cessna 210 Centurion can be found at Airliners.net here)
Happy Landings

Mousse-Avion Part One 

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

La semaine dernière, Shark et moi avons pris notre revanche sur la météo. Notre première tentative de vol ayant coulé(c) à cause d'un brouillard, nous décidé de retenter de partir voler !

Cette fois la météo était de notre coté, il a fait beau malgré la visi assez faible en direction du sud ouest, qui ne nous pas empeché d'apprécier le vol !
Nous avons été à Coulomiers faire un toucher, et ensuite nous sommes repartis en direction du terrain de Fontenay Trésigny.
Je ne pensais pas qu'on allait s'y poser, mais en passant au dessus, on a remarqué une des caractéristique du terrain : un restaurant dans un vieux bréguet deux ponts (je crois). On a donc été poser les roues dans ce coin perdu, à seulement quelques minutes de vol de Paris...
Le retour s'est passé sans encombres avec en bonus pour Shark, une démonstation en direct live du fonctionement d'un PAPI ;-)

Voici quelques photos du Premier Mousse Vol !


Fashion Dude in Fontenay Trésigny


Le tableau de bord du Mousse-Avion


Mousse Disney


Shark, tu as bu !!

Happy Landings ...

Scripted Precision Approach Path Indicator 

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

As i wrote in a past article last august about scripting in the Flight Simulator Project, i wanted to add a Papi in flight simulator.
For those unaware of this flight term, PAPI stands for Precision Approach Path Indicator. It's a light aid placed on the side of the runway that helps the pilot maintain a correct landing path (only on the vertical axis).
It is made of very high intensity directional lights oriented at very accurate angles so that if you fly over the path, you see a white light, and if you fly below, you see a red light. There are usually two or four lights.
For instance, on a correct approach it would look like this :


Two red, and two white = correct approach path

I thought implementing such a feature would be a piece of cake, but it wasn't, it made me pull some hair actually ... Maybe because i didn't use the right technique... I really had a hard time calculating the appropriate angles between vectors ... anyhow, it works now and it looks cool, especially at night !


Close to the ground, almost all red

One cool thing about making a simulator alone is that you can never get bored with anything ... There is so many things to do ! Yesterday i was not feeling like coding, so i fired up 3DS max and started working on the aircraft 3D model. Plenty things were missing like VHF/GPS antennas, flaps details, a dashboard ... I then added them to the aircraft and it looks a little more realistic now :-)


Details from underneath ...


Dashboard and various reworks...

Well, that's all for tonight ...
And yes, i'm thinking about releasing a version, i just don't know when yet ...

Happy Landings, and like they say :
"Red over red, you're dead, red over white, you're all right, white over white, you'll fly all night"

Flight Simulator 2004 ranked 19th ! 

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

While browsing a website this morning, i found this article about the best selling video games in USA last december. I was gladly surprised that Microsoft Flight Simulator 2004 was amongst the top 20, ranked 19th !

Since this version is a year and a half old, it is amazing to see it at this place ! :-)

Let the sun shine ! 

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

In Microsoft Flight Simulator history, there was one big thing that had been missing from the game for a very long time until a couple versions ago : the sun.
Sure there was light, and it was correctly oriented, but if you looked in the sky, well, there wasn't some big bright shiny thing, bringing happyness to this virtual world !
The flight simulator sun rose in flight simulator 2000 or 2002, i don't remember...

Yesterday, i decided i would try to implement the sun in the Flight Simulator Project. I had thought of two ways to do this.

  • A sprite in the sky where the sun would be
  • Adapting my skyplane shader to make it 'show' the sun where it would be. More like brightening the vertices nearby...

I chose the later. I modified the shader code and added a bunch of variables like the sundirection, the sun color, it's intensity (is it a big hot summer day sun, or a shy winter day sun ?), the color decrease factor ...
The first results were not convincing at all :)

The concept is very simple, calculate the angle between the vertex position as a vector from the origin and the sun vector.
The smaller the angle, the brighter the color is. 
A couple of lerp calls later the sun was shining !
It still requires some tweakings during sunrise and sunset, but the day part looks amazing i think :)

Check out my gallery for more screenshots.

Happy landings !

New Flight Simulator Project Videos 

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

I've made a couple of videos of the new scenery i've been working on for the past few weeks.
It has moved from Livermore to Santa Anna - John Wayne Orange County airport in southern California.

Video

The new scenery looks great and i think i'm going to stick to it for a long time :)
I need to adapt a few things though. It turns out that the scale i used is not correct, i'll have to rescale the whole scenery and this will take time.

Anyways, here are the videos :
Video1 : The regular one, with regular airplane stuff.
Video2 : The crazy video where i forgot that i was playing with a million dollar airplane :)
OldVideo : A video from the last scenery in Livermore in case you missed it.

I've also posted a few new screenshots in the
gallery here.

Happy Landings !

Coup de folie ! 

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

Cette après midi était trop belle pour ne pas en profiter... Beau temps, visibilité géniale, pas un nuage a l'horizon ... un coup de fil à l'aéroclub, et une heure plus tard, j'étais dans le siege gauche d'un DR400 à Lognes !
Ca a été un vol bien sympa, et assez mouvementé, en effet, le vent de sud-sud-ouest cachait bien son jeu ! La manche à air était presque horizontale parfois ...
L'occasion de s'entrainer un peu sur les atterrissages vent de travers...

Décollage quelques minutes plus tard, et direction l'est, vers EuroDisney, à 1500ft maximum... coucou à Mickey et direction Coulommiers, une ancienne base militaire.
Je voulais juste faire une verticale à Coulomiers, mais finalement, je me suis décidé à faire un touché... léger vent de travers, un peu de pied à droite, manche à gauche, et tout rentre dans l'ordre ! Au décollage, j'ai pu appercevoir les parking utilisés pendant la guerre pour garer les avions, des petits ronds en dur, bien éloignés et en cercle, pour éviter qu'on puisse bombarder tous les avions à la suite !

Décollage vers Lognes, sur le QDM 270 du vor de Coulomiers, la visi est bonne vers l'est, mais l'ouest est completement brumeux à cause du soleil qui ébloui et qui reflète de partout ...
Travers Eurodisney, je contacte Lognes, qui m'autorise longue finale 26, derriere un appareil en finale, puis finalement 3eme parce que j'étais plus loin que prévu, je m'aligne donc derrière un DR400 qui a tourné en dernier virage quelque peu avant moi.
Je sors plein volets, ca secoue beaucoup, le vent sournois qui était régulier jusqu'a présent se met à turbuler dans tous les sens ... il faut que je prenne de la distance par rapport au dr400 qui est en finale pour un toucher...
Il touche, re-décolle et me voila en finale, autorisé à l'atterrissage ... 210° - 10 noeuds de vent je crois, ca fait un petit vent de travers qu'il a fallu combattre au pied en décrabant ...
Courte, et hop, posé, manche au ventre, freins, première a droite !
Contact avec le sol et puis roulage au parking ...

Quel pied !
Les Photos Ici 
(puis 'Lognes Winter')

Happy landings

Y a des jours comme ca ... 

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

... ou les choses ont décidé que ca ne se passerai pas comme ca !

Je viens de passer une journée a corriger bugs mystiques après bugs mystiques ... et en discutant sur le net, j'ai établi un début de description de ce qu'était un bug mystique :

Le Bug Mystique :
-> On ne sait pas ce qui le provoque
-> On ne voit pas du tout d'ou il peut venir
-> On a aucune piste par ou commencer a chercher comment le résoudre ...
-> Il est super illogique ... enfin, il y a 99% de chance qu'il soit très logique, mais on le croit pas ... on est dans les 1%, c'est sur !!!!

Il y a surement d'autres choses qu'on peut ajouter a la liste ... toujours est-il qu'aujourd'hui, j'ai même fait face a des corrections mystiques de bugs mystiques ...

Etape 1 :
Tout marche

Etape 2 : 
Je change un truc qui à priori n'a pas de rapport ...

Etape 3 :
Un pauvre bug graphique se produit ... des nuages et/ou le skydome ne sont pas dessinés ... parfois ...

Etape 4 :
Je casse mon code pour revenir en arriere, apparement le bug est pas récent ...

Etape 5 :
Me disant que j'ai tout cassé, je rollback à ce qui ne marchait pas ... et la, ca fonctionne ...

Etape 6 :
Retour à l'étape 1, mais avec un autre probleme bug caché ;)

Tout ca pour dire que les corrections mystiques de bugs mystiques ...
Certains diront que c'est un message subliminal de Visual Studio qui en a marre de compiler le flight sim, et veut passer a de l'asp.net par exemple :)

Flight Simulator Project coding spree ! 

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

That’s like a tradition now, with vacations come updates for the Flight sim project. This break gave me the opportunity to make changes on a lot of parts of the program.

1 - Flight model, ground handling:

There is one thing that has been bugging me since the very beginning of the project: the aircraft ground behavior. For some reasons, driving the aircraft around on the taxiway was not enjoyable. The aircraft was slow, non responsive, the front wheel wouldn’t do its job after a certain speed, and more importantly, the aircraft would sink in the ground when moving too fast! …

I searched around on the net and I came to the conclusion that changing the step function of ODE might help. I replaced dWorldStepFast1 by dWorldQuickStep and voilà! All the annoying behaviors I had with the old technique were gone !

You can see in the latest video that the aircraft can have its engine turned on and off, of course, with the proper sounds.

2 – Airports, terrain:

The scenery has been updated a little to support functionalities added with the ambiances described later in this post. A control tower and a bunch of fences have been added to Livermore airport scenery.

3 - Aircraft Model:

One of the things that were hitting performances was the aircraft model. Some areas of the airplane were too highly tessellated. I decided to roll up my sleeves and started to work on a remake of the 3D Model. After a couple days, the polygon count of the aircraft was reduced to 10% of the original count.

4 – Optimizations:

I tried to optimize the engine a little and especially the rendering loop … I did a few changed and these, combined with the revamped model, resulted in a huge framerate boost!

5 - Ambiances, time of day:

I’ve added an option to change the current time in the sim. It’s not really accurate since the times of day are ‘fixed’ and the sky colors hard-coded, but the feeling is very nice and the colors change smoothly. You can see this in the video I mention at the end of the article.

6 – Turbulences:

One thing that was missing from the sim were the turbulences. The aircraft was way too stable in its flight, and it is almost never like that in reality. In real life, the aircraft always ‘shakes’ a bit on all its axes. I then decided to add a small module that added random forces at random points on the aircraft.

This new effect feels really nice and the flight experience is even better. One great thing about this is that the pilot now has to ‘fight’ against the wind on short final to perform a smooth landing.

7 - Instrument Panel:

An instrument panel module has been implemented. It can contain gauges that could eventually be scripted for each aircraft. The drawing is in GDI+ for now which gives quite acceptable results.

6 – Videos:

I've made a new video of the sim in action so that you can witness the evolutions of the simulator.

You can download it here.

I will blog soon about the first airport->airport trip completed in the flight simulator project !

Happy Landings/New Year Everyone !

PilotList 

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

J'ai appris depuis que j'écris ce blog que quelques étudiants de l'école sont passionnés d'aviation ou s'y interressent de près.

Je poste donc un message pour parler d'une liste de pilotes, la PilotList, qui réunit plus de 700 pilotes, en majorité français et qui existe depuis de nombreuses années.
Elle est une mine d'informations pour les pilotes et malgré les troll aériens récurrents, c'est vraiment une liste passionnante !

Pour plus d'informations, rendez vous sur http://www.pilotlist.org

Souvenirs ... 

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

Pour ceux qui veulent savoir à quoi ressemble l'examen de passage du brevet de pilote, le récit de mon examen, il y a 3 ans déjà, est disponible ici :
http://www.pilotlist.org/bestof/resultats.php3?auteur=Matthieu%20Laban

A chaque fois que je le relis, ca me rapelle plein de souvenirs :-)

Simulator Update 

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

I’ve realized I haven’t posted any update about the Flight Sim Project for a long time; quite a few things have changed though …

Shaders :
I’ve always thought shaders didn’t like me, every time I tried to code something that used shaders, it turned out to be a big mess and I always ended up either rolling back or pulling my hair because of some useless “System Error” exception from the shader implementation of Managed DirectX … (I know it was aallll my fault :-P)
I decided to give myself another try with this shader thing that everyone is talking about … and this time it worked.

What I wanted to do was to rewrite the fog implementation for my terrain. The basic one is cool, but I wanted to add some kind of low altitude fog, like the one you see in those San Francisco bay pictures. It turned out that the only way to this easily was via a vertex shader that would take the distance between the vertex and the camera and set its fog value according to some calculation …

I started with this and added a special thing to this algorithm to add more fog at low altitudes. I wouldn’t say the result is awesome, but it looks… well… different from the default fog implementation. Apparently, the blog galleries are down today, so I can only point to a gallery on my website.

While on my shader spree, I decided to rewrite my sky plane with a vertex shader as well. It now works with a simple linear interpolation between the haze and sky color along with an offset to make the haze look denser.
Before this, the sky colors were rendered using simple vertex colors, I don’t really know if this new technique is faster, but it sure is kewl ! :)
One other thing about this is that i can update the colors and some other parameters quite easily.


Flight Model:
On the flight model part, not much has changed, I’ve implemented a trim function. This feature is going to be handy when I’ll tweak the flight parameters. The current set of flight parameters are still a little unrealistic sometimes, especially the stall speed.

Happy landings

My Life 2.0c 

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

Today was a great day, I’ve participated in the removal of a bug in Escence which was causing a huge memory leak due to a wrong version of some third party tool ... It seems to work now :)

But the most important news was the first flight at my new flying club in Paris !
This club requires all new members to have some kind of validation flight with one of their flight instructor to check if you can still fly hehe :)
So, I booked an airplane for this afternoon with a flight instructor, and i took this opportunity to have my license renewal flight at the same time. (we're required to fly a one hour flight with a FI during the 12 months before our pilot license expires).
The aircraft we rode, a DR400 is of the same type as the one that I fly in Lyon, so not much changes on that part …
We flew for a total of one hour and eleven minutes, in one of the worst weather I’ve even had to fly in ... visibility wise at least ... We took off from Lognes and went straight to Coulomiers, a few nautical miles away from our departing airfield.
Class A airspaces all around forced us to remain below 1500 ft at first ... but we soon faced low clouds ... so we couldn't fly at more that a thousand feet high ... Visibility was about 2km ...
10 minutes after takeoff, and with the help of the VOR at Coulomier, we arrived abeam our destination airfield, where we did a few training landings. Normal, short, flapless landings and so on, I really had a lot of fun … I don’t know why I enjoy so much landing aircrafts … :)
After about 5 landings, we headed back to Lognes and flew over Disneyland.

1h11 of pure pleasure and memory refresh on a lot of aviation things, I can fly in my new flying club now :)
Nice day, really!

Detailed Textures 

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

There is a cool feature of Flight Simulator 2004 that I really like; it's the Terrain Detail option. It enables something on the textures to make them look like they are at a higher resolution.


Detailed Textures on


Detailed textures off

This special effect also adds an impression of speed to the simulator since more little things move on the screen.
I thought it would be cool to add this to the sim :P
First thing I thought of was to resample the textures on the objects, add some sort of computed noise on them, then apply this modified texture back...
Not a good idea ...
A better idea would be to use MultiTexturing capabilities of DirectX9 !
A few lines of code later, the effect was in place and working ... The process is simple, place a transparent noise texture on the objects that would add a general feeling of noisiness on them !

Screenshots : (Click to zoom)


Flight Sim Project, without Detailed Texture Effect

Detailed Texture Effect on (Maybe i put too much noise on this...)


Happy Landings !

Crowded airport … 

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

With ‘the piscine’ and all the things that have been going on lately, the simulator has not been updated for a month …

This week end away gave me a chance to catch up …

One major update is about the ATC, things have evolved and the ATC aircrafts now have the ability to taxi to the runway, ask for takeoff clearance, take off, contact the tower for landing clearance and report in downwind then final …

Each one of these steps took some time to design, and this system being linked to time and not linear, the more options I add the more difficult the coding is … I have to deal with a lot of variables to update the aircrafts, the ATC Entities … I think I’m going to keep coding this way until I can safely land an aircraft back, then I’ll refactor the ATC code …

I’ve faced a lot of problems that I haven’t handled the same way … and this would be the occasion to even this up and use the same technique everywhere…

The aircrafts are a little more clever now, they don’t collide with each other, they stop when an other aircraft gets too close, and they get in line for take off.
The clearance for take off is only granted by the tower once the runway is clear. It’s really fun to watch the aircrafts wait for their turn to take off!

 

The aircraft camera motion has also changed. It’s no longer like in the video, it now has smooth interpolations between positions, and a slight change of angle when the aircraft moves abruptly. This last thing is going to be interesting when turbulences will be added to the wind system.

The aircraft model is a little better now,  I’ve purchased a nice Garmin G1000 Glass Cockpit for the aircraft, check it out in the gallery !


 

Happy Landings !
Matt

Flight Simulator Team Video 

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

Steve Lacey posted a message on his blog about a video of Channel9 who came to visit the flight sim team :-)

I really enjoyed this video, we can see Steve, and a bunch of other guys from the team talking about their job :P (Lucky them !)

One thing that struck me the most is that their place is huge, and that they are about 60 to work on the sim.

We learn that the sim is in C++ and asm in some parts, and that they build some of their tools in .NET.
I would have liked to see the guys who work on the physics model, and on the weather, and on the aircraft models, and on the scenery design, well everyone ! :-)

Really a nice video, too bad it's too short :P

Happy Landings everyone !

Thoughts ... 

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

... as i got woken up by some maintenance people coming to my apartment to check on some over-heating problem it has had for ever ...

I don't have enough time this month for two things :
-> Flying ... i can't get back to Lyon to fly, my week ends are too short :-/
-> Coding on the Flightsim Project ... ending work day at midnight doesn't help ...
I'm glad this TA job ends in two weeks :-P 

I saw on the blogs of two Flight Sim coders (lucky them :P) that they were visited by a team of Channel9,
and that the video should be available soon on Channel9 website :-) Cool eh? :-D

Still no idea about the graduation project/game we're going to code ... We know it's a game, we know we want something not too big, but not too easy, we know we want to complete it (for once), and that we definitely want a *fun* game ! I keep proposing a flight simulator, but i get beat up all the time :-P

Training period report... 30 pages and has not grown by a word for three weeks... i'll work on that this week end ... After i get my new-old 17" screen to replace the one that died last week ...

Note for later : talk about the updates on the Flight Sim... ( the ATC is now a little more clever and won't clear an aircraft for takeoff if there's already one on the runway :-) )

 

Simulator news, live from (virtual) Livermore California 

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

Since last Flight Sim post, a few things have changed.

 

ATC

The communications between the Traffic Controllers and the AI Aircrafts have been improved. Aircrafts can now do the following sequence:

-> Listen to the Atis

-> Contact ground controller to be cleared to the active runway

-> Receive a path to the runway, assigned by the ground controller

-> Taxi to the active runway, by paying attention to the other aircrafts on the tarmac, holding position when a collision might occur.

-> Once at the runway, they contact the tower controller, and ask for take off clearance
-> Once clearance is received, they line up and take off.
-> A few seconds after take off, they ask for landing clearance, and receive a report point somewhere in the pattern of the active runway.

This sounds simple but it’s not as easy to implement as what I thought is would be...
A few things are left hard coded for now, the runway assignment is not done according to the wind direction, and any aircraft who would ask for take off clearance would be cleared since the tower controller doesn’t check whether the runway is clear or not.

The Flight Model:
I have changed a few things on the flight model. For the ground part, the nose wheel can now be at intermediate positions for turning, which facilitates the ground handling of the aircraft.
I’ve ran a flight test today, to check the limits of the flight model, and I think it’s quite realistic (unbelievable :-P). One thing still does not work quite right. The flaps… for some reason, they don’t do their job … Instead of slowing down the aircraft, they tend to make it accelerate. Apparently due to some miscalculation in the lift coefficient when they are down … I'm gonna have to look into this sometime …

I’ve uploaded a ten minutes video that shows the aircraft in action. The video stutters from time to time, this is because the program I used is shareware and limits the video capture to 30 seconds.

You can download it
here (17 Mo)


Here’s a little description of what you can see in this video:
0:00 -> 1:00 : Aircraft lines up and takes off. At a certain point, an aircraft passes it by and takes off … For testing purposes, I’ve increased the speed of AI aircrafts, that’s why it rolls a teensy bit off the runway …
You’ll notice that the aircraft has a tendency to go to the right .. I don’t know why … but I have suspicions on the flaps again :-P

1:00 -> 3:00 : Downwind and base …

3:00 -> 3:30 : Final, and … I couldn’t capture the landing for this one, just like in reality, you get the “Memory card full” just 2 seconds before touch down, ruining the whole landing video :-/ (true story(ies)) I pressed the damn F9 button though … nevermind …

3:30 -> 4:00 : Frustrated … I decided to give it another try… At the very beginning, you see the debugging stuff, with forces and debugging values at key positions on the aircraft model.
Red text means this particular position’s angle of attack is negative, green means it’s positive. This indication is not really relevant at low speed though...
After this, take off and roll and a fun ride, just to see what this baby can do !!

4:15 -> 7:00 : Camera from behind and yeah, it’s me losing it at the controls !
Loopings and everything :-)

7;00 -> 8:45 : Back to serious stuff, It’s time to land … Downwind, base … final … and you got it right, ‘memory card full’ again !! I panicked, and pressed F9 too many times, which made me totally screw up my landing, yeahhh and still the attraction to the right side really noticeable from the bank of the aircraft on final …

8:45 : Frustrated again :-P back in the air for another try J Low turn over runway 25L
Downwind …

9:00 : You can notice the bug about the flaps making the aircraft accelerate like crazy …

9:30 : final … Check out the elevator moving

9:54 : Touch down, breaks … 180 turn, and end !


Many exciting things left to do !
Happy Landings!

?>

Roll Baby Roll ! 

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

Last time I posted here, I was in the process of making aircrafts talk with the control tower. The next step was to assign these aircrafts some sort of path they would follow to get to the runway.
Since the runway system was not properly in place, I had to implement the logic behind this entire runway/taxiway thing, and actually link the runway ends with the nearest taxiway node.

There is something disturbing about a runway … It is a single piece of concrete but it has two names, one for each end.

In our case, here at Livermore, we have two Runways :

25R / 7L (Runway 25 Right, at the other end of Runway 7L)
25L / 7R (Runway 25 Left at the other end of Runway 7R)

Which gives us 4 actual runways for take off.

 

Let us have a little refresher course about runways. The number what indicates the heading of the Runway. A runway at the magnetic heading of 250° (S-SW) will be assigned the number 25. On the other side of the same runway, since we’re facing the other way, (N-NE), the heading will be 70°, and you got it right, its number will be 7. (A runway heading of 345° will be assigned 34, and a runway with a heading of less than 10° will be labeled 36).
Now you will know why pilots laugh when they watch some movie where controllers clear the aircrafts to land on runway 38 :-)
Uh, I forgot, the L and R mean Left and Right, when you are facing the runways for landing.


Here is a map of the airport:

Map of livermore from http://www.ci.livermore.ca.us/airport/

Back to our business of single runways with two ends… I had to scratch my head to make a fancy system to declare the runways within 3DStudio Max and parse the xml correctly. I wanted an easy to understand system, user-wise at least, so that I can remember how to declare a runway later on.

With this, I could easily create the structure of my runways, and find the nearest taxiway nodes for both runway ends.

Once the net of taxiways/runways was created, I could at last make the JIT Compiler compile the methods of the A* class :-)
However, before doing this, I needed the ground controller to choose the runway in use for takeoff. I ‘commando patterned’ this part and hard coded the takeoffs for Runway 25R. Then I created a new ATC Message with the calculated path in it, forged the message to make the ATC say: "N467TZ cleared to taxi to runway Runway 2 5 Right", and finally, I coded the behavior on the aircraft's side.


At last a little action in this still world ! (Besides my aircraft, the radar, and the windmills not much was going on …)


In my coding spree, I decided I would keep up with the crappy-coding ! A quick interpolation between the position/heading of the aircraft and the next node et voilà! ……… the result : an awful brutal aircraft behavior …

Since the essence of crappy coding is to generate crappy things, I didn’t expect more :-)

I finally went for another option, the clever one, and used a vector for aircraft motion, aligned the aircraft’s At on it, and move the aircraft along it and in a few lines of code, the aircraft was rolling and turning smoothly :-D

For a Screenshot of the path finding assigned by the aircraft controller, and sent to the aircraft : here.
Another one of the same aircraft taxiing : here

 

Happy Flyings !

 

?>

ATC & Optimizations ... 

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

Hi folks,

 

Since I pretty much agree with Omar’s comment, I’ll try to follow Jay’s foot steps and write something a little more clever than my last post.
For the past couple of weeks, my work on the simulator has slowed down a bit since vacations are over. I have improved a few things on the simulator however.

 

Since I had problems with non-fixed time steps, I chose to run the simulator at a fixed rate. I ran a few tests and it turned out, on my current configuration and with my poor graphic scenery, I cannot maintain a constant rate of sixty frames per second in every situations. Therefore decided to lock my frame rate to 30 fps since, along with some other improvements, that’s the minimum frame rate I would get in the worst case scenario.(heavy scenery…)
The simulator now runs at 30fps and the aircraft doesn’t fly any faster when the graphics take less time to render.
I coupled this with a frustum culling test, to disable the rendering of objects that are out of sight.
I also disabled the rendering of the shadows if the camera is too far from the object.

 

Those optimizations save considerable CPU time that I will certainly be of good use for some other parts of the program that will eventually run in another thread. For now, all the processing is done in one thread, but I intend to change this and use the time where the main thread is at sleep, to do something else like loading the scenery, processing ATC data…

 

Speaking of wich, what about the ATC ?
Well, I’m proud to say that the first radio communication has taken place today in Livermore Field in California! Here is a transcript:

 

14.72464 : ATC : 121.000 (Byron Atis) -> "Byron CA airport information Alpha Recorded At 1 2 0 0 U T C Airport is Closed to General Aviation."

14.72643 : ATC : 120.000 (Livermore Atis) -> "Livermore CA airport information Alpha Recorded At 1 2 0 0 U T C Airport is Closed to General Aviation."

14.73883 : -> N167HZ : Listening to ATIS ...

14.7409  : -> N167HZ : Tuning 120 (Livermore Atis) at Livermore CA (KLVK)

19.76662 : -> N167HZ : Tuning 120.5 (Livermore Ground) at Livermore CA (KLVK)

20.78268 : -> N167HZ : Requesting Taxi Clearance ...

20.78364 : ATC : 120.500 (Livermore Ground) -> "Livermore Ground N167HZ request taxi to the active"

20.78667 : -> Livermore Ground : N167HZ initiating contact

22.78704 : ATC : 120.500 (Livermore Ground) -> "N167HZ cleared to taxi to the active runway"

32.7984  : ATC : 120.500 (Livermore Ground) -> "N167HZ did you copy ?"

34.74423 : ATC : 121.000 (Byron Atis) -> "Byron CA airport information A Recorded At 1 2 0 0 U T C Airport is Closed to General Aviation."

34.74451 : ATC : 120.000 (Livermore Atis) -> "Livermore CA airport information A Recorded At 1 2 0 0 U T C Airport is Closed to General Aviation."

42.80849 : ATC : 120.500 (Livermore Ground) -> "N167HZ did you copy ?"

 

A little explanation about what this means ?
Messages in red are those heard on a frequency. The number at the left is the time in seconds.

The first two messages are from the ATIS : Automatic Terminal Information Service, it’s an automated looped message broadcasted on a frequency. It sends information like the runway in use, the current weather, and many more things useful to airmen before contacting an air traffic controller.

You’ll notice two versions of the message, one coming from Byron, and the other coming from Livermore. (The only two airports modeled yet)

The next four messages are debug messages of the airplane that is sitting on its parking spot at Livermore.

N167HZ is the call sign of the aircraft (November 1 6 7 Hotel Zulu)
It listens to the ATIS, switches to ground frequency a few seconds later, and then contacts the ground controller with the following message : ATC : 120.500 (Livermore Ground) -> "Livermore Ground N167HZ request taxi to the active"

The ground controller receives the message and sends a response to the aircraft: (with a little latency to make it look more real) : ATC : 120.500 (Livermore Ground) -> "N167HZ cleared to taxi to the active runway"

That ends the part of the aircraft's intelligence, it doesn’t know what to do with this message yet, so it just ignores the message …
Since no response is received from the aircraft within ten seconds, the ground controller asks for acknowledgement of the message to N167HZ, on and on and on and on... I will add the code to make him get tired of repeating itself and end the communication :-)

This is the first step to what will be the ATC Engine of this project. It is certainly going to require a lot of work, but the result should be exciting
J
Next step, make the aircraft move and taxi to the active runway!

?>

What's up with the simulator ? 

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

Well, I haven’t posted here since my Novodex debacle last week ... You are probably wondering (or not) if I succeeded in adapting my physics code to Novodex ... well, it was a total fiasco, to say the least!
I have spent two whole days ignoring the world around me, either virtually or in reality ... two everlasting days at the end of which I managed to successfully... rollback to the prior physics engine...
What in the world could have happened ? Well, I would have been glad to say that I managed to make the damn aircraft lift off the ground and fly for a few hundred feet like those Wright guys a century ago. However, the only thing I could get is some ‘entity’ unable to taxi to the runway... neat isn't it?
I ran into some problems with the ground behavior of the aircraft, and I didn't want to start with the off ground part until the aircraft was able to roll. Basically, what went wrong is that I had to apply a enormous force on the aircraft to make it roll, and as soon as it left the ground (the wheels friction would become non existent) this force was so strong that it threw the aircraft to those #NAN coordinates :-) (Maybe heaven but looks more like hell to me!)
I've restarted from scratch a couple times but in vain ...
After 48 hours of people coming to me saying "So, has it taken off yet ?", I finally decided to follow my mum's wise but painful advice, rollback...
Thanx to VSS :-P the operation only took a couple minutes...

It's now time to think about this ... why would I want to change the most important part of this in the first place ?
Well, only because Novodex's Engine is supposed to be better ... but I think even if its better, it certainly does require as many parameter tweakings as ODE. I would like to mention that i'm not criticizing Novodex's SDK, the only one to blame here would be me :-P
I believe I will stick with ODE for now, and try to optimize my scenery to keep a constant frame rate so my physics don't get screwed from non fixed time steps.

Since last update, only a few things have changed on the simulator, I have refactored a few classes to make the airport system less hard coded. Some would say less ‘Commando Patterned’ but whatever ;-)
Now, the world is loaded in a big xml file containing what will be the default low resolution tiles of the ground, and in directories such as /airports/[airport name] are xml definitions of the airfields, and the sceneries (3D objects …), again as xml.
I’ve also implemented the generation of AI Aircrafts. A manager class loads the aircrafts, assigns them a random flight plan, and puts them on a random parking spot. All I need to do now is to make them speak with the control tower … The generation of the taxiways has been improved as well, by removing nearby nodes and replacing them by a single one, this makes the A* path lookup a tiny bit faster.

About the performance issue, i've posted two images (here and here) on my blog. You can see the airport with thirty AI aircrafts randomly placed on parking spots. This brings the total polygon count to over 44000, and the fps counter shows 10 to 14 fps (debug build)... There is still a lot of room for improvement :-P

Happy landings folks !

Wrapping + Un Million de paramètres, l'assurance d'une soirée en mousse ! 

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

Je sors d'une période de quelques heures de semi petage de cable, et j'avais envie d'en parler ...
Tout a commencé hier soir, ou je me prennais la tête avec des histoire de stabilité dans ODE ... Des mecs sur gamedev proposaient des algorithmes pour updater la physique indépendement de l'affichage ... il y avait trop de trucs dans le genre time0-time1 * (2 * _interval - (last_interval * last_interval) - time1) pour que je puisse rien qu'essayer d'essayer de comprendre ce que ca pouvait bien faire..
J'ai donc demandé à mon ami Mr Mours, quelles étaient les solutions du "Monde du Jeu Video" !
Il m'a donc dirigé vers une lib super cool de chez
Novodex qui fonctionne un peu comme toutes les autres, mais bon, apres avoir essayé tokamak et Ode, je n'étais plus à un wrapping pret ...
En me reveillant ce matin, j'ai donc joué avec les petites démos du SDK ... bien sympatique, et bien stable.
Je me lance donc dans le wrapping de la lib ... 1000 warnings et 2000 erreurs plus tard, je pouvais enfin faire tomber un cube (managé ! ) :-)
Je me suis dit ensuite que j'allais commencer à faire ce qui allait être la physique de mon avion, version 2.0 !  Et c'est la que le drâme commence ... je suis allé de bouletisations en bouletisations ... pendant qq heures, à essayer de modifier la vie pour que ce pauvre avion puisse rouler ...
En gros, j'aurais mieux fait de coder un truc com ca :

int retry = 0;
while(alive)
{

"Merde, ça marche pas"
cherchage ...
"Ahhh, mais quel con ... la c bon, pfiou, rhoo le boulet, ca va marcher maintenant !!"
build...
run...
silence...
"ah bah non ..."
if (retry > retry_anger_limit)
   GenerateRandomInsult();
retry++;
}


Bref, quand on connait le nombre de paramètres en carton qui entrent en jeu dans ces trucs de physique, il y a de quoi se tirer une balle... ou encore de créer un cube la ou on aurait du créer une sphere ... et qu'on s'étonne que ses roues ne roulent pas ... je prends cet exemple au hazard bien sur ;-)

Maintenant ca marche, et je vais donc pouvoir bouletiser des demain matin sur les parametres de vol de l'avion avec Novodex :-)

Happy Landings Folks.

ATC, PathFinding ... Who said flight simulator is dull ? 

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

It is not dull at all, at least when coding it anyway ...
Yesterday, I have started implementing what will be my ATC Engine, (Air Traffic Control).
This part of the simulator is going to be a tough one, and I understand why we haven't had air traffic control in Flight Simulator prior to FS2002 !
It involves AI for simulating both controllers and flying aircrafts, Path Finding, not to mention the coding behind the communications themselves ... and this is just the beginning. I am sure I’m going to choke on a lot of other things along the way! 

So far, I have started implementing a communication system, based on frequencies, just like in reality.
A frequency in the simulator is represented as a class. An instance represents a frequency value, and all frequencies in a given area are gathered in a FrequencyManager.
When an entity (an aircraft, a controller ...) wants to monitor a certain frequency, it just hooks itself up on the MessageReceived event and it will receive the messages from stations calling the Emit() method on that particular frequency !
When this entity is done listening, the event is unregistered and the messages will not be received anymore. For now, this is working for the Atis (Automatic Terminal Information Service), it sends a fake message telling it's Livermore tower, and that the airport is closed to public air traffic ;-) You can of course hear it via Microsoft Speech stuff :-)

I've also started implementing what will be taxiway lines, for AI aircrafts to know where to go when taxiing for take off, or to the parking, but I’ll will talk about this some other day.

I have posted two new screenshots in the gallery, one showing the Windmill object with scripted behavior, and another one on my tests on path finding.

Happy Landings folks!

?>

How C# can help you build a script engine ! 

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

In my flight simulator adventure, i started implementing a wind system, to simulate the action of winds on the airplane. It was not that different from what I had done so far. I just needed to add the wind force to my angle of attack calculations. In a few hours the system was working, and I could practice my crosswinds landings :-)
Something was missing though, a Windsock. It’s that red and white striped thing that pilots use to find out where the wind is coming from, in order to choose the appropriate runway. All I needed was a 3D Model representing a windsock, and a way to set the orientation of the windsock according to the direction of the wind.
I could think of two ways to do this. The easy way, or the Cool Fancy .Netty kinda way. The easy way would be to do some kind of check on an object's tag or name, and to hard code the movement.
The cool way would be to build a scripting engine that would compile a specific code associated to an object, and execute it. This portion of code would be given some data it can use to do whatever it wants to do (Moving an object, changing its properties ...)
To do this, I created an interface, IScript, defining one method : Update(). This method takes three parameters, the current object, a time delta, and the parent scene.

public void Update(HierarchyObject2 Obj, float dt, Scene ParentScene)

To write the code to interact with the world, the UserPropertyBuffer of 3DSMax nodes are used.
This is contained in a CData section of an xml document and looks like this for a windsock orientation.

(Warning, non optimized and totally criticizable code snippet)

AircraftScene scene = ParentScene as AircraftScene;
Vector3 WindDirection = scene.WindManager.WindDirection;
if (WindDirection.Length() == 0)
 return;
WindDirection.Normalize();
Matrix LocalTransformationMatrix = Obj.LocalTransformationMatrix;
LocalTransformationMatrix.M31 = WindDirection.X;
LocalTransformationMatrix.M32 = WindDirection.Y;
LocalTransformationMatrix.M33 = WindDirection.Z;
Vector3 NewRight = Vector3.Cross(MatrixUtils.GetUp(Obj.LocalTransformationMatrix), MatrixUtils.GetAt(LocalTransformationMatrix));
LocalTransformationMatrix.M11 = NewRight.X;
LocalTransformationMatrix.M12 = NewRight.Y;
LocalTransformationMatrix.M13 = NewRight.Z;
Obj.LocalTransformationMatrix = LocalTransformationMatrix;

The value of the CData section is then inserted inside the Update method of a class, implementing the IScript interface that is generated and compiled at runtime.
Once this class is instantiated, its Update() method is called at each frame, and the orientation of the windsock is updated according to the wind direction :-)
It’s just one possibility of this feature, but I think I will come up with many more (P.a.p.i. (Precision Approach Path Indicator), Flash lights, moving vehicles, spinning radar dishes …)
Since the script itself is written in C# and can access everything from the engine, the possibilities are endless !
Screenshots:

The windsock and the wind direction updated from the PropertyGrid.

The code inside 3DStudio Max
Oh, I forgot to mention that the aircraft now has working flaps. The fully extended flaps behavior is still a little weird but the aircraft takes off at a slower speed :-)
You can check out my gallery for a screenshot of the Flaps.

Update : (08-15-2004)
Since this post has been added to the articles section, I find it convenient to add a little more technical details on how the runtime compilation of the script is done.
The first thing we need is a host for our piece of code. It consists of a definition of a class, added as resource to the application and looks like this:

using System;
using System.Threading;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using System.Text;
using System.IO;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectInput;
using Microsoft.DirectX.Direct3D;
using Direct3D=Microsoft.DirectX.Direct3D;
using fmodWrapper;

namespace DirectXLib
{{
 ///
 /// Summary description for IScript.
 ///
 public class Script : IScript
 {{
  public Script()
  {{
  }}

  public void Update(HierarchyObject2 Obj, float dt, Scene ParentScene)
  {{
   {0}
  }}
 }}
}}

You will notice that instead of having single brackets as delimiter, we have two brackets. This is for a simple reason.
Have a closer look at the Update method. There is a « {0} » which is a sort of key word for String.Format(). The single brackets then have to be doubled not to be considered as a beginning/end of a keyword.
With this, we can easily insert a piece of code inside the update method.

String CompleteClass = String.Format(ClassString, StringFromObjectProperties) ;

After this call, CompleteClass string contains the code of a complete class.

using System;
using System.Threading;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using System.Text;
using System.IO;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectInput;
using Microsoft.DirectX.Direct3D;
using Direct3D=Microsoft.DirectX.Direct3D;
using fmodWrapper;

namespace DirectXLib
{
 ///
 /// Summary description for IScript.
 ///
 public class Script : IScript
 {
  public Script()
  {
  }

  public void Update(HierarchyObject2 Obj, float dt, Scene ParentScene)
  {
   Console.WriteLine(« Object Name : {0} », Obj.Name) ; // Portion of code coming from UserProperties of Object.
  }
 }
}

Now that we have our class, we need to compile the Assembly that will contain this new Type of ours.
Enters CSharpCodeProvider. This class provides us with all the features needed to compile our C# code on the fly.
Here is the code that will do this:

///
///
///
///
public CompilerParameters GetCompilerParams()
{
 CompilerParameters cscpCompilerParameters ;

 cscpCompilerParameters = new CompilerParameters();
 cscpCompilerParameters.GenerateInMemory = true; // Generate our assembly in memory
 System.Collections.Specialized.StringCollection rs = cscpCompilerParameters.ReferencedAssemblies;

 // Get the location of all other assemblies that ours reference
 Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
 foreach(Assembly assembly in assemblies)
 {
  // Add each assembly
  cscpCompilerParameters.ReferencedAssemblies.Add(assembly.Location);
 }

 cscpCompilerParameters.ReferencedAssemblies.Add("DirectXLib.dll"); // add ourself 

 return cscpCompilerParameters;
}

private String GenerateSource(String SourceCode)
{
 try
 {
  // Load our data from assembly resources
  byte[] data = FileManager.ReadFileFromResources("DirectXLib.Device.Scripting.ScriptData.cs", Assembly.GetExecutingAssembly());

  if (data != null)
  { 
   return String.Format(System.Text.Encoding.ASCII.GetString(data), SourceCode);
  }
 }
 catch(Exception Ex)
 {
  Log.Debug("Error : {0}", Ex.Message);
  return null;
 }
 return null;
 
}

///
/// Creates an instance of our Script Object
///
///
///
private IScript CreateInstance(Assembly ResultAssembly)
{
 IScript script = (IScript)ResultAssembly.CreateInstance("DirectXLib.Script", true);
 return script;
}

///
///
///
///
public IScript CreateScript(String ScriptCode)
{
 String CompleteCode = GenerateSource(ScriptCode);

 CSharpCodeProvider cscp = new CSharpCodeProvider();
 ICodeCompiler csc = cscp.CreateCompiler();
 CompilerResults crs = csc.CompileAssemblyFromSource( GetCompilerParams(), CompleteCode);
 if (crs.Errors.Count == 0)
 {
  Log.Debug("No errors");
  Assembly ResultAssembly = crs.CompiledAssembly;
  return CreateInstance(ResultAssembly);
 }
 else
 {
  Log.Debug("There are errors:");
  foreach (System.CodeDom.Compiler.CompilerError err in crs.Errors)
  {
   Log.Debug("Line {0} col {1}: {2}", err.Line, err.Column, err.ErrorText);    
  }
 }
 return null;
}

One last, the FileManager.ReadFileFromResource, that might be handy.

public static byte[] ReadFileFromResources(String Filename, System.Reflection.Assembly assembly)
{
 FileManager Fileman = new FileManager();
 
 Stream s = assembly.GetManifestResourceStream(Filename);

 if (s == null)
  throw new Exception("Cannot find file in resources");
  
 BinaryReader Reader = new BinaryReader(s);
 return Reader.ReadBytes((int)s.Length);
}

With this code, all we have to do, is call CreateScript() with the code chunk contained in the UserProperties of the current object, an it will return an instance of a class implementing IScript.
We can then call the Update method of this instance at every frame, and the script will do its business :-)

Happy Landings everyone!

 

A Property Grid to help in Physics Tweakings 

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

I’m sure many of you readers from Epitech have heard about a component called PropertyGrid.

It's a component that crawls down an object's structure and displays all its properties. (Using Reflection)
You can then visualize the values of the properties and you can edit them directly.
The cool thing about this is that it actually updates the values inside the object you gave it.

In my pretend simulator, I came to a point where I wanted better flight/ground behavior, and I did not want to recompile the project at each small parameter change, nor build a form with a million edit boxes on it to edit all the possible variables. I then thought of using a property grid to do this. That way, I do not need a specific window, or to recompile the project every time I want to change something in the flight model. I just need to call a function that will set the physics parameters with new values.

Here is what it looks like:



I have the simulator on the left, the property grid with aircraft variables on the right and all those parameters are editable in real time. Those parameters include contacts smoothness, friction, parts weight ...
I hope with the help of this, I’ll reach a little more realism in the simulation.

I am glad I didn't code this engine in C++ ;-)
Matt.

?>

?>

?>

The Flight Simulator Project 

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

For the past couple of months, I have kept myself busy trying to code my very own flight simulator... This must have been my billionth attempt at doing it, and the previous versions were not big successes to say the least...

This time I have tried a slightly different approach. I've come to the conclusion that my math/physics skills were definitely not high enough to code an acceptable rigid body simulation, aviation wise at least... I've spent countless hours trying to tweak the FlightSim example of the book "Physics for game developers", to come to the conclusion that, even if I have a flyable model, the ground behavior of the aircraft would be even harder to simulate!

 

I then decided to use one of the few Rigid Body libraries freely available, and I looked into Tokamak and ODE. I chose the later, and I do not really know why, since I believe both would more than satisfy my needs.

I wrote a little .Net wrapper for both Tokamak and ODE prior to make my choice.

(Note to self: refactor this (crappy) ODE Wrapper...)

Now that the wrapper has been written, all i needed to do was to apply forces related to the flight of an aircraft at the appropriate points on the plane.

 

Luckily, ODE has a set of useful functions for that.

The first interesting one is a function to add a force at a certain position relative to a body. This can be used to apply forces such as Lift, Drag, and Thrust. Of course, these forces are to be added at the position of a wing (lift and drag), or where an engine would be (thrust).

The second one is to get the linear velocity at a certain point of a body. This can be used to calculate the angle of attack of a wing for instance, therefore, its lift and drag, that we can apply at next step to the aircraft parts!

With this, we can basically make an object lift off the ground, with the proper lift/drag calculations related to the aircraft velocity.

(The local velocity of each aircraft part).

This sounds quitestraight forward, but to make a state of the art simulator, the road is long! (Where is that road anyways?! :-P)

 

The current state of the 'project' is quite satisfying :P I’ve got an aircraft that can take off, turn (not too steep though :D), gain, lose altitude, land, and the ground behavior is... well, it can roll ...

The part that made me choke the most is to have a stable flight when the aircraft is changing its course. Some forces are applied to the rudder (vertical tail wing), in function of the difference between the actual aircraft velocity and the aircraft 'at'. At first i was too lazy to add the forces connected to this particular wing :P but I’ve come to the conclusion that without this wing, the aircraft can't really change its course ... (for real pilots reading, it's when the turn coordinator's ball is really not centered :D)

 

There is really room for improvement here, especially on the lack of impression of speed, the brutal motion of the aircraft, the stupid rudder that is not doing its job. One other thing to improve would be to use a non-linear lift coefficient. This would add the ability for wings to stall when lift is not sufficient due to a high angle of attack.

I also intend to add some IA aircrafts to fly along as well as ATC traffic, using MS Text To Speech :)

 

I have posted some screenshots in my gallery.

For a downloadable version, you will have to wait a little more.

?>

MegaScenery USA 2004, Northern California ! 

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

Since everyone here is writing about what they like, it is my turn to talk about something I enjoy...

I know this post won't drain a lot of people, but I know there are quite a few flight sim enthusiasts at Epitech
J

I recently purchased what i think might be the best scenery ever released for Flight Simulator 2004. It is called "Mega Scenery USA 2004, Northern California"
When this new title from Aerosoft/PCAviator was announced, i was really looking forward to order  it.
Like my fellow flight simmers this scenery reminds me of the good old times, when we were flying Flight unlimited II & III from Looking Glass Studios, which were modeling this area in tremendous details !
Don't look for the official website on the net, it does not exist anymore, Looking Glass closed its doors a few years ago (what a shame :-/)

The point of this post is to tell you how much I enjoy flying over this scenery which is meant to be flown in VFR, and comes with VFR charts of the Area.
The scenery extends from a few miles north of Santa Rosa to Monterey, and from the West Coast to Calaveras/Merced CA so there's a lot of airspace, points of interest to explore! (30’000 square miles)

So anyways, don't hesitate to get this scenery, you won't regret it ! :-)
While you’re on their website, add
MegaScenery USA Southern California to your cart as well, it's also very good ! :) (All LA Area down to San Diego, Santa Catalina, Ontario, Big Bear Lake ...)
 
If you want more information on these sceneries, check out
www.megascenery.com

I posted a few screenshots on a gallery of my blog ;-)
 

Happy Landings!
Matt

?>

ImageList not set on WinForms controls like ListView, ToolBar, TreeView ... 

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

I haven't posted for a while, so i'm going to write a little thing that might help my fellow Winforms designers ...

A while ago, i had a problem with a Treeview, i assigned an ImageList to the items in my treeview, and the images were correctly displayed next to the TreeNodes at design time ... but at runtime, i couldn't get the damn images to show up !

If you are using this combinaison of controls, you will eventually face this problem, which is actually another bug of our favorite IDE, Visual Studio...
The bug resides in the fact that controls are initialized in the InitializeComponent method in a alphabetical order (for some, not all.. why ??) ...
This leads to the following problem, a ListView control will be assigned its ImageList, and then, the imagelist will be filled with the images set in the designer ... For some reason, the images are all blank, when shown in the control, so here is a little workaround, all you need to do, is after the InitializeComponent call in the class Constructor, do the following :


myList.ImageList = null;
myList.ImageList = myImageList;


et voilà ! it works !

Happy Flyings people, and let's hope the SP1 of Visual Studio 2003 will correct all these annoying problems we face weekly with the Visual Studio Designer ...

 






UI Update from threads, interesting Blog. 

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

Found this very interesting article this morning. It'll sure help a lot of people :-)
It shows how to update the user interface from threads, and explains how Invoke/BeginInvoke methods work internally.

http://weblogs.asp.net/justin_rogers/articles/126345.aspx


++

SmartDevice Applications on Smartphone, NotSupportedException on MainMenu 

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

On Smartphone devices, users interact with your application using a MainMenu control that is created and added to your main form when you create an application.
There is one thing that drove me crazy a few month ago, it was a problem with this MainMenu.
I wanted to add sub-menus to my two main menu items and it turned out it was not possible.
I was getting the following exception :

An unhandled exception of type 'System.NotSupportedException' occurred in System.Windows.Forms.dll

Additional information: NotSupportedException

on this line :

//

// Form1

//

> this.Menu = this.mainMenu1;
this.Text = "Form1";

The problem was that I added submenus to both left and right soft keys menu items, which is not possible, by design apparently.
The Smartphone SDK Documentation says so:
 « The .NET Compact Framework MainMenu components are operated by the Smartphone soft keys. To conform to the Smartphone user interface, the MenuItem class has the following restrictions:

  • You can have no more than two top-level menu items.
  • Only the second top-level menu item, on the right side of the form, can have submenus.
Note   The .NET Compact Framework does not enforce these restrictions at design time but does throw an NotSupportedException at run time.”

So to get rid of this exception, just remove the SubMenus from your left soft key menu item.

?>

WinForms and weird Resource Load Exception  

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

If you are developing Winforms Applications, there is one thing that I’m sure you will come across one day or another.

When coding your applications, you often create new classes within the same file as those declaring Forms.
One way to do this could be the following:

using System.Windows.Forms;

using System.Data;

 

namespace ExceptionTest

{

            public class

{

                        public int i = 0;

}

            ///

            /// Summary description for Form1.

            ///

            public class Form1 : System.Windows.Forms.Form

            {

 

This is not the way to go, why?
Well, at first, you will not notice why, the project still compiles without any warning or errors, even though there is a big problem underneath.
After you have created this class, try adding a new control to the form. Visual Studio will show a message box telling you that the class declaring the form must be first in the source file.
The exact error message is : “The class Form1 can be designed, but is not the first class in the file.  Visual Studio requires that designers use the first class in the file.  Move the class code so that it is the first class in the file and try loading the designer again.”
You will get the same error message in the task list, if you close and reopen the solution.
Well, we can admit that since it is warning you that there is something wrong.
However, in some cases, it will not.

The only error message you will get is an exception not related to you problem at all!
Last time I got one of these, it was about some resource not found in my assembly.
I could not recreate the case today, but I remember exactly what was causing the problem.

My code went like that :

using System.Windows.Forms;

using System.Data;

 

namespace ExceptionTest

{

            public delegate void MyDelegate();

 

            ///

            /// Summary description for Form1.

            ///

            public class Form1 : System.Windows.Forms.Form

            {



Even though this code does not cause any error/warning messages, you will eventually get one. In my case, it was ages after I added my delegate declaration.
After several compilations, I ran the application and I got a ResourceNotFoundException or some other resource related exception at form load …
I spent a whole afternoon trying to understand what in the world could be the problem here! I rolled back to some previous versions of my code, (still containing this delegate on top of the file) and the exception was still here.
Finally, I tried to remove this delegate from the top of the file, and put it below the Form1 class; I thought that maybe it was the same problem as for classes … and bingo! The exception did not show anymore!

So one thing to remember: Do not write anything before your Windows class declarations!

edit: the exception i was refering to is : MissingManifestResourceException

?>

Vatsim & MMOFlightsim ! 

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

I'm going to try to post in english for once ;-)

Last night, i had a little time to kill, so i decided to go back to some old things i hadn't done in a very long while, that is, Online Flying with Flight Simulator.
Back in 2001, when i had a lot of spare time, i used to fly online, on the VATSIM network. (
www.vatsim.net)
Vatsim is a group that enables virtual pilots from all over the world to fly online, directed by controllers, just like in reality. 
When you want to fly, you connect to a server, file a flight plan and ask IFR Clearances, permissions to taxi, take off and so on.
The cool thing about this is that there are many places where controllers are available. These controllers are not computers, but actual people, most of the time real world
ATC operators!
Besides controllers and yourself, there are also many pilots flying at the same time!

Therefore, last night I decided that I would take a few hops in South California, under the control of these guys ;-)
At that time, these controllers where online:
Los Angeles Center (A big control area around Los Angeles)
Los Angeles Tower + Ground (Control Tower for take offs and landings, + ground control to guide you to the runway)
Ontario Approach (East of Los Angeles. The approach control that will guide you through the first/last miles of your flight, when arriving to, or departing Ontario Airport).
Burbank Tower (North of Los Angeles, just a few miles off the Hollywood sign, and the place where they used to shoot the show Friends)
Long Beach Tower (South of Los Angeles, opened late this night)
San Diego Approach (The approach control of San Diego, when you are in San Diego Airspace.

Let us talk about how I proceeded for one of the flights I did from KONT (ICAO code for Ontario Airport) to KSAN (San Diego).
Both approach controllers were online at the time I decided to fly, so the first thing I did, was to file a flight plan and sent it to the ATC (Air Traffic Control).
Once I did that, I contacted Ontario Approach. To do this, pilots use a program to communicate with the controllers, by either voice or text.
Both are not easy when you fly. For text you need to leave the joystick a few seconds for typing, and for voice, well.... it’s in English !
I tried to contact the controller on voice, "Ontario, this is N123KB, ready at parking for VFR flight to San Diego". And the guy actually replied! :)
"N123KB, taxi to runway 25L, squawk 1200".
This means that I’m cleared to taxi to the active runway, and that I must set the transponder to 1200. This is the code for a VFR flight (Visual Flight). Controllers use this code to locate aircrafts on their radars.
Then I took off and turned heading San Diego, flying along the pacific coast line ;-) (I recommend you Mega Scenery Volume 1 for Flight Simulator, it covers all south California with beautiful high res satellite images).
When I was a few miles out of Ontario, the controller told me to switch to San Diego Approach before entering their area, and cleared me off his airspace.
After a dozen miles, I contacted San Diego Approach, a nice man from New Zealand
He cleared me direct to San Diego Airport, calling me to report when I would have the airfield in sight, which I did, a few seconds later. He instructed me to make a right downwind runway 27, and then cleared me to land! At that time, 3 other aircrafts were in approach, and about 300 in the whole world!

I know people are going to make fun of me for this post, but whatever, I really had fun! :-)
You will find more information on
http://www.vatsim.net

See you there !

?>

?>

La Mousse Team en action !!! 

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

Hier apres midi, apres une bonne nuit de sommeil, j'ai rejoint mes binomes qui bossaient sur le ftrace Unix... Ayant fait le ftrace windows avec Kevouze, j'étais en semi vacances.

Quand je suis arrivé, Johan et Shark étaient entrain de finaliser un truc qui injectait du code dans un exe debuggé et qui envoyait tout seul les fonctions/symboles à un serveur en Python :-) qui les affichait à l'écran.
Il leur manquait un client pour pouvoir se connecter à ce serveur ... Je me suis donc proposé pour le faire, mais sous windows bien entendu... (niark niark)

Comme c'est la fin de l'année, et cette feature de client de visualisation était super inutile, on a décidé de rendre ca encore plus inutile et n'ayant plus aucun rapport avec le ftrace Unix :)
C'est la que la Mousse Team sort tout son génie !
Pourquoi ne pas afficher les infos de debug sur mon smartphone ??? Ca c'est super inutile !
Pour connecter le smartphone depuis une salle machine en gprs, vers un serveur tournant sur une machine de l'école, il nous fallait un intermédiaire ... Problème ...
Le serveur ne peut pas non plus remonter jusqu'au téléphone pour le contacter, on a donc trouvé une MousseIdea, qui a consisté en un WebService.
Un webservice, c'est un bout de code hosté sur un serveur web et qui expose des méthodes que l'ont peut appeler à distance en faisant une sorte de remoting sur l'objet exposé.
Il se trouve ici : http://msdn.labtech.epitech.net/Mousse/MousseWS/Service1.asmx
Vous pouvez vous y connecter pour afficher les differentes méthodes qui sont exposées.
Ce web service allait donc etre en frontal sur MSDN au labtech, et allait donc pouvoir se connecter à notre serveur à l'intérieur de l'école. (Avec l'accord de Jérôme)
3 heures plus tard, bingo, on avait la liste des processes débuggés, leur symbols ainsi qu'un snapshot des 20 dernieres fonctions appelées, et tout ça, depuis un téléphone !
On a donc, un process debuggé, qui a du code injecté dans la tête pour pouvoir se connecter à un serveur en python qui attends des connections d'un WebService qui attends lui même des requetes de n'importe qui faisant appel a ses fonctions ! (Avant de le faire sur Smartphone, le programme avait été fait en Winforms, et adapté avec un petit copier-coller au code Smartphone)

Bon, on sait bien que ca sert a rien, mais qu'est ce qu'on s'est amusé a faire ca :-p

Bons Vols à tous et bon stage au tek3 !
Matt

FlightGear, JSBSim, SimGear, plib, glut ... 

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

Hier, j'avais un petit peu de temps pour moi, je me suis dit que pour une fois j'allais faire qq chose pour moi et non pour qq d'autre ou pour l'école.
En cherchant des infos sur des modèles de vols simulés, je suis tombé sur un site que je connaissais déja, celui d'un simulateur de vol,
FlightGear.

Il s'agit la d'un simulateur de vol Opensource, et digne de ce nom ... Pourquoi me direz vous ... La réponse est simple, j'ai l'impression qu'à chaque
fois qu'il me prends l'envie de compiler  ou d'utiliser qq chose d'open source (bien souvent provenant de SourceForge), j'ai vraiment du mal a faire marcher quoi que ce soit.

Je dirais que c'est souvent le cas quand on doit compiler qq chose, et moins quand on doit utiliser ...

Mon but étant de compiler le projet, que dis-je, le projet, LES projets ... parce que sur la page de FlightGear, il est dit qu'il faut :
JSBSim : Un framework de simulation physique, qui a besoin de la plib, un framework de jeu.
SimGear : Un truc qui sert a je ne sais quoi ...
Plib : Un framework de jeu 3D ou qq chose dans le genre.
Glut : Cool, ca j'ai pu trouver les .lib compilés pour win (yeah)
(a noter que les sites de ces projets feraient pleurer bon nombre de webmasters, mais bon, ce n'est pas le sujet ... mention speciale au site de la plib, pour l'image de fond la plus laide que j'ai jamais vue ...)

Chacun ayant bien sur besoin l'un de l'autre ... j'ai du lutter afin de trouver comment compiler ces trucs, l'un ayant un Makefile, l'autre un dsw de visual studio ...
J'ai donc du installer CygWin ... je ne connaissais pas, mais bon, on apprends tout les jours ...
Bref, j'ai donc installé ca, plus les packages bla bla qu'il fallait ... j'ai fait ./configure dans le rep de SimGear, qui voulait des machins de la plib ...
J'ai donc compilé la plib, qui par chance avait un proj visual studio, mais avec des repertoires completement débiles au niveau des includes, qu'il a fallu modifier de tous les cotés ...
Une fois ceci fait, le configure est passé ... il a prit un petit peu la vie, en effet, ces projs peuvent tourner sur toutes les archis, du PC, en passant par solaris, au minitel et on dit qu'il compilerait même sur les nouvelles souris microsoft  ... J'en vois déja rigoler, mais je trouve cela utile de pouvoir compiler un framework sur Sun, ou n'importe quel autre unix en mousse qui traine par la, parce qu'il faut penser aux 3 personnes au monde qui en ont besoin ! (gni gni)
Treve de plaisanterie, je me dit que je vais tenter un make ...
Ca compile ... Ca compile ... et puis bien sur, ca s'arette, c le but d'un projet comme ca, ne pas fonctionner ...
Je regarde l'erreur, une lib, libplib_net ou qq chose dans le style qui n'a pas été trouvée ... bon ... petite recherche sur le net, pas grand chose, petite recherche sur le dur, pas de lib qui ressemble a ca ...

Bref, ca fait plusieurs heures que je suis entrain d'essayer qq chose qui visiblement ne marcherait jamais ... j'ai donc abandonné ... et je trouve ca bien dommage

Ca m'a finalement fait me poser la question :
Pourquoi ne peut-on pas mettre un source tree complet dans des projets pareils ??
Aller chercher une lib par ci, une autre par la, galerer à les compiler, deviner dans quel repertoire le codeur a bien pu les placer au final, c'est vraiment une perte de temps ...
Bref, comment contribuer ils disaient .... je comprends maintenant pourquoi ils conseillent aux nouveaux de déja compiler le projet, sur le site de FlightGear ... si tu as réussi a compiler le projet, tu peux tout faire...

Tans pis, je reessayerai un autre jour ... ou bien j'essayerai de me mettre un peu aux maths et d'appliquer des formules d'un modele physique d'avion ...
Laissez moi rever ;-)

++
Matt