Aircraft Airfile Manager
V2.1


Managing .air files in Microsoft® Flightsimulator X




FREEWARE

AAM is freeware and may be used for private and commercial purpose with no limitations.





Klotz Karl-Heinz
kaha@inode.at

September 2009





System Requirements:

Windows XP or Vista
2,0 GHz CPU, 512 MB Main Memory
Graphics hardware acceleration card
1024 by 768 Display
Installation:
Copy the files AircraftAirfileManager.exe and AAM.ini to wherever you would like it to reside. Then you probably would want to generate a link to it on your desktop. AAM does not need any additional files to run initially. When started for the first time it will generate a config file named AAM.cfg which stores parameters like the size of the window or the colors you choose..
Features:
AAM is a tool that allows you to edit and change .air files in MS Flight Simulator X. AAM V2.1 is focused on FSX but it can read and change .air files from FS2004 und earlier as well as .air files from MS Combat Flight Simulator. The file AAM.ini was generated by Ron Freimuth and is maintained by Sergio di Fusco (http:// ootb.wordpress.com/aam/).
Quickstart:
When you run AAM for the first time you will be prompted to enter the path in which Microsoft® Flight Simulator X resides unless AAM can find it automatically in a standard directory.



You can enter the path directly into the edit field ‘FSX Location’, i.e. “C:\Program Files\Microsoft Games\Microsoft Flight Simulator X” or click the ‘Browse’ button and choose the appropriate directory. To do this you must first choose the correct drive in the ‘Dir_Select’ window.





If you have a default Flight Simulator installation this would be the C:\ drive. If you changed the drive at installation time it will be the drive you assigned at that time. Then you choose the correct directory by double clicking. Given a default installation of the English version of Flight Simulator this is ‘C:\Program Files\Microsoft Games\Flight Simulator X’. For the German version of Flight Simulator it is ‘Programme’ instead of ‘Program Files’. Now click ‘OK’ and you are back to the ‘General Options’ window. Click ‘OK’ again and AAM starts to read all aircraft that you have stored. If the ‘General Options’ window appears again or reappears after you reopen AAM the path was not entered correctly.

AAM automatically finds any subdirectories underneath FSX that hold any .air files. All theses subdirectories are listed in the box “Search Paths”. AAM not only finds airplanes but also all other vehicles in FSX that use a .air file.



Here you can tell AAM if it should read the airplanes in a subdirectory or not by enabling or disabling the checkbox left to the directory name.

You can add a new search path by clicking the button “New Searchpath”. You can delete a directory name from the list by highlighting it (click on it) and then pressing the button “Delete Searchpath”.

By adding the directory “Aircraft” underneath the FS2004 directory AAM can read and change FS2004 and earlier .air files as well as .air files from MS Combat Flight Simulator.

The Menu:
- File
o Load Aircraft
This item only appears when ‘show aircraft selection window’ in Options/Config is unchecked. In this case the aircraft are not shown for selection but you have to explicitely load the aircraft you want to dealwith.

o Save Aircraft
This item will store changes to disk. AAM keeps 5 generations of .air files as a backup. So if you edit an .air file named Plane.air there will be up to 5 backups: Plane.aam1.air, Plane.aam2.air, Plane.aam3.air, Plane.aam4.air and Plane.aam5.air.

o Ascii Export
Here you can export the content of the .air file to a comma delimited text file (for import into Excel).

o Exit
Exits AAM

- Edit
o Cut
Cuts the marked section to an internal buffer (you can then go to another aircraft and paste it in). The selected section is deleted. You can use the Ctrl-X Key combination for that.

o Copy
The marked section is copied to the internal buffer without deleting it. Same as pressing Ctrl-C Key.

o Paste
Pastes the section from the internal buffer into the currently edited aircraft. If the section exists it will be overwritten. If it does not exist it is inserted. Same as pressing Ctrl-V Key.

Only complete sections can be copied. It is not possible to copy a single value from a record.

- Search
o Search First
This opens the following window:



Enter the text you want to search for. Searching is done from top always. Search is done in the data listbox entries and in text sections.

o Search Next
This searches for the next occurrence of the text you entered. At the bottom of the data listbox the search will continue from the top again.


- Options
o Config
You can specify the Flight Simulator X main directory and if you want to see anti aliased lines in the Renderer.

The checkbox ‘show aircraft selection window’ lets you choose between 2 different layouts. If it is unchecked, AAM will not display the aircraft selection window. You will then have to use the menu item ‘Load Aircraft’ to load a .air file from disk.

‘show datatypes’ selects if you can see the datatype of each section in the data list box:





You also can change various colors that are used in the renderer:



1. background
By default the background is black. If you want to make screen shots of the renderer you can change this to a nother color or even to white and adjust the other colors accordingly.

2. lines
color of the curves for all 3D Tables that are not marked. The marked line in a 3D table will have the ‘marked line’ color..

3. marked lines
color for all lines in the tables except the curves in 3D tables that are not marked.:

4. marked points
this point you can drag using right mouse.

5. vertical lines
for each value on the X-axis AAM drwas a vertical line.

6. zero lines
For your convenience AAM draws the zero lines in this color. Not necessarily these lines are visible because they can be outside the value range..


Selecting aircraft and manufacturer
The selection Tab contains all the aircraft you have installed in Flight Simulator X listed in alphabetical order, and all manufacturer:




There are three list boxes. The right one holds all aircraft sorted by title, the left one holds all manufacturer and the middle one holds all aircraft for one manufacturer that is selected in the left list box.
There is always one aircraft highlighted (selected) in the right list box. Selecting an aircraft in the right list box automatically selects the correct manufacturer in the left list box and the middle list box shows all aircraft belonging to this manufacturer.

At the bottom the aircraft thumbnail (the one you see in FSX) is shown together with some information regarding the aircraft.

You always can see the selected aircraft in the caption of the main window of AAM:



By clicking a manufacturer once the right list box will change and shows all aircraft belonging to the selected manufacturer.


When you select an aircraft that uses the airfile of another aircraft you will get a notice. You can check the .air file actually used in the last line of the info box.


Airfile Manager

Here you can edit the airfile content:



The window is split in several parts. To the left you see the data listbox, lower right is the renderer, above the renderer we have the edit controls for changing data, a hex data display and in the upper right the help box is displayed.
The window can be organized by using the splitters that are placed between the data listbox and the renderer, on top of the renderer, on top of the hex data display and left to the help box. You could organize the window in the following ways (or as you like it):



Data Listbox



It shows all the data stored in a .air file. Data is organized in a tree here. There is no other subtree than a Record (REC). Clicking on the ‘+’ sign you can open subtrees, the ‘-‘ sign closes them.

Data in a .air file is stored in binary form. The .air file consists of several sections. Each section is identified by a unic number and has a specific data type. Section 1 for instance is the aircrafts title and is of type ‘text’. The data listbox lists all sections sorted by section number. Clicking on a section in the listbox opens the edit control to the upper right of the listbox. You can scroll the list box up and down.

Edit Controls
All changes you make are stored in memory until you press ‘Save’ in the menu.
There are three different edit controls to enter data. Each data type except the tables has its own edit control:

o Text
The text control allows you to change the text for a ‘text’-section in the .air file. Some text sections consit of more than one line, others hold one line of text only:



If there is more than one line you can scroll the textbox.

o Number
Numbers are entered here:



o Boolean
Values that only allow 0 or 1 are changed using two radio buttons:



Hex Editor
This display shows the content of the marked section in hexadecimal form.



It reflects the actual content at any time. If you change one character in the text control it is reflected in the hexdisplay immediately. When changing Curves in the renderer the hexdisplay updates when you release the right mouse button.
The first line of the display shows the length of the section (in decimal) and the offset into the file (in hex). Starting with line 3 we have (in hex) the absolute offset of the section (from the beginning of the file), then the relative offset (from the beginning of the section), then the hex characters and printable characters.
You can click into the hex part or into the printable part, move around using the arrow keys and change data by just entering characters. The hex part allows entry of hex characters only.

You can not edit anything here when displaying 3D tables.

Help Box
The help box shows help for sections when it is contained in the AAM.ini file.



Renderer
The Renderer shows tables in 2-dimensional form. The curve is shown as a line connecting the curve points. The X-axis is from left to right. AAM scales the render view to the boundaries of the table values. Use the left mouse button to mark points without moving them. Move the points using the right mouse button. Moving a point while holding the Ctrl-Key down will automatically scale the display. The two checkboxes ‘lock X’ and ‘lock Y’ let you lock the movement in either the X or Y direction. If ‘lock X’ is checked you won’t be able to move the point in the X-axis. There are three different tables that are shown in the renderer:

o 1-dimensional tables (TBL16)
These tables consist of a number of Y-values only. AAM uses the point number for the X-axis:



The picture above shows a 1-dimensional table that consists of 17 points Currently point 5 is marked, it holds a value of 15. Movements cannot be locked here because the X-values are fixed.

o 2-dimensional tables
These tables consist of a number of X/Y pairs. Look at the following picture:
The blue lines mark the zero values for the X- and Y-axis. The yellow points show the Y values for each X-value. The left most point is marked for movement with the right mouse button. The lock in X is active so movement will move the point up/down only. The fields ‘X’ and ‘Y’ show the X and Y values of the currently marked point.



As you can see in the middle of the display there are some points very tight together in the X axis. You can scale the display using the scrollbar just at the top right of the renderer. You can move the display using the left mouse button (left/right).



o 3-dimensional tables
These tables hold 2 or more 2-dimensional tables like the table for the propeller efficiency. AAM shows all 2-dimensional tables in one view and lets you select one of it for changing points. The following picture shows the propeller efficiency table:



There are 6 2-dimensional tables for blade angles from 15 to 40. Using the radio buttons on the top you can select each 2-dimensional table for editing by either clicking the radio button or by clicking into the edit field. The selected table will be drawn in a different color and it will show the curve points. Change the points like you do it for 2-dimensional tables. The additional edit field right to the prop pitch values can hold values for some mach related 3d tables. The values for X and Y can directly be entered into the fields at the bottom of the renderer.

Tables can be exported and imported by using these buttons bottom right:



‘Export’ lets you export the data to a text file that can be imported to Excel. The behaviour of delimiters and decimal points can be adjusted using the menu ‘Options->Configuration’.

Please not that when importing data to the tables the number of rows and columns can not yet be changed. This will be part of a future release.