simulation

X-Plane key binding

Here I compiled the keyboard mapping for several versions of X-Plane. I wrote a tiny Perl program that simply formats the keys/X-Plane.txt file distributed with X-Plane into a comprehensible HTML table:

(for X-Plane v6.30, take a look here)

stas » May 10, 2006 » 01:51

ACFTools+AC3D tutorial


My attempt to show how is it possible to make X-Plane models using AC3D editor and my ACFTools.
  1. Open AC3D Smiling
  2. Now you shall use Side (ZY) view to draw a shape of revolution object to be imported. You may wish to draw it as Polyline:

    Object shape

    Note that the shape polyline has exactly 9 vertices and it is closed.
  3. Put your shape a bit off-center. You will be revolving it around Y axis, so just create small gap between shape edge and Y axis:

    First gap

    Later you will see the meaning of this gap Smiling
  4. Select your shape as group, and do "Object -> Revolve...". Enter with 180 degrees, Y axis and 11 segments:

    Revolve dialog

    Wow, look, you got half of your object:

    One half

    By default it has flat surface but you may wish to set a smooth one like I did.
  5. Go to Side (XY) view. Select your object and "Edit -> Duplicate" it. Then flip it on X axis. Now align both halves so they again have a very small gap between them. DO NOT SNAP THEM TOGETHER!. Then do "Object -> Merge". You should get this:

    Both halves

    Note "move to" coordinates. X is 0.53 instead of 0.5! That 0.03 difference on both sides of Y axis makes that desired gap.
    You may be wondering why to have yet another gap here? Well, 18 vertices in each section are supposed to be sorted automatically in counter-clockwise order. If you have overlapping vertices like in this case, algorithm treats vertices with same coordinates as being one vertex and thus messes everything. Sorry.

    VERY IMPORTANT: switch to vertex selection mode. You should see exactly 216 vertices. If you do not have 216 vertices you're terrible wrong, start over!!!
  6. At this moment you are ready for the most boring part. Split AC3D-generated object to sections that X-Plane would accept. Now a bit of theory. X-Plane treats all aircraft models as 3D objects with 12 sections with 18 vertices each one. If you try to feed it with everything else, surface will be mismapped. Thus you NEED to cut your AC3D object into 12 sections with 18 vertices each one. And 12 * 18 = 216, got it? Smiling. OK, to start section splitting you need to remove all surfaces. Sorry again Smiling "Surface -> Remove surface only". Now hurry up, "File -> Save" as original.ac.
  7. Let the pain begin. >%E~
    Go to Plan (XZ) view. Select 18 vertices:

    Section #1

    1. Copy these vertices to clipboard. Delete them.
    2. "File -> Save" original.ac
    3. "File -> New..." and paste 18 vertices from clipboard.
    4. Save as section01.ac

    Now reopen original.ac. Select next 18 vertices:

    Section #2

    Do the same steps as for first section, but now save it as section02.ac. Unless you are screaming in anger extract all the 12 sections in this way. Calm down, it's not that boring when you start to do it Smiling
  8. Understood the meaning of the first gap? If you added none, when you try to select 18 vertices you select 48 each time you reach center, as you select some central vertices from other sections.
  9. Supposing you were patient enough, at this moment your original.ac is empty and you have sections 1 to 12 in separate .ac files. Now merge them back. No, I'm not kidding. Merging all sections in sequence from 1 to 12 puts them in the order that X-Plane accepts. OK, I think that there is no need to explain how to "File -> Merge.." 12 section files in one. The result will look the same as original.ac (rest in peace) but internal order would be the right one. You should now "Object -> Merge" & Group 216 vertices (assure that you still have 216!). Call your group "body[45]", it will import to X-Plane as "misc. body 1":

    Final result

    Rescale this object to any size you want (in feets) and save all the stuff as importable.ac.
  10. OK, now go and merge importable.ac in any model of yours using ACFTools:
    acftools -e -acf C:\X-Plane\Aircraft\UPHO.acf -txt UPHO.txt
    (prepare UPHO.txt to work with) acftools -me -ac3d importable.ac -txt UPHO.txt (merge! don't worry about warnings)
    Fine! Next step is to edit UPHO.txt in your favorite text editor (I use Write) to mark that "misc. body 1" was added:
    1. Seek for PARTS_WingBodyGear_part_eq[45] and make it "= 1"
    2. Seek for PARTS_WingBodyGear_body_r[45] and set it to desired radius of your body (or Plane-Maker will mess the things up)
    3. Seek for PARTS_WingBodyGear_body[45][0][0]. This was your section01.ac. Remember the second gap? Remove it setting all the X values for 1st section to 0. Remember that each section has 18 vertices, so, don't harm neighbor ones!
    4. Seek for PARTS_WingBodyGear_body[45][11][0]. This was your section12.ac. Make the same as for section 1 Smiling
  11. acftools -g -txt UPHO.txt -acf test.acf
    (generate test.acf from edited .txt file)
    Finally open test.acf in Plane-Maker and see what the heck you just did =D
    It may be a bit broken, just fix it in Plane-Maker as normal body.
stas » May 10, 2006 » 01:22

ACFTools (for X-Plane)


ACFTools screenshot

The Plane-Maker from X-Plane v7.x is fun and easy to use... Although I found it a bit limited to edit my planes' fuselage. 20 cross-sections aren't enough, sometimes. It would be nice to export the fuselage shape into any 3D-editor and fine-tune it there... This is exactly what my ACFTools are supposed to do. Please note that X-Plane v8.x is unsupported, unless you create & edit a v7 model and then import it to Plane-Maker v8. But I believe this isn't a problem: X-Plane v8 is able to use OBJ format files (which can be imported/exported by AC3D and Blender plugins) as parts of an aircraft, thus, extremely weird shapes are perfectly possible without even touching the ACF file.
Now, what exactly ACFTools does? It is able to process the file that stores all the aircraft data (except the textures), in the binary ACF format, and dump all the data in the human-readable TXT format. It is the same format as for Tony Gondola's ACF2Text utility, which inspirited my ACFTools. Then, ACFTools can extract the 3D model of the aircraft from this data, and export it in the AC3D format. After that you can edit the aircraft's shape as you want using AC3D and make the inverse process: from .ac to .txt, and then from .txt to .acf. Here comes the brief set of ACFTools features:
  • Convert from ACF (aircraft) & WPN (weapon) formats to TXT format and vice-versa.
  • Extract AC3D model from TXT file, along with wings and propellers (using the real airfoils!).
  • Import AC3D model into TXT file (fuselage, nacelles, wheel fairings & external fuel tanks only)
3D model extractor is also useful if you want to use X-Plane generated aircrafts somewhere else; as in your own Computer Graphics compositions.
ACFTools was written in Perl, thus it is able to work under Linux, MacOS & Windows. And it is Open-Source & highly modular, so you can modify it as you want, or use my functions for your own needs. When you start ACFTools, this is what you get at your console:
##############################################################################
[ACFTools v0.62a] Set of tools to play with ACF files outside of Plane-Maker
Perl script and modules coded by Stanislaw Pusep
Site of this and another X-Plane projects of mine: http://xplane.sysd.org/

Allows you to:
* export X-Plane (www.x-plane.com) aircraft data files to human-editable
plaintext format and 3D mesh editable in AC3D modeler (www.ac3d.org).
* import plaintext/3D mesh back to ACF file.
##############################################################################

Usage: acftools.exe [parameters]
o Commands:
-extract [DEF] : extract TXT from ACF (opt: using DEF definition)
-generate : generate ACF from TXT
-merge : merge body from AC3D file to TXT
o Parameters:
-acffile FILE : name of ACF file to process
-txtfile FILE : name of TXT file to process
-ac3dfile FILE : name of AC3D file to process
-noorder : DO NOT sort vertices while merging bodies
-noac3d : DO NOT generate AC3D
-(min|max)body N: write all bodies in specified range to AC3D
-force LIST : force extraction of bodies LIST (comma-separated N)
-normalize N : normalize wings to N vert/surface (N>=2 or no wings!)
o Notes:
* You can use abbreviations of commands/parameters (-gen or even -g
instead of -generate).
* The only required parameter for "extract" command is -acffile.
Both -txtfile and -ac3dfile are derivated from it.
* "generate" command and -txtfile has the same relation.
* By default "extract" uses the latest DEF file.
* "generate" doesn't need DEF at all (it is implicit in TXT)
* If file to be created already exists backup is made automatically.
o Examples:
acftools.exe --extract=ACF700 --acffile="F-22 Raptor.acf"
(extract 'F-22 Raptor.txt' from 'F-22 Raptor.acf')

acftools.exe -e -acf "F-22 Raptor.acf"
(same as above)

acftools.exe -me -ac3d ladar.ac -txt "F-22 Raptor.txt"
(merge *single* 3D body from 'ladar.ac' to 'F-22 Raptor.txt')

acftools.exe -g -txt "F-22 Raptor.txt"
(reverse operation; generate 'F-22 Raptor.acf' from 'F-22 Raptor.txt')
The most important thing you should know is that to convert from the binary ACF format to TXT, ACFTools uses one of the files stored in the defs directory. By default, it is a ACF740.def, which works for X-Plane v7.40 and later. You can specify any definition file you want, as shown on the screen above. You can also write your own definition files, if you have the structure specification. Note that to convert TXT back to ACF, no definition is necessary, as the TXT format itself holds all the data necessary to build the binary file. The second thing is to specify the file that ACFTools should convert. The name of the converted file and every of the intermediary files will be generated from this name. When converting from ACF to AC3D formats, TXT file is generated automatically. Please note that when you want to put the edited aircraft part back into the .acf file, you must save this part as a .ac separate file, then merge it into the TXT file, and after that convert it into ACF! Yes, it would be nice to have a GUI to automate the entire process, but I'm too lazy to do that! Anyway, may the source be with you Eye-wink
I strongly recommend you to read the docs\README.txt file contained in the ACFTools package before you start using it!
stas » May 10, 2006 » 01:09

X-V8L model


X-V8L pictures

General characteristics
X-V8L experimental joined-wing ultralight design
Crew
1 pilot
Engine
two small 2-stroke engines (similar to "JPX PUL 212" or "SOLO 210")
Power
15 hp at 6000 rpm (30 hp total)
Dimensions
Wing area
40 sq.ft (3.7 m²)
Wing span
12.2 ft (3.7 m)
Wing aspect ratio
8.0
Length overall
8.2 ft (2.5 m)
Height overall
4.3 ft (1.3 m)
Weights
Max. fuel on board
40 lb (18 kg)
Weight empty
150 lb (68 kg)
Max. weight
400 lb (181 kg)
Payload
210 lb (95 kg)
Performance
Max. cruise speed
125 knots (230 km/h)
Max. climb rate
1200 ft/min (6 m/s)
Service ceiling
15000 ft (4500 m)
Stall speed (flaps down)
45 knots (83 km/h)
Take off run
1000 ft (300 m)
Landing run
1000 ft (300 m)
Max. range
400 nm (740 km)

This is a model I developed for X-Plane to test this uncommon aerodynamic scheme. It's not unique, yet: some people actually think that joined-wing design is superior to the traditional one. Here are some examples of joined-wing & box-wing aircrafts:

Ligeti Stratos Virginia Tech & Loughborough University Ikelos
Joined wing concept by Jose E. Araya
Box wing concept by Lockheed Martins

My idea was to create some kind of a "flying scooter". So, my X-V8L ultralight was based on the famous MC-15 Cricket (a.k.a. Cricri), which is the world's smallest twin-engine aircraft:

MC-15 Cricket

A "real world" reference is also important to evaluate if this thing would fly at all Smiling
Thus, X-V8L has (almost) the same power plant, weight and wing area as the MC15 Cricket. In fact, to obtain this data, I had to peek into another X-Plane model, the MC15 Cricket by Emmanuel Sanvito (a.k.a. Namu).
Now, the design itself is completely different. First of all, X-V8L has more wings and a bigger wing area. Second, it makes use of a ducted fan. This is supposed to give 50% thrust increase, and can be easily made for smaller propellers. At the time I modeled X-V8L for X-Plane, there was no ducted fan-specific option, so I had to simulate it increasing the engine power up to 22.5 hp. And rudder/elevator surfaces are currently inside the duct. This is supposed to redirect air flux to give better handling, as X-V8L has no horizontal/vertical stabilizers. On this model the effect is reforced by applying "vector trust" option to our tiny propeller engines.
The flight test results are surprising. All the data from the table shown above were obtained from the "flight tests" performed under X-Plane v7.10. And it got quite close to the "real thing": the MC15 Cricket!
stas » May 10, 2006 » 01:02
XML feed