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

?>