Sign in to follow this  
uzipaz

programming flight simulation

Recommended Posts

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. :)

Share this post


Link to post
Share on other sites
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, [i]insanely[/i] 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?

Share this post


Link to post
Share on other sites
[quote name='ApochPiQ' timestamp='1313920995' post='4851843']
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, [i]insanely[/i] 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?
[/quote]

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...

Share this post


Link to post
Share on other sites
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 :(.

Share this post


Link to post
Share on other sites
[quote name='uzipaz' timestamp='1314013106' post='4852232']
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...
[/quote]

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!

Share this post


Link to post
Share on other sites
I found these pages helpful in understand the math for lift, drag, etc:


[url="http://www.centennialofflight.gov/essay_cat/9.htm"]http://www.centennia...essay_cat/9.htm[/url]
[url="http://www.desktop.aero/appliedaero/preface/welcome.html"]http://www.desktop.a...ce/welcome.html[/url]
[url="http://wright.nasa.gov/airplane/lifteq.html"]http://wright.nasa.g...ane/lifteq.html[/url]
[url="http://wright.nasa.gov/airplane/drageq.html"]http://wright.nasa.g...ane/drageq.html[/url]

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:

[url="http://www.pipercubforum.com/balance.htm"]http://www.pipercubf...com/balance.htm[/url]
[url="http://www.airliners.net/aircraft-data/stats.main?id=298"]http://www.airliners...ats.main?id=298[/url]
[url="http://en.wikipedia.org/wiki/Piper_J-3"]http://en.wikipedia.org/wiki/Piper_J-3[/url]
[url="http://airportcollege.org/blog/wp-content/uploads/2008/06/piper-l4-cub-1.jpg"]http://airportcolleg...er-l4-cub-1.jpg[/url]

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