Game Development Reference
In-Depth Information
you'll need to calculate the unit normal vector perpendicular to the plane of each wing
section. (You'll need this later when calculating angle of attack.)
These first two steps need only be performed once at the beginning of your game or
simulation since the data will remain constant (unless your plane changes shape or its
center of gravity shifts during your simulation).
The third step involves calculating the relative velocity between the air and each com‐
ponent so you can calculate lift and drag forces. At first glance, this might seem trivial
since the aircraft will be traveling at an air speed that will be known to you during your
simulation. However, you must also remember that the aircraft is a rigid body and in
addition to the linear velocity of its center of gravity, you must account for its rotational
Back in Chapter 2 , we gave you a formula to calculate the relative velocity of any point
on a rigid body that was undergoing both linear and rotational motion:
v R = v cg + (ω × r)
This is the formula you'll need to calculate the relative velocity at each component in
your model. In this case, v cg is the vector representing the air speed and flight direction
of the aircraft, ω (omega) is the angular velocity vector of the aircraft, and r is the distance
vector from the aircraft's center of gravity to the component under consideration.
When dealing with wings, once you have the relative velocity vector, you can proceed
to calculate the attack angle for each wing section. The drag force vector will be parallel
to the relative velocity vector, while the lift force vector will be perpendicular to the
velocity vector. Angle of attack is then the angle between the lift force vector and the
normal vector perpendicular to the plane of the wing section. This involves taking the
dot product of these two vectors.
Once you have the attack angle, you can go to your coefficient of lift and drag versus
attack angle tables to determine the lift and drag coefficients to use at this instant in
your simulation. With these coefficients, you can use the following formulas to estimate
the magnitudes of lift and drag forces on the wing section under consideration:
Lift = C L (1/2) ρ V 2 S
Drag = C D (1/2) ρ V 2 S
This is a very simplified approach that only approximates the lift and drag character‐
istics. This approach does not account for span-wise flow effects, or the flow effects
between adjacent wing sections. Nor does this approach account for air disturbances,
such as downwash, that may affect the relative angle of attack for a wing section. Further,
the airflow over each wing section is assumed to be steady and uniform.
Search Nedrilad ::

Custom Search