Howto:Add wingmen: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
m (Wiki styling (reference, internal links), categorised.)
Line 1: Line 1:
[[File:b29s-bombs.jpg|thumb|270px|[[Boeing B-29 Superfortress|B-29]]s dropping their load.]]
[[File:b29s-bombs.jpg|thumb|270px|[[Boeing B-29 Superfortress|B-29]]s dropping their load.]]
Military aircraft are rarley seen singly: they usually operate nowadays in pairs or larger formations. The pair is the basic building-block, but historically the "vic" of 3 was also used, until it was realised that this was tactically inflexible, and the pair was adopted instead. [[http://books.google.com/books?id=e_AFFjoqeoQC&pg=PA42&lpg=PA42&dq=%22finger+four%22&source=web&ots=NAlVgFJZg_&sig=2m7H1nc5S17pty3-taF3OYWLeZE|Formations]]
[[:Category:Military aircraft|Military aircraft]] are rarley seen singly: they usually operate nowadays in pairs or larger formations. The pair is the basic building-block, but historically the "vic" of 3 was also used, until it was realised that this was tactically inflexible, and the pair was adopted instead.<ref>[http://books.google.com/books?id=e_AFFjoqeoQC&pg=PA42&lpg=PA42&dq=%22finger+four%22&source=web&ots=NAlVgFJZg_&sig=2m7H1nc5S17pty3-taF3OYWLeZE ''Air Power History'', 2002]</ref>


AIWingman is the method in [[FlightGear]] whereby one or more aircraft can be added to the main model to build up formations. Thare is a significant framerate cost involved. However, formations of up to 12 aircraft have been tested, and with careful choice of options, and a fairly powerful computer, reasonable frame rates can be achieved, even at KSFO.  
AIWingman is the method in [[FlightGear]] whereby one or more [[aircraft]] can be added to the main model to build up formations. Thare is a significant framerate cost involved. However, formations of up to 12 aircraft have been tested, and with careful choice of options, and a fairly powerful computer, reasonable frame rates can be achieved, even at [[KSFO]].  
Wingmen are not AI Aircraft. In the interest of framerate they are in fact a sub-class of slaved objects, with added sinusoidal noise and some simple AI rules. They can be released to act independently in a limited way: they can break and rejoin a formation. [http://www.youtube.com/watch?v=-GnOC4hJHJg| B29 12-Ship Formation]
Wingmen are not AI Aircraft. In the interest of framerate they are in fact a sub-class of slaved objects, with added sinusoidal noise and some simple AI rules. They can be released to act independently in a limited way: they can break and rejoin a formation. [http://www.youtube.com/watch?v=-GnOC4hJHJg|B29 12-Ship Formation video]


The formation can be changed by the use of a Nasal script. There is no collision detection or avoidance, so you must avoid flying the wingmen into each other during a formation change. Thare is a significant framerate cost involved. The wingmen can be as simple or complicated as you wish. The ones currently implemented tend to be fully detailed, and can be "ridden". This is uneccesary, but gives a fun viewpoint of the formation.
The formation can be changed by the use of a [[Nasal]] script. There is no collision detection or avoidance, so you must avoid flying the wingmen into each other during a formation change. Thare is a significant framerate cost involved. The wingmen can be as simple or complicated as you wish. The ones currently implemented tend to be fully detailed, and can be "ridden". This is uneccesary, but gives a fun viewpoint of the formation.
   
   
This [[:Category:Howto|howto]] will explain '''how to add wingmen''' to your model
This [[:Category:Howto|howto]] will explain '''how to add wingmen''' to your model


===Step 1: creating the wingman===
===Step 1: creating the wingman===
First, you need to create a file with the extension .xml containg at least one <entry> tag within a <scenario> tag. This file can have any name you like, but MUST go into the directory AI with all the existing scenarios. Here is an example taken from the AI/wingman_b29_demo.xml:
First, you need to create a file with the extension .xml containg at least one <entry> tag within a <scenario> tag. This file can have any name you like, but MUST go into the directory AI with all the existing scenarios. Here is an example taken from the <tt>[[$FG_ROOT]]/AI/wingman_b29_demo.xml</tt>:


   <scenario>
   <scenario>
Line 40: Line 40:
     </entry>
     </entry>
   </scenario>
   </scenario>
==References==
<references/>
[[Category:Howto|Add wingmen]]

Revision as of 21:09, 2 October 2010

B-29s dropping their load.

Military aircraft are rarley seen singly: they usually operate nowadays in pairs or larger formations. The pair is the basic building-block, but historically the "vic" of 3 was also used, until it was realised that this was tactically inflexible, and the pair was adopted instead.[1]

AIWingman is the method in FlightGear whereby one or more aircraft can be added to the main model to build up formations. Thare is a significant framerate cost involved. However, formations of up to 12 aircraft have been tested, and with careful choice of options, and a fairly powerful computer, reasonable frame rates can be achieved, even at KSFO. Wingmen are not AI Aircraft. In the interest of framerate they are in fact a sub-class of slaved objects, with added sinusoidal noise and some simple AI rules. They can be released to act independently in a limited way: they can break and rejoin a formation. 12-Ship Formation video

The formation can be changed by the use of a Nasal script. There is no collision detection or avoidance, so you must avoid flying the wingmen into each other during a formation change. Thare is a significant framerate cost involved. The wingmen can be as simple or complicated as you wish. The ones currently implemented tend to be fully detailed, and can be "ridden". This is uneccesary, but gives a fun viewpoint of the formation.

This howto will explain how to add wingmen to your model

Step 1: creating the wingman

First, you need to create a file with the extension .xml containg at least one <entry> tag within a <scenario> tag. This file can have any name you like, but MUST go into the directory AI with all the existing scenarios. Here is an example taken from the $FG_ROOT/AI/wingman_b29_demo.xml:

 <scenario>
   <entry>
     <name>Wingman-Port</name>
     <type>wingman</type>
     <model>AI/Aircraft/b29/Models/b29-wingman.xml</model>
     <speed>0</speed>
     <life>-1</life>
     <repeat>false</repeat>
     <count>1</count>
     <x-offset>-500</x-offset>
     <y-offset>-500</y-offset>  
     <z-offset>0</z-offset>
     <yaw-offset>0</yaw-offset>
     <pitch-offset>0</pitch-offset>
     <roll-offset>0</roll-offset>
     <formate>true</formate>  
     <submodels>
       <path type="string">/Aircraft/b29/b29-submodels.xml</path>
       <serviceable type="bool">true</serviceable>
     </submodels>
     <coefficients>
       <heading>5.0</heading>
       <pitch>4.0</pitch>
       <bank>4.0</bank>			
       <speed>2.5</speed>
     </coefficients>
   </entry>
 </scenario>

References