posted 05-08- 12:32 PM
The first early version of my AirFoil editor can be down-loaded at:
http://www.schoolmusic.com/chickencoop/se5a/fm/3/index.htm
I have been hacking the SE5a airfoil with it... it is not ready to complete a job, but it is fun to see what airFoils do. I will be working to finish it...
I just found a major bug, if you minimize it, it will not refresh the graph - I will fix this. You can save it, then reload it to see it if this happens to you 
Here is the readme:
AirEd V1
--------
May 7, 2000
Airfoil Editor for OpenPlane (www.openplane.org) by Sv (sean@schoolmusic.com)
This is a very basic app by someone who does not know how to program this kind of stuff. It is also a very, very early version - I just started it.
To INSTALL
--------------- Unzip the file to any directory.
Run the Setup.exe program and install airEd.
To test it, type SPIT into the name window, then the "load" button. Do you see a graph?
To use:
---------------
Right now it is just a tool to help you hack the TEXT version of the airfoils (.ppf), not the binary .sm airfoil file. I have included most of the airfoils that come with SDOE as PPF files, I got these from the OpenPlane demo.
You can load a PPF airfoil file that is in the same directory as this application, just type the name of the foil in the name box, like "SPIT". You will now see the lift and drag graph of the airfoil. As you move the mouse across the graph you will see a read-out of the Angle of Attack (AOA) for the current loaction of your mouse as well as the corrent coeficiant (coef) value. AOA goes from -179 degrees on the left to 180 degrees on the right. The center line is 0 degrees AOA. The horizontal black line represents a coef of 0. Up is positive, down is negative. You can scale the graph by sliding the sliders to the left. You can only zoom inwards, sorry - but that is the area where you should need to zoom in anyway.
The black points along the graph represents data samples. The airfoil files may have an entry for each degree AOA, but mose skip angles. For each angel that has an entry, ALL coef values must be entered for that AOA as well!
Here is how you edit. You can either edit the lift chart (GREEN) or the drag chart (RED). To choose an aedit mode, click a radio button to the left. Now you can edit the line you want. To move a point, simply click on the point and then drag it up or down. You will see the AOA you are trying to edit displayed as a number. If you try and edit an AOA that has no entries, nothing will happen.
You can add new AOA entries! Just hold the "shift" key while you click and drag. This will add a new AOA entry if you are clicking on an AOA that has no entry yet. IMPORTANT: Since all coef must be included in a new entry, lift, drag, and moment coefs are interpolated from the nearest neighbor to keep the chart correct. This happens automaticlly, and you can see the points added.
When you are finished your editing, just click on the save button, this will over-write the old file. If you want to keep the old file, just change the foil name in the name box. NOTE that this name is used as the file name AND inside the PPF file, so be careful!
How to get airFoils to work for your plane:
1. Create the new airfoil and name it to match the airfoil name or your plane name. I think plane name might be better becuase it allows for hacking the airfoil without effecting other people's planes. Example: SE5A.ppf -this will also have the name SE5A inside the PPF file (along with SE5Aup and SE5Adn)
2. Move this airfoil into the media/aircraft.airfoils directory. Create this directory if you need to.
3. Add a line for your new airfoil to the startup.ppf file found in your media directory. If you don't have a startup.ppf file, I have included one - start with that. Add a line like this:
"aircraft/airfoils/SE5A.ppf"
4. Open your plane in Bryan Russell's OpenPlane Studio (OPS) Find the prop lists on the wings. Here you will see something like "FW190foil" as a property. Change this to your foil, for example:
"SE5A"
5. Try it! Pray to God it works! If any little thing is wrong you will get a crash as soon as the missions starts
Once you have it working, it is easy to tweek it. Just keep copying the PPF file between your airEd (this app) directory and your media/aircraft/airfoils directory.
This is just the begining! Let me know what bugs you find as well as ideas you have for this. I have many including:
Edit up/down airfoil charts
Edit a special "delta" up/dn chart (delta from normal foil position)
Select and move multiple points
Edit moment data (I have code to see this now, editing it is easy to add)
Apply various filters to the data to due things like add overall drag, lift, etc.
Feature to pull neighbor data points arounf the AOA you chose to edit, a "shaper"
Understand the probabilty values... what do they do? The three other fields...
Better scaling with scroll bars
Let you size the graohung window, this shold be easy.
Many more!
I will continue to work on this as well as work on the SE5a air foil!
Some basic info on what AirFoils do in OpenPlane
Airfoil files are used to help dertermine the lift, drag, and moment forces produced by a wing in flight.
Lift is the force that pulls th wing and therefor the plane upward. It is applied perp. to the wing.
Drag is the force that slows the wing down, it is applied in a direction opposite of the aircraft's heading.
Moment if the tourque created by the wing, the force that tries to change the wings Angle of Attack (AOA)
AOA is the aingle the wing is compared with the airflow it is encountering. 0 AOA means that the airflow is paralell with the wing. An AOA of 45 means that the wing is pointing 45 degrees higher than the airflow, like when you have the stick pulled back... that direction. -45 AOA would be the opposite.
Total lift is determined by many things, mostly the airspeed, air density, and wing surface area. The other aspects that effect lift are very very complicated. Instead of trying to model each variable in such a complex system, hacks are used! These are called "coefficiants"
In other words, you build a wind tunel model, find out what lift the wing should produce via some simple equations, then see what happens in the tunnel! Now use a fudge-factor (coef) to get the equation to work better. There are such coefs for lift, drag, and moment here. More importantly, each AOA has its own coef. Some airfoils work well at higher AOA, some dont. The heart of the airfoil file is to manage these coef for each AOA.
Coef values are gemeraly multiplied right in an equation, like the basic drag equation:
d = .5 p cd v-squared s
d = drag force
p = air density
cd = drag coef
v = velocity
s = sirface area
So you see a drag coef of 0 means NO drag at all, no matter what speed! Same thing works for lift and moment. So a drag coef of 2 means doubleing the effect of the other parameters. Also negative numbers reverse the force. You will see negative coef of life and moment, when the wing AOA is negative, the lift usually pulls that plane downward.
Well this is just a start, and I am not a master, so much of this may be plain wrong - have fun!
------------------
-Sv =FC=
WWI in SDOE!