Jump to content

Mathematics behind flight simulation


hv15

Recommended Posts

Hi all,

Not sure if this is the right section to post such a question but this is where the brains of the community seem to dwell.

 

As I understand it, flight sims that use look up tables use aerodynamic and control stability derivatives to calculate the forces and moments on an aircraft and then these forces and moments are put into the 6DOF equations of motion to get everything else. The forces depend on angle of attack, sideslip, velocity etc.

 

My question is about how the equations of motion can be solved in a manner that provides the new velocities/ angular rates etc. My studies in Aerospace engineering unfortunately only show how to do this with laplace transforms. Ideally, I want to develop my own flight sim in c++ (rudimentary graphics) for academic purposes.

 

Is anyone able to shed some light on this? (Preferably with the help of equations) :helpsmilie:

Link to comment
Share on other sites

Thanks for the reply gyrovague but unfortunately I have seen it :( I have been stuck on this for weeks now.

I have been working from the NASA HAARV (Modified F18 ) research papers https://www.nasa.gov/centers/dryden/pdf/88698main_H-2424.pdf which are very interesting if you like that sort of thing.

 

If you look at pg 14 (22/143) the equations of motion are stated. However, it never shows how to solve them. I would be very grateful if someone is able help me with this. After weeks of streaming through research papers, I am ready to tear my hair out!


Edited by hv15
Accidently hit send
Link to comment
Share on other sites

If you want try make your own sim, then all you need to learn is numerical integration by Euler method.

After you need to use some method to describe rotation of your object, basically in games uses quaternions.

And of course try to start with simple modelling, lets say try to model translation of some object using 2nd Newton law along one axis.

You need to get resulting coordinate, right? so

 

Drag = magic_coeff * V_previous; // or use V^2 relation aerodynamic drag formula

Fr = Force - Drag;//resulting force acting to your object

a = Fr/m;//resulting acceleration

V = V_previous + a*dt;// integration of current velocity of your object

x = x_previous + V*dt;// and finally integrating coordinate of object

 

my math is pretty basic and simple, but this is simple way how to model behaviour of any object with inertia.

btw I used this method in my DCS projects, works fine.

 

remember that derivative equation from books should be adopted for discrete nature of computer simulation - basically this is numerical integration.

Link to comment
Share on other sites

If you want try make your own sim, then all you need to learn is numerical integration by Euler method.

After you need to use some method to describe rotation of your object, basically in games uses quaternions.

And of course try to start with simple modelling, lets say try to model translation of some object using 2nd Newton law along one axis.

You need to get resulting coordinate, right? so

 

 

 

my math is pretty basic and simple, but this is simple way how to model behaviour of any object with inertia.

btw I used this method in my DCS projects, works fine.

 

remember that derivative equation from books should be adopted for discrete nature of computer simulation - basically this is numerical integration.

 

This is essentially what I was trying to do but the sim runs for a second and then starts producing NaN. I have a feeling that the stability derivatives I was using were for a spin test :doh: I may have to stick with older aircraft instead. Is anyone aware of any newish aircraft with available information on stability derivatives?

Link to comment
Share on other sites

If you want try make your own sim, then all you need to learn is numerical integration by Euler method.

 

Yea, for an initial understanding, but for aerospace purposes you should really use a more accurate integrator. JSBSim is great for understanding how to translate the more complex integrators, like Adams-Bashforth, into discrete code iterations. For my personal sim project, I use Adams Bashforth 2nd order integrator for rotational rate and translational rate, Adams Bashforth 3rd order for translational position, and Buss 2nd order Quaternion exponential for rotational position.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...