Howto:Make an aircraft: Difference between revisions

Jump to navigation Jump to search
Small changes
m (moved Howto: Make an aircraft to Howto:Make an aircraft: Robot: Moved page)
(Small changes)
Line 1: Line 1:
{{stub}}
{{stub}}


There are many things required to '''develop an [[aircraft]] for [[FlightGear]]'''. We encourage new aircraft [[Portal:Developer|developers]] to start their 'career' by modifying and enhancing existing aircraft. 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 [[Portal:Developer/Aircraft|aircraft developers]] to start their 'career' by modifying and enhancing existing aircraft. It is much easier to do and gives you a giant advantage by the time you create an aircraft completely by yourself.  


The content in this article gives a summary of codes and can be found on most planes. So, for examples on how it's used, you can take a look at some random planes.
The content in this article gives a summary of codes and can be found on most planes. So, for examples on how it's used, you can take a look at some random planes.
Line 12: Line 13:
# The '''appearence''' of the aircraft, which can be split in two areas:
# The '''appearence''' of the aircraft, which can be split in two areas:
## 3-dimensional model and all of its visual aspects: animations (These give visual feedback from your FDM. Move the aileron of your 3D model when the aileron control is moved. Same for the other aero surfaces, the gear. Than go ahead with the instruments, animate the needles, the digital readouts. Define hot spots and pick animations, so you can click in your 3D cockpit.), [[Howto: Add aircraft lights|lighting]] and textures (images that are put in specific locations on the 3D model).
## 3-dimensional model and all of its visual aspects: animations (These give visual feedback from your FDM. Move the aileron of your 3D model when the aileron control is moved. Same for the other aero surfaces, the gear. Than go ahead with the instruments, animate the needles, the digital readouts. Define hot spots and pick animations, so you can click in your 3D cockpit.), [[Howto: Add aircraft lights|lighting]] and textures (images that are put in specific locations on the 3D model).
## auditory (sounds).
## Auditory (sounds).


== Introduction ==
== Introduction ==
There are lots of FlightGear aircraft that need cockpit work. This requires both artistic (create 3D models and textures...) and technical abilities (create XML, perhaps even nasal scripts and gathering information of the thing being modeled). This is also one area were your work is very visible to every day FlightGear users and this makes this effort one that has a major impact of the apparent quality of FlightGear.
There are lots of FlightGear aircraft that need cockpit work. This requires both artistic (create 3D models and textures...) and technical abilities (create XML, perhaps even nasal scripts and gathering information of the thing being modeled). This is also one area were your work is very visible to every day FlightGear users and this makes this effort one that has a major impact of the apparent quality of FlightGear.


This is also a very good place to start working on things in FG. So how do you go about doing this?
This is also a very good place to start working on things in FlightGear. So how do you go about doing this?


* Find an aircraft that is part of fgdata GIT that needs cockpit work that interests you. This is important the aircraft should be one that you have a fondness for. This work is a labor of love and that will not be the case if you just pick some random aircraft.
* Find an aircraft that is part of fgdata GIT that needs cockpit work that interests you. This is important the aircraft should be one that you have a fondness for. This work is a labor of love and that will not be the case if you just pick some random aircraft.
Line 25: Line 26:
*  Also the aircraft dev will likely have to spend time mentoring you and it may actually take him more time to do this mentoring than it would have taken him to do the work. So stick around and do enough work to that aircraft that the mentoring effort pays off for the aircraft dev.
*  Also the aircraft dev will likely have to spend time mentoring you and it may actually take him more time to do this mentoring than it would have taken him to do the work. So stick around and do enough work to that aircraft that the mentoring effort pays off for the aircraft dev.
*  Keep in mind that the learning curve is fairly steep and at first the work will take a lot of effort to do what would be trivial task for someone with lot of experience doing this stuff. You need to be ready to deal with the learning curve.
*  Keep in mind that the learning curve is fairly steep and at first the work will take a lot of effort to do what would be trivial task for someone with lot of experience doing this stuff. You need to be ready to deal with the learning curve.


