[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!
?>