Chapter 5: Flight Simulators


 Download CD Content

Flight Simulator Basics

We now wish to make a realistic flight simulator. First, we should take a quick look at how an aircraft rotates about its different axes and how it is controlled. Rotation about the x-axis is called pitch, about the y-axis it is called yaw, and about the z-axis it is called roll . These movements are controlled with the aircraft s rudder, elevator, and ailerons. The rudder is much like a ship s rudder, and is usually mounted on an airplane s vertical stabilizer at the rear of the plane. The elevators are similar to a rudder, except that they move up and down and are mounted on the tail; they make the aircraft pitch up and down. One set of ailerons is mounted on each wing, and they move up or down in opposition to each other to make the plane roll. Please consult Figure 5.1 and make sure you understand these movements.

click to expand
Figure 5.1: Aircraft rotation about 3 axes: pitch, yaw and roll.

Yaw is controlled by moving the rudder back and forth, which is done by the pilot with right and left foot pedals. Pitch is controlled by moving the stick or control lever between the pilot s legs forward or backward. Pushing the stick forward makes the plane pitch down (dive) by making the elevators deflect down, while pulling the stick back makes the aircraft pitch up by bringing the elevators up. Roll is controlled by pushing the stick to the sides. When the stick is pushed to the left, the right aileron moves down and the left aileron moves up, causing the aircraft to roll left.

You will see that we will develop a fairly realistic simulator. Our flight simulator is to have the following characteristics:

  • The aircraft should be able to land on a runway. To do so, it must be able to turn and make a controlled descent.

  • An instrument panel is to be visible on the user s screen.

  • A camera will follow the jet directly from behind.

  • The aircraft is told to roll right and left with the right and left arrow keys.

  • The aircraft pitches up and down with the down and up arrow keys.

  • When the aircraft rolls to one side, it also turns towards that side. For example, when the control stick is pushed to the left (the left arrow key pressed), the aircraft rolls left and also turns to the left. This is because the lifting force from the wings is now tilted to the left as well as up, as shown in Figure 5.2. The aircraft also yaws to the left in response to an action by the rudder, which is usually activated by the pilot with his feet whenever the aircraft turns left. Applying the correct amount of rudder for a given amount of roll results in what is referred to as a coordinated turn. In some early aircraft (the Ercoupe of the 1940 s is one example), the rudders were automatically activated when the aircraft rolled ”there were no foot pedals for controlling the rudder. In the interest of simplicity we will not have separate rudder controls and will assume that they are automatically activated with the ailerons.


    Figure 5.2: When an aircraft rolls to one side, it also turns to one side lift force points to the side as well as up.

  • The more the aircraft rolls to one side, the faster it will move in that direction. For example, if the aircraft is rolled slightly to the left, it will also be moving slowly to the left and yawing to the left. If the angle is increased, then the left motion and yawing is also increased.

  • Pulling back on the stick not only causes the aircraft to pitch up, but the aircraft also begins to climb. In addition the airspeed drops . If you think about it, this makes sense: if the aircraft pitches up, the thrust of the engine points up and makes the aircraft climb, but the increased work required to make the plane go up also makes the airspeed drop. This is similar to a car not being able to move as fast when moving up a hill as it does on level ground. In real aircraft, pulling back on the stick too far will eventually cause its speed to drop excessively and its lift to drop too far, in which case the aircraft stalls, and pitches down.

  • Pushing the stick forward causes the nose to pitch down and the airspeed to increase.

  • Landing at too large a vertical speed will cause a crash.

  • The instrument panel is to have realistic dial-type gauges for the following: compass heading, airspeed in miles per hour , rate-of-climb (up or down), and bank indicator (shows how far the aircraft is rolled to left or right).

Yes, it sounds very complicated, but we will do it in small steps. And we will have a lot of fun along the way!




Elementary Game Programming and Simulators Using Jamagic
Elementary Game Programming & Simulations Using Jamagic (Charles River Media Game Development)
ISBN: 1584502614
EAN: 2147483647
Year: 2002
Pages: 105
Authors: Sergio Perez

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net