Difference between revisions of "Template:Cospar"

From blackwiki
Jump to navigation Jump to search
imported>GreenC
(URL change)
imported>Paine Ellsworth
(per edit request on talk page)
 
Line 1: Line 1:
{{#if:{{{id|{{{1|}}}}}}|{{nowrap|1=[https://nssdc.gsfc.nasa.gov/nmc/spacecraft/display.action?id={{{id|{{{1|}}}}}} {{{name|{{{2|{{{id|{{{1|}}}}}}}}}}}}]}}}}<noinclude>
+
{{#if:{{{id|{{{1|}}}}}}|{{nowrap|1=[https://nssdc.gsfc.nasa.gov/nmc/spacecraft/display.action?id={{{id|{{{1|}}}}}} {{{name|{{{2|{{{id|{{{1|}}}}}}}}}}}}]}} {{#if: {{{noval|}}}
 
+
|
 +
|{{#ifeq: {{str index|{{{id|{{{1|}}}}}}|5}}|-
 +
|{{#ifexpr:
 +
    1957 <= {{trunc|{{{id|{{{1|}}}}}}|4}}
 +
    and {{trunc|{{{id|{{{1|}}}}}}|4}} <= {{CURRENTYEAR}}
 +
    |
 +
    |{{error-small|COSPAR ID year must be between 1957 and {{CURRENTYEAR}}}}{{#if: {{{demo|}}}||[[Category:Pages with COSPAR ID errors]]}}
 +
    }}
 +
  {{#ifexpr:
 +
    ({{str number|{{str sub new|{{{id|{{{1|}}}}}}|6}}}} = 3)
 +
    and (0 < {{str letter|{{str sub new|{{{id|{{{1|}}}}}}|9}}}})
 +
    and ({{str letter|{{str sub new|{{{id|{{{1|}}}}}}|9}}}} <= 3)
 +
    |
 +
    |{{error-small|COSPAR ID does not match expected format}}{{#if: {{{demo|}}}||[[Category:Pages with COSPAR ID errors]]}}
 +
    }}
 +
  |<!--skip validation in case of TLE format-->
 +
}}
 +
}}}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
[[Category:Spaceflight templates]]
 
 
 
</noinclude>
 
</noinclude>

Latest revision as of 14:42, 9 April 2020

Template documentation[view] [edit] [history] [purge]

Usage

{{Cospar |id= |name= }}

Used to display an International Designator (also known as COSPAR ID or NSSDCA id) with a link to the corresponding NASA Space Science Data Coordinated Archive catalog entry.

{{Cospar|1990-037B}}1990-037B

{{Cospar|1990-037B|Hubble Space Telescope}}Hubble Space Telescope

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Cospar

Displays an International Designator (also known as COSPAR ID or NSSDCA id) with a link to the corresponding NASA Space Science Data Coordinated Archive catalog entry.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
IDid 1

International Designator for a man-made object in space

Example
1990-037B
Stringrequired
Namename 2

Name to display instead of the ID

Example
Hubble Space Telescope
Linesuggested