Template:Infobox firearm cartridge: Difference between revisions
mNo edit summary |
add optional rounding and use convert directly to reduce complexity |
||
Line 83: | Line 83: | ||
{{#if:{{{bullet|}}}| |
{{#if:{{{bullet|}}}| |
||
! style="padding-right: 1em;" {{!}} [[Bullet]] diameter |
! style="padding-right: 1em;" {{!}} [[Bullet]] diameter |
||
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{ |
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{convert|{{{bullet}}}|mm|in|abbr=on}}|{{convert|{{{bullet}}}|in|mm|abbr=on}}}} |
||
}} |
}} |
||
|- |
|- |
||
{{#if:{{{neck|}}}| |
{{#if:{{{neck|}}}| |
||
! style="padding-right: 1em;" {{!}} Neck diameter |
! style="padding-right: 1em;" {{!}} Neck diameter |
||
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{ |
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{convert|{{{neck}}}|mm|in|abbr=on}}|{{convert|{{{neck}}}|in|mm|abbr=on}}}} |
||
}} |
}} |
||
|- |
|- |
||
{{#if:{{{shoulder|}}}| |
{{#if:{{{shoulder|}}}| |
||
! style="padding-right: 1em;" {{!}} Shoulder diameter |
! style="padding-right: 1em;" {{!}} Shoulder diameter |
||
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{ |
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{convert|{{{shoulder}}}|mm|in|abbr=on}}|{{convert|{{{shoulder}}}|in|mm|abbr=on}}}} |
||
}} |
}} |
||
|- |
|- |
||
{{#if:{{{base|}}}| |
{{#if:{{{base|}}}| |
||
! style="padding-right: 1em;" {{!}} Base diameter |
! style="padding-right: 1em;" {{!}} Base diameter |
||
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{ |
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{convert|{{{base}}}|mm|in|abbr=on}}|{{convert|{{{base}}}|in|mm|abbr=on}}}} |
||
}} |
}} |
||
|- |
|- |
||
{{#if:{{{rim_dia|}}}| |
{{#if:{{{rim_dia|}}}| |
||
! style="padding-right: 1em;" {{!}} Rim diameter |
! style="padding-right: 1em;" {{!}} Rim diameter |
||
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{ |
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{convert|{{{rim_dia}}}|mm|in|abbr=on}}|{{convert|{{{rim_dia}}}|in|mm|abbr=on}}}} |
||
}} |
}} |
||
|- |
|- |
||
{{#if:{{{rim_thick|}}}| |
{{#if:{{{rim_thick|}}}| |
||
! style="padding-right: 1em;" {{!}} Rim thickness |
! style="padding-right: 1em;" {{!}} Rim thickness |
||
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{ |
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{convert|{{{rim_thick}}}|mm|in|abbr=on}}|{{convert|{{{rim_thick}}}|in|mm|abbr=on}}}} |
||
}} |
}} |
||
|- |
|- |
||
{{#if:{{{case_length|}}}| |
{{#if:{{{case_length|}}}| |
||
! style="padding-right: 1em;" {{!}} Case length |
! style="padding-right: 1em;" {{!}} Case length |
||
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{ |
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{convert|{{{case_length}}}|mm|in|abbr=on}}|{{convert|{{{case_length}}}|in|mm|abbr=on}}}} |
||
}} |
}} |
||
|- |
|- |
||
{{#if:{{{length|}}}| |
{{#if:{{{length|}}}| |
||
! style="padding-right: 1em;" {{!}} Overall length |
! style="padding-right: 1em;" {{!}} Overall length |
||
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{ |
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{convert|{{{length}}}|mm|in|abbr=on}}|{{convert|{{{length}}}|in|mm|abbr=on}}}} |
||
}} |
}} |
||
|- |
|- |
||
Line 138: | Line 138: | ||
{{#if:{{{max_pressure|}}}| |
{{#if:{{{max_pressure|}}}| |
||
! style="padding-right: 1em;" {{!}} Maximum pressure |
! style="padding-right: 1em;" {{!}} Maximum pressure |
||
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{ |
{{!}} colspan="2" {{!}} {{#ifeq:{{{is_SI_specs|}}}|yes|{{convert|{{{max_pressure}}}|MPa|psi|abbr=on}}|{{convert|{{{max_pressure}}}|psi|MPa|abbr=on}}}} |
||
}} |
}} |
||
|- |
|- |
||
Line 174: | Line 174: | ||
{{!}}- |
{{!}}- |
||
{{#if:{{{bw1|}}}| |
{{#if:{{{bw1|}}}| |
||
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw1|}}}|bwunit={{{bwunit|}}}|btypex={{{btype1|}}}|velx={{{vel1|}}}|enx={{{en1|}}}|isnotlast={{{bw2}}}{{{bw3}}}{{{bw4}}}{{{bw5}}}{{{test_barrel_length}}}{{{balsrc}}}}} |
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw1|}}}|bwunit={{{bwunit|}}}|bwround={{{bwround1|0}}}|btypex={{{btype1|}}}|velx={{{vel1|}}}|enx={{{en1|}}}|isnotlast={{{bw2}}}{{{bw3}}}{{{bw4}}}{{{bw5}}}{{{test_barrel_length}}}{{{balsrc}}}}} |
||
}} |
}} |
||
{{!}}- |
{{!}}- |
||
{{#if:{{{bw2|}}}| |
{{#if:{{{bw2|}}}| |
||
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw2|}}}|bwunit={{{bwunit|}}}|btypex={{{btype2|}}}|velx={{{vel2|}}}|enx={{{en2|}}}|isnotlast={{{bw3}}}{{{bw4}}}{{{bw5}}}{{{test_barrel_length}}}{{{balsrc}}}}} |
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw2|}}}|bwunit={{{bwunit|}}}|bwround={{{bwround2|0}}}|btypex={{{btype2|}}}|velx={{{vel2|}}}|enx={{{en2|}}}|isnotlast={{{bw3}}}{{{bw4}}}{{{bw5}}}{{{test_barrel_length}}}{{{balsrc}}}}} |
||
}} |
}} |
||
{{!}}- |
{{!}}- |
||
{{#if:{{{bw3|}}}| |
{{#if:{{{bw3|}}}| |
||
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw3|}}}|bwunit={{{bwunit|}}}|btypex={{{btype3|}}}|velx={{{vel3|}}}|enx={{{en3|}}}|isnotlast={{{bw4}}}{{{bw5}}}{{{test_barrel_length}}}{{{balsrc}}}}} |
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw3|}}}|bwunit={{{bwunit|}}}|bwround={{{bwround3|0}}}|btypex={{{btype3|}}}|velx={{{vel3|}}}|enx={{{en3|}}}|isnotlast={{{bw4}}}{{{bw5}}}{{{test_barrel_length}}}{{{balsrc}}}}} |
||
}} |
}} |
||
{{!}}- |
{{!}}- |
||
{{#if:{{{bw4|}}}| |
{{#if:{{{bw4|}}}| |
||
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw4|}}}|bwunit={{{bwunit|}}}|btypex={{{btype4|}}}|velx={{{vel4|}}}|enx={{{en4|}}}|isnotlast={{{bw5}}}{{{test_barrel_length}}}{{{balsrc}}}}} |
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw4|}}}|bwunit={{{bwunit|}}}|bwround={{{bwround4|0}}}|btypex={{{btype4|}}}|velx={{{vel4|}}}|enx={{{en4|}}}|isnotlast={{{bw5}}}{{{test_barrel_length}}}{{{balsrc}}}}} |
||
}} |
}} |
||
{{!}}- |
{{!}}- |
||
{{#if:{{{bw5|}}}| |
{{#if:{{{bw5|}}}| |
||
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw5|}}}|bwunit={{{bwunit|}}}|btypex={{{btype5|}}}|velx={{{vel5|}}}|enx={{{en5|}}}|isnotlast={{{test_barrel_length|}}}{{{balsrc|}}}}} |
{{Infobox firearm cartridge/Ballistics|is_SI_ballistics={{{is_SI_ballistics|}}}|bwx={{{bw5|}}}|bwunit={{{bwunit|}}}|bwround={{{bwround5|0}}}|btypex={{{btype5|}}}|velx={{{vel5|}}}|enx={{{en5|}}}|isnotlast={{{test_barrel_length|}}}{{{balsrc|}}}}} |
||
}} |
}} |
||
{{!}}- |
{{!}}- |
Revision as of 23:31, 27 November 2012
This template uses Lua: |
Usage
Firearm cartridge infobox
A firearm cartridge infobox may be used to summarize information about a particular cartridge or artillery shell. The infobox should be added using the {{Infobox firearm cartridge}}
template, as shown below:
{{{name}}} | ||
---|---|---|
{{{image}}} {{{caption}}} | ||
Type | {{{type}}} | |
Place of origin | {{{origin}}} | |
Service history | ||
In service | {{{service}}} | |
Used by | {{{used_by}}} | |
Wars | {{{wars}}} | |
Production history | ||
Designer | {{{designer}}} | |
Designed | {{{design_date}}} | |
Manufacturer | {{{manufacturer}}} | |
Produced | {{{production_date}}} | |
Number built | {{{number}}} | |
Variants | {{{variants}}} | |
Specifications | ||
Parent case | {{{parent}}} | |
Case type | {{{case_type}}} | |
Bullet diameter | [convert: invalid number] | |
Neck diameter | [convert: invalid number] | |
Shoulder diameter | [convert: invalid number] | |
Base diameter | [convert: invalid number] | |
Rim diameter | [convert: invalid number] | |
Rim thickness | [convert: invalid number] | |
Case length | [convert: invalid number] | |
Overall length | [convert: invalid number] | |
Case capacity | {{{case_capacity}}} gr H2O (Expression error: Unrecognized punctuation character "&". cm³) | |
Rifling twist | {{{rifling}}} | |
Primer type | {{{primer}}} | |
Maximum pressure | [convert: invalid number] | |
Maximum CUP | {{{max_cup}}} CUP | |
Filling | {{{filling}}} | |
Filling weight | {{{filling_weight}}} | |
Detonation mechanism |
{{{detonation}}} | |
Blast yield | {{{yield}}} | |
Ballistic performance | ||
Bullet weight/type | Velocity | Energy |
Test barrel length: {{{test_barrel_length}}} Source(s): {{{balsrc}}} |
{{Infobox firearm cartridge
| name =
| image =
| alt =
| caption =
| type =
| origin =
<!-- Service history -->
| service =
| used_by =
| wars =
<!-- Production history -->
| designer =
| design_date =
| manufacturer =
| production_date =
| number =
| variants =
<!-- Specifications -->
| is_SI_specs =
| parent =
| case_type =
| bullet =
| bullet_ref =
| land =
| land_ref =
| neck =
| neck_ref =
| shoulder =
| shoulder_ref =
| base =
| base_ref =
| rim_dia =
| rim_dia_ref =
| rim_thick =
| rim_thick_ref =
| case_length =
| case_length_ref =
| length =
| length_ref =
| case_capacity =
| case_capacity_ref =
| rifling =
| primer =
| max_pressure =
| max_pressure_ref =
| pressure_method =
| max_pressure2 =
| max_pressure2_ref =
| pressure_method2 =
| max_pressure3 =
| max_pressure3_ref =
| pressure_method3 =
| max_cup =
| max_cup_ref =
| filling =
| filling_weight =
| detonation =
| yield =
<!-- Ballistic performance -->
| is_SI_ballistics =
| bwunit =
| bw1 =
| btype1 =
| vel1 =
| en1 =
| bw2 =
| btype2 =
| vel2 =
| en2 =
| bw3 =
| btype3 =
| vel3 =
| en3 =
| bw4 =
| btype4 =
| vel4 =
| en4 =
| bw5 =
| btype5 =
| vel5 =
| en5 =
| test_barrel_length =
| balsrc =
}}
Parameters
Note: When using parameters, avoid the ambiguous abbreviation "N/A", and instead use "unknown" or "none". All subjective or qualitative judgements and numerical quantities or statistics must be cited to a reliable source (see WP:MILMOS#CITE). References for numerically converted parameters (e.g., |bullet=
) can be appended using the corresponding ref
parameter (e.g., |bullet_ref=
). Sources for the ballistic performance table, and more general sources, can be included using the |balsrc=
parameter.
General parameters:
- name – the formal name of the cartridge.
- image – optional – an image of the cartridge, should be given in the form
Example.jpg
. - image_size – optional – width of image, should be given in the form
300px
. - alt – optional – alternative text describing the image for visually impaired users, see WP:ALT.
- caption – optional – the text to be placed below the image.
- type – the type of cartridge or its designed use (e.g. "Pistol", "Rifle", "Hunting", etc.).
- origin – the country or place where the cartridgeoriginated or was first manufactured.
Service history parameters:
- service – optional – the period (usually given in years) when the cartridge was in service.
- used_by – optional – the countries, armed forces, or other groups using the cartridge; this may be omitted for cartridges employed only in their country of origin.
- wars – optional – any wars during which the cartridge saw service.
Production history parameters:
- designer – optional – the person or group responsible for designing the cartridge.
- design_date – optional – the date (usually given as a year) when the cartridge was designed.
- manufacturer – optional – the manufacturer of the cartridge.
- production_date – optional – the period (usually given in years) when the cartridge was produced.
- number – optional – the number of cartridge of this type that were manufactured.
- variants – optional – any variant models of the cartridge.
Specification parameters:
- is_SI_specs – optional – "yes" if the specifications are entered in SI units; any other value causes it to be interpreted as English units.
- parent – optional – the cartridge that the cartridge was based on, if any.
- case_type – optional – the type of case used for the cartridge (e.g. rimmed, rimless, straight, bottlenecked, etc.).
- bullet – optional – the diameter of the bullet used in the cartridge, expressed in mm or in; only include the number, and not the units of measurement, and omit any commas.
- land – optional – the land diameter of the rifling in the barrel, expressed in mm or in; only include the number, and not the units of measurement, and omit any commas.
- neck – optional – the neck diameter of the cartridge, expressed in mm or in; only include the number, and not the units of measurement, and omit any commas.
- shoulder – optional – the shoulder diameter of the cartridge, if any, expressed in mm or in; only include the number, and not the units of measurement, and omit any commas.
- base – optional – the base diameter of the cartridge, expressed in mm or in; only include the number, and not the units of measurement, and omit any commas.
- rim_dia – optional – the rim diamter of the cartridge, expressed in mm or in; only include the number, and not the units of measurement, and omit any commas.
- rim_thick – optional – the rim thickness of the cartridge, expressed in mm or in; only include the number, and not the units of measurement, and omit any commas.
- case_length – optional – the case length of the cartridge, expressed in mm or in; only include the number, and not the units of measurement, and omit any commas.
- length – optional – the overall length of the cartridge, expressed in mm or in; only include the number, and not the units of measurement, and omit any commas.
- case_capacity – optional – the volume of the casing, expressed in cm3 or grains of water; only include the number, and not the units of measurement, and omit any commas.
- rifling – optional – typical rifling to stabilize the bullet fired from the cartridge.
- primer – optional – the type of primer used in the cartridge (e.g. large pistol, small rifle, rimfire, etc.).
- max_pressure – optional – the maximum chamber pressure of the round, expressed in MPa or psi; only include the number, and not the units of measurement, and omit any commas.
- pressure_method – optional – the methodology used to measure pressure, such as SAAMI, CIP, EPVAT, SCATP.
- max_pressure2 – optional as above, second pressure with method
- pressure_method2 – optional as above, second pressure's method
- max_pressure3 – optional as above, third pressure with method
- pressure_method2 – optional as above, third pressure's method
- max_cup – optional – the maximum chamber pressure of the round, expressed in CUP; only include the number, and not the units of measurement, and omit any commas. Note that this parameter is not affected by the is_SI_specs parameter.
- filling – optional – the explosive filling material of the shell, if any.
- filling_weight – optional – the weight of the explosive material of the shell, if any.
- detonation – optional – for explosive shells, the detonation trigger type (e.g. "timer", "pressure", "motion sensor").
- yield – optional – for explosive shells, the yield (in tons of TNT) of the device.
Ballistic performance parameters:
Ballistic data for up to five different weight bullets can be specified; it may be provided in either SI or English units, but this choice must be consistent for all five sets. The x in the field name should be replaced with 1–5 as displayed in the template format shown above (e.g. bw1, bw2, btype1, btype2, vel1, vel2, en1, en2, etc.):
- is_SI_ballistics – optional – "yes" if the energy and velocity ballistics data is entered in SI units; any other value causes it to be interpreted as English units.
- bwunit – optional – "gram" if the weights are given in grams; any other value causes them to be interpreted as grains.
- bwround – optional – specify the number of digits after the decimal point in the converted weight (the default is 0 if not specified; if specified but empty, defaults to the same default as convert).
- bwx – optional – the weight of the bullet for given data, expressed in grams or grains; only include the number, and not the units of measurement.
- btypex – optional – the type of bullet (e.g. JHP, FMJ, BHP, etc.).
- velx – required if bw field is specified – velocity of the bullet at the muzzle, expressed in m/s or ft/s; only include the number, and not the units of measurement, and omit any commas.
- enx – required if bw field is specified – energy of the bullet at the muzzle, expressed in J or ft·lbf; only include the number, and not the units of measurement, and omit any commas.
- test_barrel_length – optional – the length of the barrel used when generating the ballistics data.
- balsrc – optional – the source from which the ballistics data was obtained.
Example
.357 SIG | ||
---|---|---|
9mm 7,62mm 357sig 10mm 45SW 45GAP 50AE 002.jpg Comparison to other cartridges. .357 SIG third from left. | ||
Type | Pistol | |
Place of origin | United States | |
Production history | ||
Designer | SIGARMS/Federal Cartridge Co. | |
Designed | 1994 | |
Specifications | ||
Case type | Rimless, bottleneck | |
Bullet diameter | .355 in (9.0 mm) | |
Neck diameter | .381 in (9.7 mm) | |
Shoulder diameter | .424 in (10.8 mm) | |
Base diameter | .424 in (10.8 mm) | |
Rim diameter | .424 in (10.8 mm) | |
Rim thickness | .055 in (1.4 mm) | |
Case length | .865 in (22.0 mm) | |
Overall length | 1.14 in (29 mm) | |
Primer type | Small pistol | |
Ballistic performance | ||
Bullet weight/type | Velocity | Energy |
Test barrel length: 4 in Source(s): Steve's 357 SIG Ballistic Page |
{{Infobox firearm cartridge
| name = .357 SIG
| image = 9mm 7,62mm 357sig 10mm 45SW 45GAP 50AE 002.jpg
| image_size = 300px
| caption = Comparison to other cartridges. .357 SIG third from left.
| type = Pistol
| origin = [[United States]]
| designer = [[SIGARMS]]/[[Federal Cartridge Company|Federal Cartridge Co.]]
| design_date = 1994
| parent =
| case_type = Rimless, bottleneck
| bullet = .355
| land = .343
| neck = .381
| shoulder = .424
| base = .424
| rim_dia = .424
| rim_thick = .055
| case_length = .865
| length = 1.14
| rifling =
| primer = Small pistol
| bw1 = 115
| btype1 = [[Hollow point bullet|BHP]]
| vel1 = 1564
| en1 = 624
| bw2 = 124
| btype2 = [[Hollow point bullet|JHP]]
| vel2 = 1329
| en2 = 486
| bw3 = 125
| btype3 = JHP
| vel3 = 1299
| en3 = 468
| bw4 = 147
| btype4 = JHP
| vel4 = 1186
| en4 = 459
| bw5 = 150
| btype5 = JHP
| vel5 = 1130
| en5 = 425
| test_barrel_length = 4 in
| balsrc = [http://stevespages.com/page8f357sig.html Steve's 357 SIG Ballistic Page]
}}
Microformat
If the product has a URL, use {{URL}} to include it.
- Classes used
The HTML classes of this microformat include:
- brand
- category
- description
- fn
- hproduct
- identifier
- listing
- photo
- price
- review
- type
- url
- value
nor collapse nested elements which use them.