Introduction to Flight Simulation
Lecture: Tuesday, 2-4, Room 25
Exercise: Tuesday, 4-6, Room 7
Aim of the Course
The course has three goals:
-
To get acquainted with some fundamental physics and mathematics.
In order to be able to simulate the behavior of airplaines,
one needs quite a lot of linear algebra, and of differential calculus.
I will introduce Newton mechanics, (using vectors), and derive
the laws of motion for rigid, three dimensional objects from
first principles.
In order to simulate autopilots, instruments, wheels, etc, I will
introduce the notion of a circuit, which is used modelling the behavior
of systems. Systems can be either stable or unstable. Ingeneers
are usually interested in stable systems.
The most commonly used tool for analyzing stability is the Laplace
transform. I will introduce
the Laplace transform and explain how it can be used for
predicting the stability of circuits.
This is probably the most fundamental part of this course.
Even if you will never work in anyhing related to airplain design,
stable and unstable systems are everywhere around us.
If there is time left, I will also explain some basic fluid dynamics,
so that you will understand by the end of the course, why wings of
airplanes generate lift. Quite a lot of nonsense has been written
about this topic, so it never hurts to give a correct
explanation.
-
To understand how the air traffic system works. I will explain
some of the procedures, explain which tools are used for navigation,
and how the air traffic control system works.
-
And finally, we want to have some fun. I want to spend the last
month of the course to building a working system.
Prerequisites
You should have knowledge of C++, and of linear algebra.
It is good if you know something about
differential equations and complex numbers.
Planned Topics
-
Newton mechanics for point masses. Energy versus impulse.
Specific impulse of a rocket engine, the inherent exponential cost
of rocket propulsion.
We will do some calculations on planets and rockets.
The physics of rockets is much easier to understand than the physics
of airplanes, so it is a good starting point.
-
Elements of linear algebra, dot and cross products.
The notions of torque and moment.
-
Usage of quaternions for the representation of orientations.
-
Laws of motion for rigid, non-point objects.
Everyone knows Newton's law, F = m.a, which can be used for
determining how a point with mass m reacts to a force with strength F.
But what if the object is not a point, and the force does not
work in the middle of the object? In that case, the object will
start to rotate. We will derive laws that connect eccentric forces
and resulting rotation to the mass distribution of an object.
-
Modelling of Wings. Understanding the qualitive relation between
angle of attack, drag and lift.
-
How the airplane is flown: Take off, landing, turning,
descending, climbing. Importance of stability.
-
Explanation of the causes of some historical accidents that
formed modern aviation. (Tenerife collision, Comet accidents,
Elektra design flaw, incidents with Airbus 320.)
-
Modelling and designing automatic control.
Maintaining a given altitude, maintaining a given heading,
maintaining a certain speed. Design of stable circuits
using Laplace transform.
-
Navigational aids, VOR, NDB and ILS. Structure of
air traffic control. Understanding ATC communication.
-
If there is time for it, some fluid dynamics:
Normal flows, which are are flows that
have no divergence and no rotation.
Normal flows are quite easy to understand mathematically.
We will formally derive and numerically simulate the Kutta-Zhukowsky
theorem, so that you understand why wings of an airplance generate lift.
Installing SFML (Simple and Fast Multimedia Library)
SMFL can be obtained from here .
I installed it under Debian Linux, and it was quite straightforward.
The desription is quite clear.
You have to install a couple of include files (for g++), and a couple
of libraries.
The simplest way is to download the include files and use
the precompiled libraries from the site, but this did not work for me.
Linking resulted in a load error: Couldn't load
std::ctype < char > :: M_widen_init.
In order to solve it, I updated Linux from etch to lenny.
This did not solve the problem. After that I compiled the libraries
by myself, (it is described on the site how to do that)
and this solved the problem.
I don't know if updating to lenny played a role in solving the
problem, but it was something
that needed to be done anyway.
Open GL
SFML supports computer graphics through openGL.
I am sure that everyone in
the rooms knows much more about computer graphics than I do,
so I will be short on this topic.
The
homepage of Andrzej Lukaszewski
contains a lot of pointers to openGL.
This
is the homepage of open GL.
Try to read the
Red Book
.
A browsable
list of commands
.
Lectures
-
5.10.2010.
I explained why flight simulation is important, what I want
to do with the lecture,
how a flight simulator is set up, and I demonstrated
Flight Simulator II on the Amiga 2.
-
12.10.2010.
I explained numerical methods for solving integrals and
solving differential equations.
The program that I used for
demonstrating rates of convergence.
-
19.10.2010.
I proved convergence of Heun's method, and Runge Kutta method.
I explained the importance of having better than quadratic
methods for higher-order differential equations.
We democratically decided to use SFML as multimedia package.
Here
is a detailed text about numerical methods, which contains
all the material that I covered,
and a detailed proof of the convergence of the Runge-Kutta method.
Try to have at least a glance at it, because it was
not easy to write.
This is a full proof of the fact
that RK4 has convergence O( n^5 ), generated
by a C++ program.
This is an improved planet
simulation program, which uses RK4.
I will explain next week how it works.
-
26.10.2010.
I will spend maybe 30 minutes about how to obtain good methods
for second order equations. The solution is surprisingly easy.
Higher-Order differential equations can be replaced by
first-order differential equations on tuples.
I already tried it out on the planets.
After that I start with open GL.
-
2. 11. 2010. No lecture. (Dzien Rektorski)
-
9.11. 2010. More about openGL. The
text about openGL
that I handed out during the lab.
-
16.11.2010. Introduction to mechanics.
-
23.11.2010. More about mechanics.
This is an
unfinished text about mechanics for rigid (and non-rigid) objects.
I will write the proofs into the text until next week. I also know
the solution to the problem that I had in class, in the proof of
the connection between torque and change of angular momentum.
-
30.11.2010. Rest of mechanics for rigid objects.
Elemantary explanation of gyroscopic effect.
The inertia matrix of a rigid object.
Demonstration of law of preservation of momentum and preservation
of speed from a simple implementation of interacting point masses.
The text about mechanics is now
more or less complete.
-
7.12.2010. Some practical aspects of implementing mechanics
for rigid objects. Representation of rotations (orientations)
by quaternions.
-
14.12.2010. More about quaternions. We completed the proof
that the operation F_q(x) = q.x.inv(q) is a rotation.
In the second part of the lecture I spoke about convex polyhedra
for collision and contact detection.
-
21.21.2010. No lecture!
-
4.01.2010. More about collision detection, and polygon clipping.
The reason that I am interested in all these transformations
on polygons and polyhedra is that the fact that they are needed
for the representation of scenery with different levels of refinement
dependent on how close or how far you are to an object.
-
11.01.2010. Conversions of coordinates for global naviation.
I explained how to transform Geodetic Coordinates to ECEF
(Earth-Centered, Earth-Fixed) coordinates
and back, and how to obtain the directions of the LENU
(Local East North Up) axes at a certain geodetic position.
In the second part I explained the notions of lift and drag,
and gave the basic formulas for computing lift and drag.
Exercises
-
Task for 12.10 with simple numerical computations.
task list .
-
Task list for 19.10 with computations about planets.
This is the list.
Makefile ,
vector.h ,
Main Program .
-
Exercise nr3 .
Try to avoid completely unrealistic trajectories in exercise 2.
-
Task 4 is to plot the planets in your programme of exercise list 2.
-
Exercise list nr5 .
This is the design of the house.
This is the code that you can take as starting
point.
-
Exercise list nr6 .
A simple exercise list about cross products and some elementary
notions of mechanics.
-
Exercise list nr7 .
More about mechanics of composed objects.
If you decide to use
vector.h , then
you should reload it, because I renamed
outerproduct into crossproduct.
-
Exercise list nr8 .
-
List 9 about quaternions.
-
List 10 about convex polyhedra.
In task 3, you need to find the intersection point of 3 planes,
which involves
solving a system of equations of dimension three.
The easiest way to do this is by inverting a 3X3 matrix, for
which you can use the following implementation:
matrix.cpp and
matrix.h .
-
List 11 about Geodetic/EFEC coordinates,
and the Boeing 737 .
-
List 12 about computation of aerodynamic
force on the main wings of the B737.
This is a text that explains how
to compute the aerodynamic forces.
Here is some code that may be useful:
force_torque.h ,
rigid.h ,
rigid.cpp .
This is a link to the
spline calculator that is mentioned in the exercise of List 12.
Instead of the online spline calculator, you can also use
spline.h ,
spline.cpp ,
systemofequations.cpp ,
systemofequations.h ,
matrix.h ,
matrix.cpp .
Grading
How the grades are determined. .
The grading scale was changed on Feb. 18th!
Literature
-
Mechanics of Flight, A.C. Kermode, 9th Edition,
Longman Group UK Limited, UK, 1987.
-
Aircraft Control and Simulation, Brian Stevens and Frank Lewis,
John Wiley and Sons Inc., 1992.
-
Fluid Mechanics DeMYSTiFieD (A Self-Teaching Guide),
Merle C. Potter, McGraw Hill, 2009.
-
Analyse, J.H.J. Almering e.a., VSSD, Delftse Uitgevers Maatschappij,
the Netherlands, 1984.