Difference between revisions of "Template:Aircraft specifications/switch"

From blackwiki
Jump to navigation Jump to search
blackwiki>Cydebot
m (Robot - Removing category Templates using ParserFunctions per CFD at Wikipedia:Categories for discussion/Log/2008 August 21.)
blackwiki>Fnlayson
(Update with code from Template:Aircraft specifications. switched alt and main code)
Line 1: Line 1:
<noinclude>{{intricate template}}
+
{{
[[Category:Aviation formatting templates|{{PAGENAME}}]]
+
#if: {{{ref|}}}
 
+
|<p style="font-size: 90%; margin:0; padding: .2em">''Data from'' {{{ref}}}</p>
'''Editors beware:''' formatting of code to make it "look nice" is very likely to inadvertently introduce leading and trailing blank lines into the template output.
+
}}<big>'''General characteristics'''</big>{{
</noinclude>{{#if:{{{ref|}}}|<p style="font-size: 90%; margin:0;">''Data from'' {{{ref}}}</p>|}}<h3 style="padding-top: .2em;">General characteristics<h3>
+
#if: {{{crew|}}}
* '''Crew:''' {{{crew|}}}{{
+
|* '''Crew:''' {{{crew}}}
#if:{{{capacity|}}}
+
}}{{
 +
#if: {{{capacity|}}}
 
  |* '''Capacity:''' {{{capacity}}}
 
  |* '''Capacity:''' {{{capacity}}}
}}{{
+
}}{{
#if:{{{payload main|}}}
+
#if: {{{payload alt|}}}
  |* '''Payload:''' {{{payload alt|}}} ({{{payload main|}}}) {{{payload more|}}}
+
  |* '''[[Payload (air and space craft)|Payload]]:''' {{{payload alt}}} ({{{payload main|}}}) {{{payload more|}}}
}}
+
}}
* '''Length:''' {{{length alt|}}} ({{{length main|}}}){{
+
* '''Length:''' {{{length alt|}}} ({{{length main|}}})
#ifeq:{{{plane or copter?}}}|copter
+
* '''{{#ifeq: {{{plane or copter?}}} | copter
  |* '''Rotor diameter:''' {{{span alt|}}} ({{{span main|}}})
+
  |Rotor diameter
  |* '''[[Wingspan]]:''' {{{span alt|}}} ({{{span main|}}})
+
  |[[Wingspan]]
}}
+
}}:''' {{{span alt|}}} ({{{span main|}}})
 
* '''Height:''' {{{height alt|}}} ({{{height main|}}}){{
 
* '''Height:''' {{{height alt|}}} ({{{height main|}}}){{
#ifeq:{{{plane or copter?}}}|copter
+
#if:{{{area main|}}}
  |* '''Disc area:''' {{{area alt|}}} ({{{area main|}}})
+
  |* '''{{
|* '''Wing area:''' {{{area alt|}}} ({{{area main|}}})
+
#ifeq: {{{plane or copter?}}} | copter
}}{{
+
  |Disc
#if:{{{airfoil|}}}
+
  |Wing
  |* '''[[Airfoil]]:''' {{{airfoil}}}
+
}} area:''' {{{area alt}}} ({{{area main|}}})
}}
+
}}{{
* '''Empty weight:''' {{{empty weight alt|}}} ({{{empty weight main|}}}){{
+
#if: {{{airfoil|}}}
#if:{{{loaded weight main|}}}
+
  |* '''[[Airfoil]]:''' {{{airfoil}}}
 +
}}{{
 +
#if: {{{empty weight alt|}}}
 +
|* '''Empty weight:''' {{{empty weight alt|}}} ({{{empty weight main|}}})
 +
}}{{
 +
#if: {{{loaded weight alt|}}}
 
  |* '''Loaded weight:''' {{{loaded weight alt|}}} ({{{loaded weight main|}}})
 
  |* '''Loaded weight:''' {{{loaded weight alt|}}} ({{{loaded weight main|}}})
}}{{
+
}}{{
#if:{{{useful load main|}}}
+
#if: {{{useful load alt|}}}
 
  |* '''Useful load:''' {{{useful load alt|}}} ({{{useful load main|}}})
 
  |* '''Useful load:''' {{{useful load alt|}}} ({{{useful load main|}}})
 +
}}{{
 +
#if: {{{max takeoff weight alt|}}}
 +
|* '''[[Maximum Takeoff Weight|Max takeoff weight]]:''' {{{max takeoff weight alt}}} ({{{max takeoff weight main|}}}) {{{max takeoff weight more|}}}
 +
}}{{
 +
#switch: {{{jet or prop?}}}
 +
|prop =* '''Powerplant:''' {{{number of props|}}}× {{{engine (prop)|}}}{{#if: {{{type of prop|}}} |&#32;{{{type of prop}}} }}, {{{power alt|}}} ({{{power main|}}}){{{power original|}}} {{{power more|}}} {{
 +
#ifeq: {{{number of props}}} |1 |
 +
  |each
 
  }}{{
 
  }}{{
#if:{{{max takeoff weight main|}}}
+
#if: {{{propellers|}}}
|* '''[[Maximum Take-Off Weight|Max takeoff weight]]:''' {{{max takeoff weight alt|}}} ({{{max takeoff weight main|}}})
+
  |* '''Propellers:''' {{{propellers}}} {{{propeller or rotor?|}}}{{
 +
  #if: {{{number of propellers per engine|}}}
 +
  |, {{{number of propellers per engine}}} per engine
 +
  }}
 
  }}{{
 
  }}{{
#switch:{{{jet or prop?|}}}
+
#if:{{{propeller diameter alt|}}}
|prop=* '''Powerplant:''' {{{number of props|}}}× {{{engine (prop)|}}} {{{type of prop|}}}, {{{power alt|}}} ({{{power main|}}}){{{power original|}}} {{{power more|}}} {{#ifeq:{{{number of props}}}|1
+
  |{{ #if: {{{propellers|}}} |**|*}} '''Propeller diameter:''' {{{propeller diameter alt}}} ({{{propeller diameter main|}}})
  |
+
}}
  |each
+
  | jet =* '''Powerplant:''' {{{number of jets|}}}× {{{engine (jet)|}}} {{{type of jet|}}}{{
  }}
+
  #if: {{{thrust alt|}}}
  |jet=* '''Powerplant:''' {{{number of jets|}}}× {{{engine (jet)|}}} {{{type of jet|}}}{{#if:{{{afterburning thrust main|}}}
+
  |{{
  |** '''Dry thrust:''' {{{thrust alt|}}} ({{{thrust main|}}}){{{thrust original|}}} {{#ifeq:{{{number of jets}}}|1
+
    #if: {{{afterburning thrust alt|}}}
  |
+
    |** '''Dry thrust:''' {{{thrust alt}}} ({{{thrust main|}}}){{{thrust original|}}} {{
  |each
+
    #ifeq: {{{number of jets}}} |1
  }}
+
      |
** '''Thrust with [[afterburner]]:''' {{{afterburning thrust alt|}}} ({{{afterburning thrust main|}}}){{{afterburning thrust original|}}} {{#ifeq:{{{number of jets}}}|1
+
      |each
  |
+
    }}
  |each
+
** '''Thrust with [[afterburner]]:''' {{{afterburning thrust alt}}} ({{{afterburning thrust main|}}}) {{{afterburning thrust original|}}} <!--
  }}
+
 
   |, {{{thrust alt|}}} ({{{thrust main|}}}){{{thrust original|}}} {{{thrust more|}}} {{#ifeq:{{{number of jets}}}|1
+
    follows ELSE branch of if [NOT] afterburning
  |
+
 
  |each
+
   -->
  }}
+
    |, {{{thrust alt}}} ({{{thrust main|}}}){{{thrust original|}}} {{{thrust alt|}}}
  }}
+
    }}<!--endif afterburning thrust; now show # of jets whether for afterburner or main --> {{
 +
  #ifeq: {{{number of jets}}} | 1 |
 +
    |each }}
 +
}}
 
  |both=* '''Powerplant:'''
 
  |both=* '''Powerplant:'''
** {{{number of jets|}}}× {{{engine (jet)|}}} {{{type of jet|}}}, {{{thrust alt|}}} ({{{thrust main|}}}){{{thrust original|}}} {{{thrust more|}}} {{#ifeq:{{{number of jets}}}|1
+
** {{{number of jets|}}}× {{{engine (jet)|}}}{{#if: {{{type of jet|}}} |&#32;{{{type of jet}}} }}, {{{thrust alt|}}} ({{{thrust main|}}}){{{thrust original|}}} {{{thrust more|}}} {{
 +
#ifeq:{{{number of jets}}}|1
 
   |
 
   |
 
   |each
 
   |each
  }}
+
}}
** {{{number of props|}}}× {{{engine (prop)|}}} {{{type of prop|}}}, {{{power alt|}}} ({{{power main|}}}){{{power original|}}} {{{power more|}}} {{#ifeq:{{{number of jets}}}|1
+
** {{{number of props|}}}× {{{engine (prop)|}}}{{#if: {{{type of prop|}}} |&#32;{{{type of prop}}} }}, {{{power main|}}} ({{{power alt|}}}){{{power original|}}} {{{power more|}}} {{
 +
#ifeq:{{{number of props}}}|1
 
   |
 
   |
 
   |each
 
   |each
 +
}}{{
 +
#if: {{{propellers|}}}
 +
  |*** '''Propellers:''' {{{propellers}}} {{{propeller or rotor?|}}}{{
 +
  #if:{{{number of propellers per engine|}}}
 +
  |, {{{number of propellers per engine}}} per engine
 +
  }}{{
 +
  #if: {{{propeller diameter alt|}}}
 +
  |** '''Propeller diameter:''' {{{propeller diameter alt}}} ({{{propeller diameter main|}}})
 
   }}
 
   }}
 
  }}{{
 
  }}{{
#if:{{{more general|}}}|{{{more general|}}}}}
+
#if:{{{propeller diameter alt|}}}
<h3>{{{performance header|Performance}}}<h3>
+
  |{{
 +
  #if: {{{propellers|}}}
 +
  |
 +
  |* '''Propeller diameter:''' {{{propeller diameter alt}}} ({{{propeller diameter main|}}})
 +
  }}
 +
}}
 +
}}{{
 +
#if: {{{more general|}}}
 +
  |* {{{more general}}}
 +
}}
 +
<big> {{{performance header|'''Performance'''}}} </big>
 
{{
 
{{
#if:{{{never exceed speed main|}}}
+
#if: {{{never exceed speed alt|}}}
  |* '''[[Vne|Never exceed speed]]:''' {{#if:{{{never exceed speed alt|}}}
+
  |* '''[[V speeds#Vne|Never exceed speed]]:''' {{{never exceed speed alt}}} {{#if:{{{never exceed speed alt|}}}
  |{{{never exceed speed alt|}}} ({{{never exceed speed main|}}})
+
  |({{{never exceed speed main}}}) {{{never exceed speed more|}}}
  |{{{never exceed speed main|}}}
+
}}
  }}
+
}}{{
}}{{
+
#if:{{{max speed alt|}}}
#if:{{{max speed main|}}}
+
  |* '''[[V speeds#Vno|Maximum speed]]:''' {{{max speed alt}}} {{
  |* '''[[Vno|Maximum speed]]:''' {{{max speed alt|}}} ({{{max speed main|}}}) {{{max speed more|}}}
+
#if:{{{max speed main|}}}
  }}{{
+
  |({{{max speed main}}}) {{{max speed more|}}}
#if:{{{cruise speed main|}}}
+
  }}
  |* '''[[V speeds|Cruise speed]]:''' {{{cruise speed alt|}}} ({{{cruise speed main|}}}) {{{cruise speed more|}}}
+
}}{{
  }}{{
+
#if:{{{cruise speed alt|}}}
#if:{{{stall speed main|}}}
+
  |* '''[[V speeds#Vc|Cruise speed]]:''' {{{cruise speed alt|}}} {{
  |* '''[[Stall speed]]:''' {{{stall speed alt|}}} ({{{stall speed main|}}}) {{{stall speed more|}}}
+
#if:{{{cruise speed main|}}}
  }}{{
+
  |({{{cruise speed main|}}}) {{{cruise speed more|}}}
 +
  }}
 +
}}{{
 +
#if: {{{stall speed main|}}}
 +
  |* '''[[Stall speed]]:''' {{{stall speed alt}}} ({{{stall speed main|}}}) {{{stall speed more|}}}
 +
}}{{
 +
#if: {{{minimum control speed main|}}}
 +
  |* '''[[V speeds#Vmc|Minimum controllable speed]]:''' {{{minimum control speed alt}}} ({{{minimum control speed main|}}}) {{{minimum control speed more|}}}
 +
}}{{
 +
#if:{{{range main|}}}
 +
|* '''[[Range (aircraft)|Range]]:''' {{{range alt}}} ({{{range main|}}}) {{{range more|}}}
 +
}}{{
 
#if:{{{combat radius main|}}}
 
#if:{{{combat radius main|}}}
  |* '''Combat radius:''' {{{combat radius alt|}}} ({{{combat radius main|}}}) {{{combat radius more|}}}
+
|* '''Combat radius:''' {{{combat radius alt}}} ({{{combat radius main|}}}) {{{combat radius more|}}}
  }}{{
+
}}{{
 +
#if:{{{combat range main|}}}
 +
  |*'''Combat range:''' {{{combat range alt}}} ({{{combat range main|}}}) {{{combat range more|}}}
 +
}}{{
 
#if:{{{ferry range main|}}}
 
#if:{{{ferry range main|}}}
  |* '''Ferry range:''' {{{ferry range alt|}}} ({{{ferry range main|}}}) {{{ferry range more|}}}
+
|* '''[[Ferry range]]:''' {{{ferry range alt}}} ({{{ferry range main|}}}) {{{ferry range more|}}}
}}{{
+
}}{{
#if:{{{range main|}}}
+
#if: {{{ceiling main|}}}
  |* '''[[Range (aircraft)|Range]]:''' {{{range alt|}}} ({{{range main|}}}) {{{range more|}}}
+
|* '''[[Ceiling (aeronautics)|Service ceiling]]:''' {{{ceiling alt}}} ({{{ceiling main|}}}) {{{ceiling more|}}}
}}{{
+
}}{{
#if:{{{ceiling main|}}}
+
#if: {{{climb rate main|}}}
  |* '''[[Service ceiling]]:''' {{{ceiling alt|}}} ({{{ceiling main|}}})
+
  |* '''[[Rate of climb]]:''' {{{climb rate alt}}} ({{{climb rate main|}}}) {{{climb rate more|}}}
}}{{
+
}}{{
#if:{{{climb rate main|}}}
+
#if: {{{loading main|}}}
  |* '''[[Rate of climb]]:''' {{{climb rate alt|}}} ({{{climb rate main|}}})
+
  |* '''{{#ifeq: {{{plane or copter?}}} |copter
}}{{
+
          |Disc loading
#ifeq:{{{plane or copter?}}}|copter
+
          |[[Wing loading]]
  |{{#if:{{{loading main|}}}|* '''Disc loading:''' {{{loading alt|}}} ({{{loading main|}}})}}
+
        }}:''' {{{loading alt}}} ({{{loading main|}}})
|{{#if:{{{loading main|}}}|* '''[[Wing loading]]:''' {{{loading alt|}}} ({{{loading main|}}})}}
+
}}{{
}}{{
+
#if:{{{lift to drag|}}}
#switch:{{{jet or prop?}}}
+
  |* '''[[Lift-to-drag ratio|lift-to-drag]]:''' {{{lift to drag}}}
  |jet={{#if:{{{afterburning thrust/weight|}}}
+
}}{{
   |* '''[[Thrust-to-weight ratio|Thrust/weight]]:'''
+
#if:{{{fuel consumption|}}}
** '''Dry:''' {{{thrust/weight|}}}
+
|* '''[[Fuel consumption]]:''' {{{fuel consumption}}}
** '''With afterburner:''' {{{afterburning thrust/weight|}}}
+
}}{{
   |{{#if:{{{thrust/weight|}}}
+
#switch: {{{jet or prop?}}}
   |* '''[[Thrust-to-weight ratio|Thrust/weight]]:''' {{{thrust/weight|}}}
+
  |jet={{ #if: {{{afterburning thrust/weight|}}}
  }}
+
   |* '''[[Thrust-to-weight ratio|Thrust/weight]]:'''{{
 +
   #if:{{{thrust/weight|}}}
 +
   |** '''Dry:''' {{{thrust/weight}}}
 
   }}
 
   }}
|prop={{#if:{{{power/mass main|}}}
+
** '''With afterburner:''' {{{afterburning thrust/weight}}}
  |* '''[[Power-to-weight ratio|Power/mass]]:''' {{{power/mass alt|}}} ({{{power/mass main|}}})
+
  |{{
 +
  #if:{{{thrust/weight|}}}
 +
  |* '''[[Thrust-to-weight ratio|Thrust/weight]]:''' {{{thrust/weight}}}
 
   }}
 
   }}
  |both={{#if:{{{power/mass main|}}}
+
}}
   |* '''[[Power-to-weight ratio|Power/mass]] (prop):''' {{{power/mass alt|}}} ({{{power/mass main|}}})
+
  |prop={{
  }}{{#if:{{{thrust/weight|}}}
+
#if:{{{power/mass main|}}}
   |* '''[[Thrust-to-weight ratio|Thrust/weight]] (jet):''' {{{thrust/weight|}}}
+
   |* '''[[Power-to-weight ratio|Power/mass]]:''' {{{power/mass alt}}} ({{{power/mass main|}}})
  }}
+
}}
|
+
|both={{
}}{{
+
#if:{{{power/mass main|}}}
#ifeq:{{{plane or copter?}}}|copter
+
   |* '''[[Power-to-weight ratio|Power/mass]] (prop):''' {{{power/mass alt}}} ({{{power/mass main|}}})
|{{#if:{{{max loading main|}}}|* '''Max disc loading:''' {{{max loading alt|}}} ({{{max loading main|}}})}}
 
|{{#if:{{{max loading main|}}}|* '''Max [[wing loading]]:''' {{{max loading alt|}}} ({{{max loading main|}}})}}
 
 
  }}{{
 
  }}{{
 +
#if:{{{thrust/weight|}}}
 +
  |* '''[[Thrust-to-weight ratio|Thrust/weight]] (jet):''' {{{thrust/weight}}}
 +
}}
 +
}}{{
 +
#if: {{{max loading main|}}}
 +
|* '''Max {{#ifeq: {{{plane or copter?}}} |copter
 +
              | disc loading
 +
              | [[wing loading]]
 +
            }}:''' {{{max loading alt}}} ({{{max loading main|}}})
 +
}}{{
 
#switch:{{{jet or prop?}}}
 
#switch:{{{jet or prop?}}}
 
  |jet={{#if:{{{max afterburning thrust/weight|}}}
 
  |jet={{#if:{{{max afterburning thrust/weight|}}}
   |* '''Max [[Thrust-to-weight ratio|thrust/weight]]:'''
+
   |* '''Minimum [[Thrust-to-weight ratio|thrust/weight]]:'''{{
** '''Dry:''' {{{max thrust/weight|}}}
+
  #if:{{{max thrust/weight|}}}
 +
  |** '''Dry:''' {{{max thrust/weight|}}}
 +
  }}
 
** '''With afterburner:''' {{{max afterburning thrust/weight|}}}
 
** '''With afterburner:''' {{{max afterburning thrust/weight|}}}
   |{{#if:{{{max thrust/weight|}}}
+
   |{{
  |* '''Max [[Thrust-to-weight ratio|thrust/weight]]:''' {{{max thrust/weight|}}}
+
   #if:{{{max thrust/weight|}}}
  }}
+
  |* '''Minimum [[Thrust-to-weight ratio|thrust/weight]]:''' {{{max thrust/weight}}}
   }}
 
|prop={{#if:{{{max power/mass main|}}}
 
  |* '''Max [[Power-to-weight ratio|power/mass]]:''' {{{max power/mass alt|}}} ({{{max power/mass main|}}})
 
  }}
 
|both={{#if:{{{max power/mass main|}}}
 
  |* '''Max [[Power-to-weight ratio|power/mass]] (prop):''' {{{max power/mass alt|}}} ({{{max power/mass main|}}})
 
  }}{{#if:{{{max thrust/weight|}}}
 
  |* '''Max [[Thrust-to-weight ratio|thrust/weight]] (jet):''' {{{max thrust/weight|}}}
 
 
   }}
 
   }}
|
 
 
  }}
 
  }}
{{{more performance|}}}
+
|prop={{
{{#if:{{{armament|}}}{{{guns|}}}{{{bombs|}}}{{{missiles|}}}{{{rockets|}}}
+
  #if:{{{max power/mass main|}}}
  |<h3>{{{armament header|Armament}}}<h3>
+
  |* '''Minimum [[Power-to-weight ratio|power/mass]]:''' {{{max power/mass alt}}} ({{{max power/mass main|}}})
{{{armament|{{#if:{{{guns|}}}{{{bombs|}}}{{{rockets|}}}{{{missiles|}}}
 
  |{{#if:{{{guns|}}}
 
    |* '''Guns:''' {{{guns}}}
 
    }}{{#if:{{{rockets|}}}
 
    |* '''Rockets:''' {{{rockets}}}
 
    }}{{#if:{{{missiles|}}}
 
    |* '''Missiles:''' {{{missiles}}}
 
    }}{{#if:{{{bombs|}}}
 
    |* '''Bombs:''' {{{bombs}}}
 
    }}
 
  }}
 
  }}}
 
 
  }}
 
  }}
{{#if:{{{avionics|}}}
+
|both={{
  |<h3>Avionics<h3>
+
#if:{{{max power/mass main|}}}
{{{avionics|}}}
+
  |* '''Minimum [[Power-to-weight ratio|power/mass]] (prop):''' {{{max power/mass alt}}} ({{{max power/mass main|}}})
 +
}}{{
 +
  #if:{{{max thrust/weight|}}}
 +
  |* '''Minimum [[Thrust-to-weight ratio|thrust/weight]] (jet):''' {{{max thrust/weight}}}
 
  }}
 
  }}
 +
|
 +
}}
 +
{{{more performance|}}}{{
 +
#if: {{{armament|}}}{{{guns|}}}{{{bombs|}}}{{{missiles|}}}{{{rockets|}}}{{{hardpoints|}}}
 +
|{{
 +
#if: {{{more performance|}}}
 +
  |</ul>
 +
}}<big>{{{armament header|</ul>'''Armament'''}}}</big><br/>
 +
{{{armament|{{
 +
  #if:{{{guns|}}}
 +
  |* '''Guns:''' {{{guns}}}
 +
  }}{{
 +
  #if:{{{hardpoints|}}}
 +
  |* '''Hardpoints:''' {{{hardpoints}}} {{#if:{{{hardpoint capacity|}}}
 +
    |with a capacity of {{{hardpoint capacity}}},
 +
  }}{{
 +
  #if:{{{hardpoint rockets|}}}{{{hardpoint missiles|}}}{{{hardpoint bombs|}}}{{{hardpoint other|}}}
 +
    |with provisions to carry combinations of:
 +
  }}{{
 +
  #if:{{{hardpoint rockets|}}}
 +
    |** '''Rockets:''' {{{hardpoint rockets}}}
 +
  }}{{
 +
  #if:{{{hardpoint missiles|}}}
 +
    |** '''Missiles:''' {{{hardpoint missiles}}}
 +
  }}{{
 +
  #if:{{{hardpoint bombs|}}}
 +
    |** '''Bombs:''' {{{hardpoint bombs}}}
 +
  }}{{{hardpoint other|}}}
 +
  }}{{
 +
  #if:{{{rockets|}}}
 +
  |* '''Rockets:''' {{{rockets}}}
 +
  }}{{
 +
  #if:{{{missiles|}}}
 +
  |* '''Missiles:''' {{{missiles}}}
 +
  }}{{
 +
  #if:{{{bombs|}}}
 +
  |* '''Bombs:''' {{{bombs}}}
 +
  }}{{{other armament|}}}
 +
  </ul>
 +
}}}
 +
}}{{
 +
#if: {{{avionics|}}}
 +
|{{
 +
#if: {{{more performance|}}}
 +
  |</ul>
 +
}}</ul>
 +
<big>{{{avionics header|'''Avionics'''}}}</big><br/>
 +
{{{avionics}}}
 +
}}<noinclude>
 +
{{template doc}}
 +
</noinclude>

Revision as of 20:28, 25 February 2009

General characteristics

Performance


Template documentation[create]