Game Development Reference
In-Depth Information
the air, then it generates no lift. We'd like to be able to capture this kind of behavior
in a force generator that can produce sensible aerodynamic forces.
The Aerodynamic Tensor
To model the aerodynamic forces properly is very complex. The behavior of a real
aircraft depends on the fluid dynamics of air movement. This is a horrendously com-
plex discipline involving mathematics well beyond the scope of this topic. To create
a truly realistic flight simulator involves some specialized physics that I don't want to
venture into.
To make our life easier I will use a simplification: the “aerodynamic tensor.” The
aerodynamic tensor is a way of calculating the total force that a surface of the airplane
is generating based only on the speed that the air is moving over it.
3 matrix, exactly as we used for the inertia tensor. We
start with a wind speed vector and transform it using the tensor to give a force vector:
f a =
A v w
where f a is the resulting force, A is the aerodynamic tensor, and v w is the velocity of
the air. Just as with the inertia tensor, we have to be careful of coordinates here. The
velocity of the air and the resulting force are both expressed in world coordinates, but
the aerodynamic tensor is in object coordinates. Again we need to change the basis of
the tensor at each frame before applying this function.
To fly the plane we can implement control surfaces in one of two ways. The first,
and most accurate, is to have two tensors representing the aerodynamic characteristics
when the surface is at its two extremes. At each frame the current position of the
control surface is used to blend the two tensors to create a tensor for the current
surface position.
In practice three tensors are sometimes needed, to represent the two extremes
plus the “normal” position of the control surface (which often has a quite different,
and not intermediate, behavior). For example, a wing with its aileron (the control
surface on the back of each wing) in line with the wing produces lots of lift and only a
modest amount of drag. With the aileron out of this position, either up or down, the
drag increases dramatically, but the lift can be boosted or cut (depending on whether
it is up or down).
The second approach is to actually tilt the whole surface slightly. We can do this by
storing an orientation for the aerodynamic surface and allowing the player to directly
control some of this orientation. To simulate the aileron on the wing the player might
be effectively tilting the whole wing. As the wing changes orientation, the air flow over
it will change and its one aerodynamic tensor will generate correspondingly different
The Aerodynamic Surface
We can implement an aerodynamic force generator using this technique. The force
generator is created with an aerodynamic tensor, and it is attached to the rigid body
Search Nedrilad ::

Custom Search