Aircraft physics

Blitz3D Forums/Blitz3D Programming/Aircraft physics

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The forces on a plane are (with VERY simplistic equations provided):

Lift: the faster the plane moves forward the more upward force (relative to the plane, not the ground -- a plane flying upside down experiences lift force downwards; this is why high performance aircraft roll when turning; they are better at climbing than turning, so they "climb" sideways). LIFT = LIFT_CONSTANT x F(ALTITUDE) x SPEED. F decreases with altitude.

Drag: the faster the plane moves forward the more force operates to slow is down. DRAG = DRAG_CONSTANT x F(ALTITUDE) x SPEED^2. F decreases with altitude.

(The plane's drag is likely to be a LOT greater if it's not essentially travelling forward -- you probably want a whole different DRAG_CONSTANT for that, and the DRAG should be proportional to SPEED^3, not SPEED^2.)

Gravity: the plane is always being pulled towards the ground by gravity. GRAVITY = 9.8 METRES PER SECOND or 9.8 NEWTONS PER KG.

Thrust: the more power you allocate to the engines the more force pushes the plane forward. THRUST = CONSTANT * THROTTLE * F(ALTITUDE) -- exactly how F behaves with respect to altitude depends on the engine. (An F-15's engines generate enough thrust at sea level to lift the plane straight up at 1G acceleration; i.e. its maximum thrust = 2x its weight. Most other fighters can't quite match this thrust to mass ratio.)

(In many jets, especially before fly-by-wire, increasing your throttle setting too fast could cause flame-out -- i.e. your engine would go out. Fly-by-wire planes constrain your plane's throttle changes to what are believed to be safe rates of change -- something some pilots resent. More modern engines can have their thrust increased more rapidly.)

You'll also need to know the plane's weight (and dimensions to handle rotation properly).

How do you work out these constants?

Well, no-one publishes all the raw data you need -- a lot of it is classified for state-of-the-art aircraft. If you're a military trained pilot you may have access to some of the raw data (and you probably know aeronautical engineering than I do).

First, an aircraft's top speed in level flight is obtained by turning the engine on maximum (probably with afterburners, if it has them) and diving to go over the maximum speed and then levelling out -- the plane slows down until its THRUST equals DRAG. It follows that you need to choose constants that give you the right maximum speed in level flight.

Second, most aircraft have a "military speed" of just under the speed of sound where they are flying with most of their (non-afterburner) throttle and have high fuel efficiency. You functions and constants need to reflect this.

All this is pretty simple...

Operating the control surfaces adds:
Yaw (e.g. the rudder)
Pitch (e.g. using the ailerons in concert)
Roll (e.g. operating the ailerons in opposite directions)

Planes will have angular momentum and inertia too -- turn a plane too fast and it will spin out of control.

Finally, there's a really complicated thing called an aircraft's envelope -- in essence a body of air moving along with the aircraft, which holds a great deal of its energy. (You see similar phenomena with cars and trucks on a highway -- a truck can carry along or buffet other vehicles inside its envelope of fast-moving air.) A lot of fancy aerial maneuvers involve dealing with this envelope -- in particular, if you can slow down without losing too much envelope energy you can regain speed or altitude much faster than if you dump your envelope.

It's probably easier to do a simplistic flight sim than a simplistic car or tank sim, but I think a realistic flight sim is probably just as complex if not more complex than a ground vehicle simulator (at least until your ground vehicles start moving fast enough to have serious ground effects, suffer turbulent drag, and so forth).