programming flight simulation

Started by
4 comments, last by zovirl 12 years, 7 months ago
Good day everyone,
I have fundamental knowledge on computer programming in C/C++, object oriented programming and data structures... though, I have never worked on a 3D game before... I'm trying to learn OpenGL GLUT.... I am a fan of military flight simulators... But I have no knowledge about simulating a realistic flight of an aircraft in a 3D world... I just know that you need some data of the aircraft such as mach value tables... still, I have little to no knowledge of about aeronautics....

but I am still clueless about how certain movement of a joystick controls the aircraft.... What kind of math equations are written in the source code of the simulator...

Can someone guide me about this? or provide a good article or tutorial to read on the internet?

Thanks. :)
Advertisement
This really depends on what kind of "flight simulation" you want to write.

Arcade-style flight can be a huge amount of fun and requires basically no understanding of aeronautics. See Crimson Skies for a popular, classic example.

On the other extreme is a true flight simulator such as the ones used for pilot training purposes; these are, generally speaking, insanely sophisticated programs. They require dozens if not hundreds of man-years of programming, engineering, and mathematics; they demand an intensely powerful hardware platform to run; and they more or less represent the cutting edge of modern physics simulation if you get into things like weather phenomena.

I suspect what you want lies somewhere in the middle, in which case you can really pick how much realism you want. How much physics do you know? Basic Newtonian mechanics? Aerodynamics? Thermodynamics? Are you looking to get factually accurate flight profiles for each aircraft, or just something that's vaguely fun to fly? Do you have access to the actual specifications and performance metrics of the aircraft you want to simulate?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]


This really depends on what kind of "flight simulation" you want to write.

Arcade-style flight can be a huge amount of fun and requires basically no understanding of aeronautics. See Crimson Skies for a popular, classic example.

On the other extreme is a true flight simulator such as the ones used for pilot training purposes; these are, generally speaking, insanely sophisticated programs. They require dozens if not hundreds of man-years of programming, engineering, and mathematics; they demand an intensely powerful hardware platform to run; and they more or less represent the cutting edge of modern physics simulation if you get into things like weather phenomena.

I suspect what you want lies somewhere in the middle, in which case you can really pick how much realism you want. How much physics do you know? Basic Newtonian mechanics? Aerodynamics? Thermodynamics? Are you looking to get factually accurate flight profiles for each aircraft, or just something that's vaguely fun to fly? Do you have access to the actual specifications and performance metrics of the aircraft you want to simulate?


Hi,

As in this discussion, we are talking about simulation, so I am not interested in Arcade-style flight neither my mathematical knowledge allows me to write extremely realistic simulation combining all the real life facts... I am a newbie in this kind of programming out there... I have studied basic calculus and differential equations... I do not have much knowledge about aeronautics or aerodynamics either....

That is why I created this topic... I want to write at-least a mediocre flight model... I was looking for some articles on the web about this.... I could'nt find anything much helping though.... any help will be appreciated...
Arcade-style fight games are content many kind of knowledge about mathematical. All of theme is to much, i think you need a game engine. To day game engine is important and useful. You can save your time. OpenGL and DirectX knowledge is need ,but it didn't useful :(.

Hi,

As in this discussion, we are talking about simulation, so I am not interested in Arcade-style flight neither my mathematical knowledge allows me to write extremely realistic simulation combining all the real life facts... I am a newbie in this kind of programming out there... I have studied basic calculus and differential equations... I do not have much knowledge about aeronautics or aerodynamics either....

That is why I created this topic... I want to write at-least a mediocre flight model... I was looking for some articles on the web about this.... I could'nt find anything much helping though.... any help will be appreciated...


You should be fairly well equipped already, actually; a good flight simulator really just needs to use some Newtonian mechanics and a little bit of aerodynamic approximation (which you can derive yourself by adding appropriate terms to the standard Newtonian equations for motion in a vacuum, and re-computing the derivatives and/or indefinite integrals depending on which direction you need to go).

I'd recommend brushing up on basic Newtonian physics first, and then working out the equations for (simplistic) motion in atmosphere on paper. Once you get the maths done, writing the code is pretty easy.

One term you might find useful to research is "damping" or "damped motion." This describes the effect of atmospheric resistance on an airframe, and as I said above, some simple approximations of damped motion can give very realistic and satisfying flight simulations.


Best of luck!

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

I found these pages helpful in understand the math for lift, drag, etc:


http://www.centennia...essay_cat/9.htm
http://www.desktop.a...ce/welcome.html
http://wright.nasa.g...ane/lifteq.html
http://wright.nasa.g...ane/drageq.html

I assume there are other approaches, but I've found that just using those equations with euler integration works well enough.

For civilian planes, it is usually pretty easy to look up the various values for stall speed, empty weight, CG location, wing chord, etc. Here are some I found for the Piper Cub:

http://www.pipercubf...com/balance.htm
http://www.airliners...ats.main?id=298
http://en.wikipedia.org/wiki/Piper_J-3
http://airportcolleg...er-l4-cub-1.jpg

This topic is closed to new replies.

Advertisement