Sign in to follow this  
ByronMan

Jet game physics advice

Recommended Posts

ByronMan    100
Hi,

I'm building a 3D airplane game and I need some advice on how to implement the physics part. I already have collision detection working. I'm programming my game in C++

What are the benefits of having different centers of gravity for an airplane?

Thanks!

[Edited by - ByronMan on December 3, 2010 1:56:37 AM]

Share this post


Link to post
Share on other sites
grhodes_at_work    1385
The center of gravity of an airplane has a profound effect on the flight dynamics, the stability of the airplane as it is flying. A center of gravity that is closer to the nose, to the front of the airplane, results in a more stable airplane. But if it is too stable, you won't be able to manipulate it. If the center of gravity is further back, the airplane becomes less stable. If it goes far enough towards the rear of the airplane, the airplane becomes unstable. This is the way real airplanes work, and simulations of course mimic this. There is a measure of stability, called the "static margin," which is related to the position, front-to-back, of the center of gravity. You want a negative static margin in general, maybe -0.10 to -0.15. A negative static margin (in airplane speak) represents a stable airplane. Aerobatic/acrobatic airplanes have a static margin close to zero. There are occasional military aircraft that have positive static margins (unstable) that require computer control systems to artificially make them stable again.

(The positive/negative thing comes from the fact that static margin value is related to the slope, dM/dAlpha, of the pitching moment vs. angle of attack curve....dM/dAlpha has the same sign as the static margin, and it must be negative for the airplane to be stable. dM/dAlpha is just one of the many properties in flight dynamics known as "stability derivatives.")

Airplane flight simulation is not unlike rigid body dynamics for general stuff, like crates. For a rigid, non-flexible aircraft, you'd have an inertia tensor and a mass, just like any other game rigid body. The key is the forces that get applied. Of course there is gravity. Of course there is collision response if you hit something or slide along a surface (such as a runway). There is also thrust, the force applied by the propulsion system. In addition to that, you have the basic aerodynamic forces:

1) Lift, which holds the airplane in the air
2) Drag, acting in the opposite direction as the relative wind, tries to slow the airplane down. Thrust is required to counteract drag.
3) Side force, acting perpendicular to the lift/drag plane, e.g., approximately along the length of the wing.
4) pitching moment, an aerodynamic torque that tilts the airplane head over tail.
5) yawing moment, an aerodynamic torque that tilts the airplane nose left-right.
6) rolling moment, an aerodynamic torque that rolls the airplane about its fuselage axis.

There are many threads in the gamedev.net archives that talk about flight simulation, including good technical threads, links to sample code, links to offsite reference material, etc. I would suggest searching the archives. You'll find many threads to browse and decide which ones are most useful to begin with.

Hope that helps!

Share this post


Link to post
Share on other sites
grhodes_at_work    1385
One more little comment. The aerodynamic torques aren't pure torques. They are the result of differentials of the other forces, e.g., lift on one wing is less than the lift on the other wing, causes rolling moment. Lift on the vertical stabilizer, behind center of gravity causes yawing moment. (That same lift contributes to side force.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this