Quickstart for aircraft creation

Introduction

You have downloaded and installed Flight Gear, and flown the aircraft. You may be wondering how to create an aircraft and add it into Flight Gear. This tutorial will show you how to get your 3D aircraft design flying in Flight Gear, with the minimum of features, however.

In later chapters, we will see how to animate parts of the model and add other features. Aircraft "painting" or textures will have to be covered in a separate section.

The existing documentation for aircraft creation is somewhat varied and technical, and I will post links to it at the bottom of the page to these. This tutorial is based on several years of experimentation on my part using various versions of Flight Gear. Each step will be verified by a walk through on my part.

The First Step

The first step is to find an aircraft that actually works in Flight Gear. Modifying an existing aircraft avoids many of the errors and pitfalls of the aircraft creation process.

Download a suitable aircraft: I have chosen the Mirage 2000 created in 2006, a simple enough model that works. The main thing is it does not have too many files in it.

The aircraft can be downloaded here:

(http://ftp.igh.cnrs.fr/pub/flightgear/ftp/Aircraft-1.9.1/)

Download the aircraft and copy it to the Flight Gear aircraft folder and unzip or uncompress the file here. You will end up with a folder named m2000.

This folder contains the following files: under m2000


Under models there is a separate set of folders also.

Load and test fly the aircraft to make sure everything is working. This is an aircraft with a 2D panel for now, we will enable 3D panels later.

As a first step, we will change the aircraft model to that of another similar aircraft, just to check if changing the aircraft process works properly.

Go to an aircraft in the Aircraft folder, such as the T-38 and copy the T-38 model to the model folder of the m2000. Not so much a similar aircraft but a jet nonetheless and will do for the moment.

The settings have to be changed in the model folder to refer to the new model, so open up the m2000.xml file in the model folder and change the following lines.

<path>mirage2000.ac</path>

<path>T38.ac</path>

Make sure T capital, or FG will load the previous model in FGRUN it happend to me:

You will see the T-38 m odel inside the FGRN launcher with some textures missing. No matter, we will get there .

Take off with the aircraft and do a few rolls and loops . The landing gear is out, and cannot be retracted, ( we will get to this under animations ) and no control movements are seen. You have, however a working model in Flight Gear.

The Flight Model

You may have heard about the flight model for a flight simulator. In Flight gear on any other simulator, it is the file that stores information on how the plane is to behave, how to respond to controls, throttle input, and so on. Any plane will roll left or right or go up and down when the control yoke is moved left or right or backwards and forwards, but how much it does is something that is configured in the flight model file. The flight dynamics file or FDM consists of settings such as the mass of the aircraft and the wing area and many other parameters that are used by the flight simulator program to come up with a reasonable behaviour for the aircraft.

In our Mirage 2000 model, have a look at the files in the root folder: there is one innocuously named 'mirage2000.xml'. This model file has all the settings needed for the aircraft to fly. There are no dependencies on what the model actually looks like, in fact, I have flown a cube in flight gear. There may with JBSIM an engine file separately that s all.

You could, in principal, replace the FDM configuration file for the Mirage2000 with one of the Cessna 172. You would have to change this line in the -set file. Or, as I did successfully, make the Mirage 2000 fly like a Mirage 5 with this change:

<flight-model>jsb</flight-model>

<aero>mirage2000</aero>

to

<flight-model>yasim</flight-model>

<aero>mirage5-yasim</aero>

Copy the mirage5-yasim file to the mirage2000 folder and you are done.

What was it like to use the new configuration file? There were no problems or errors at all from the Flight Gear Software at all. The Mirage took much more time to accelerate to take off speed, and was not so prone to speed up when full throttle was engaged. The pronounced nose up attitude typical of a delta aircraft was very noticeable, unlike the previous jbsim flight model, which was a welcome change. It seemed that the YASIM FDM was more suitable to this aircraft, so I thought I would keep it with a few modifications. This is the advantage of having a flight configuration file separately from the simulator.


The mirage2000 folder as it appears in my computer. The mirage2000-set.xml is the main settings file, which specifies the path to the model files and also the FDM. The aforementioned FDM is simply named mirage2000.xml. Ideally it should be named mirage2000_FDM_jbsim.xml to avoid confusion. There are some extra files that will be explained later.