Howto:Make an aircraft: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
m (update)
mNo edit summary
Line 2: Line 2:
{{stub}}
{{stub}}


There are many things required to develop an [[aircraft]] for [[FlightGear]]. The data created during development results in many files, which are stored in several directories per aircraft. We encourage new developers to start their 'career' by enhancing existing aircrafts. It is much easier to do and gives you a giant advantage by the time you create an aircraft completely by yourself.
There are many things required to develop an [[aircraft]] for [[FlightGear]]. We encourage new developers to start their 'career' by enhancing existing aircrafts. It is much easier to do and gives you a giant advantage by the time you create an aircraft completely by yourself.  


==Before you start==
An aircraft in FlightGear exists of two main development areas:
An aircraft in FlightGear exists of two main development areas:
* the [[Flight Dynamics Model]], which specifies how the aircraft reacts on facts as wind, terrain and control inputs.
* the '''[[Flight Dynamics Model]]''', which specifies how the aircraft reacts on facts as wind, terrain and control inputs.
** subarea of the FDM are interal systems like the [[autopilot]] and fuel systems.
** subarea of the FDM are interal systems like the [[autopilot]] and fuel systems.
* the appearence of the aircraft, which can be split in two ares:
* the '''appearence''' of the aircraft, which can be split in two ares:
** all its visual aspects as animations, [[Howto: Add aircraft lights|lighting]] and textures.
** all its visual aspects as animations, [[Howto: Add aircraft lights|lighting]] and textures.
** auditory (sounds).
** auditory (sounds).
All images in FlightGear should be sized to powers of two (eg. 64*64, 128*256 or 16*1024). Since FlightGear 1.9, images no longer have to be saved in the .rgb format. Right now .png is most common used among FlightGear developers.


Please note that we use spaces in our codes, some developers use rather tabs, to make our code easy(er) to read. Every line that starts a new tag, we press the space key once, so you get a kind of stairs. It does not really matter what method you use, as long as you use it consistent throughout all of your files.
Please note that we use spaces in our codes, some developers use rather tabs, to make our code easy(er) to read. Every line that starts a new tag, we press the space key once, so you get a kind of stairs. It does not really matter what method you use, as long as you use it consistent throughout all of your files.


==The -set.xml file==
==Directories and files==
This is the most important file of a FlightGear aircraft. This is the only file that is read directly by FlightGear. Actually it can be compared with an airport hub (from where flights of a certain airline to all other airports departure and arrive). The -set.xml file leads FlightGear to all files that are needed to simulate the aircraft.  
The data created during development results in many files, which are stored in several directories per aircraft. Each aircraft has its own directory in the <tt>$FG_ROOT/Aircraft/</tt> directory. The first thing to do when you start working on a new aircraft is to make a directory for it. A short version of the aircraft name (eg. harrier), or its serial number (eg. 747-400) is prefered. In this directory we create one directory, namely:
 
* <tt>Models/</tt> all files related to the appearence of the model are saved in this directory.
 
More directories might be needed further on, but we will create them when we need them.
 
===The -set.xml file===
This is the most important file of a FlightGear aircraft. This is the only file that is read directly by FlightGear. Actually it can be compared with an airport hub (from where flights of a certain airline to all other airports departure and arrive). The -set.xml file leads FlightGear to all files that are needed to simulate the aircraft. The -set.xml file should be stored in the aircrafts root directory (eg. <tt>$FG_ROOT/Aircraft/747-400/</tt>)


Always begin the -set.xml file with:
Always begin the -set.xml file with:
Line 28: Line 38:
The following tags are to be placed between the <sim> and </sim> tags.
The following tags are to be placed between the <sim> and </sim> tags.


===<description></description>===
====<description></description>====
The text that have to be showed in the Aircraft selection dialog of FlightGear.
The text that have to be showed in the Aircraft selection dialog of FlightGear.
  <description>Boeing 747-400</description>
  <description>Boeing 747-400</description>


===<status></status>===
====<status></status>====
The status of the development of your plane.  
The status of the development of your plane.  
  <status> beta </status>
  <status> beta </status>


===<author></author>===
====<author></author>====
Place your name(s) here. If multiple people worked on the same aircraft, you can place the specific development area for each person between ( ).
Place your name(s) here. If multiple people worked on the same aircraft, you can place the specific development area for each person between ( ).
  <author> ET </author>
  <author> ET </author>


===<flight-model></flight-model>===
====<flight-model></flight-model>====
What FDM system is the aircraft using. Set to yasim for [[YASim]] and to jsb for [[JSBSim]].
What FDM system is the aircraft using. Set to yasim for [[YASim]] and to jsb for [[JSBSim]].


===<aero></aero>===
====<aero></aero>====
The filename of the FDM file, without .xml. This file should be placed in the aircrafts root directory (eg. <tt>$FG_ROOT/Aircraft/747-400/</tt>).
The filename of the FDM file, without .xml. This file should be placed in the aircrafts root directory (eg. <tt>$FG_ROOT/Aircraft/747-400/</tt>).


===<splash-texture></splash-texture>===
====<splash-texture></splash-texture>====
Place the location of an image you would like to show during loading of the aircraft.
Place the location of an image you would like to show during loading of the aircraft.
  <splash-texture> Aircraft/747-400/splash.png </splash-texture>
  <splash-texture> Aircraft/747-400/splash.png </splash-texture>


===<model><path></path></model>===
====<model><path></path></model>====
Where to find the model. Could be an .ac file or .xml if you want to have extras like animations etc.
Where to find the model. Could be an .ac file or .xml if you want to have extras like animations etc.
  <model>
  <model>
Line 56: Line 66:
  </model>
  </model>


===<sound><path></path></sound>===
====<sound><path></path></sound>====
The path to your aircrafts sound file, do not include if you don't have one.
The path to your aircrafts sound file, do not include if you don't have one.
  <sound>
  <sound>
Line 62: Line 72:
  </sound>
  </sound>


===<panel><path></path></panel>===
====<panel><path></path></panel>====
Where to find the (2D) panel. We prefer 3D cockpits, which are linked in the model .xml file.
Where to find the (2D) panel. We prefer 3D cockpits, which are linked in the model .xml file.
  <panel>
  <panel>
Line 68: Line 78:
  </panel>
  </panel>


===<autopilot><path></path></autopilot>===
====<autopilot><path></path></autopilot>====
Where to find the [[autopilot]] system.
Where to find the [[autopilot]] system.
  <autopilot>
  <autopilot>

Navigation menu