=== Rules and guidelines ===
=== Rules and guidelines ===
* 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.
* All images in FlightGear should be sized to powers of two (eg. 64*64, 128*256 or 16*1024). Most computers cannot handle textures larger than 4096 pixels. 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 consistently throughout all of your files. But XML files that are used by JSBSim FDMs must use spaces and not tabs.
* 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 consistently throughout all of your files. But XML files that are used by JSBSim FDMs must use spaces and not tabs.
* Filenames and directories are case-sensitive on most OS's. Windows is not case-sensitive, so when you are developing on a Windows machine, you won't notice any problems. On other OS's, there is a difference between 'Boeing' and 'boeing'. Since FlightGear is used on multiple platforms, make sure your code makes correct usage of capitals.
* Filenames and directories are case-sensitive on most OS's. Windows is not case-sensitive, so when you are developing on a Windows machine, you won't notice any problems. On other OS's, there is a difference between 'Boeing' and 'boeing'. Since FlightGear is used on multiple platforms, make sure your code makes correct usage of capitals!


=== Tools of the Trade ===
=== Tools of the trade ===
If you realize this is harder than you expect, don't worry. For the first-timer, the FDM(aircraft.xml), aircraft-set.xml, and the engine.xml files are the easiest. Modeling will require considerable time and practice. You want to have the tools for the job, so here are some tools to help:
If you realize this is harder than you expect, don't worry. For the first-timer, the FDM(aircraft.xml), aircraft-set.xml, and the engine.xml files are the easiest. Modeling will require considerable time and practice. You want to have the tools for the job, so here are some tools to help:


Line 44: Line 44:
** '''NOTE:''' Implement the specifications into the xmls
** '''NOTE:''' Implement the specifications into the xmls
* A friend, and/or another developer, let's say you only want to do the FDM and XMLs. You'll need another person (a modeller) to model. Don't worry, the <author> tag has enough room. ;)
* A friend, and/or another developer, let's say you only want to do the FDM and XMLs. You'll need another person (a modeller) to model. Don't worry, the <author> tag has enough room. ;)
* 6 days for xmls + 2 weeks for modeling
* A lot of patience
* your patience


== Directories and files ==
== Directories and files ==
Line 58: Line 57:
It's worth noting that FlightGear doesn't expect any particular structure of folders or files, i.e. you could theoretically put things ANYWHERE, as long as you properly reference all files and paths in the top-level aircraft-set.xml file. However, it makes sense to follow some existing conventions (look at other well-maintained aircraft). Some more tips can be found here: [[Standard aircraft structure]] (needs to be updated as of 05/2012). A more recent discussion covering the pros & cons of the various approaches is to be found [http://flightgear.org/forums/viewtopic.php?f=4&t=12903&p=156902#p156902 on the forum].
It's worth noting that FlightGear doesn't expect any particular structure of folders or files, i.e. you could theoretically put things ANYWHERE, as long as you properly reference all files and paths in the top-level aircraft-set.xml file. However, it makes sense to follow some existing conventions (look at other well-maintained aircraft). Some more tips can be found here: [[Standard aircraft structure]] (needs to be updated as of 05/2012). A more recent discussion covering the pros & cons of the various approaches is to be found [http://flightgear.org/forums/viewtopic.php?f=4&t=12903&p=156902#p156902 on the forum].


=== The .xml file (FDM) ===
=== Root directory ===
==== -set.xml file ====
{{Main article|Aircraft-set.xml}}
The most important file describing the aircraft's dependencies is the <tt>aircraft-set.xml</tt> file.
 
==== .xml file (FDM) ====
This file contains the entire (or partial) [[Flight Dynamics Model]] of the aircraft. We have three different systems; they all have their up- and downsides.
This file contains the entire (or partial) [[Flight Dynamics Model]] of the aircraft. We have three different systems; they all have their up- and downsides.
* [[YASim]], needed for: helicopters, towing over a [[Howto: Multiplayer|multiplay network]]
* [[YASim]], needed for: helicopters, towing over a [[Howto: Multiplayer|multiplay network]]
Line 64: Line 68:
* [[UIUC]] (rarely used these days)
* [[UIUC]] (rarely used these days)
With limited data available, YASim is generally considered to be the best way to go. When you have acces to real windtunnel data and/or require more flexibility, JSBSim might be a better choice.
With limited data available, YASim is generally considered to be the best way to go. When you have acces to real windtunnel data and/or require more flexibility, JSBSim might be a better choice.
The most important file describing the aircraft's dependencies is the [[Aircraft-set.xml]] file.


=== Engines/ directory ===
=== Engines/ directory ===
Line 138: Line 139:


== Related content ==
== Related content ==
* [[Howto: Request new aircraft]]
* [[Howto: Make a helicopter]]
* [[Howto: Make a helicopter]]


[[Category:Aircraft enhancement|Make an aircraft]]
[[Category:Aircraft enhancement|Make an aircraft]]
[[Category:Howto|Make an aircraft]]
[[Category:Howto|Make an aircraft]]

Navigation menu