Difference between revisions of "Module:Convert/extra/sandbox"
< Module:Convert | extra
Jump to navigation
Jump to search
blackwiki>Johnuniq (move working units to main data, keeping those to be resolved from Module:Convert/extra) |
blackwiki>Johnuniq (tweak new units) |
||
| Line 36: | Line 36: | ||
symbol = "µm", | symbol = "µm", | ||
utype = "length", | utype = "length", | ||
| − | + | scale = 1e-6, | |
| − | scale = | ||
default = "dpi", | default = "dpi", | ||
| − | link = " | + | link = "Dots per inch", |
}, | }, | ||
["dpcm"] = { | ["dpcm"] = { | ||
| Line 50: | Line 49: | ||
scale = 1/0.01, | scale = 1/0.01, | ||
default = "dpi", | default = "dpi", | ||
| − | link = " | + | link = "Dots per inch", |
}, | }, | ||
["isp"] = { | ["isp"] = { | ||
| Line 57: | Line 56: | ||
symbol = "s", | symbol = "s", | ||
utype = "speed", | utype = "speed", | ||
| − | + | scale = 9.80665, | |
| − | scale = 9. | ||
default = "km/s", | default = "km/s", | ||
| − | link = " | + | link = "Specific impulse", |
}, | }, | ||
-- from F=ma, Ns/kg is equivalent to units of speed | -- from F=ma, Ns/kg is equivalent to units of speed | ||
| Line 69: | Line 67: | ||
symbol = "N-s/kg", | symbol = "N-s/kg", | ||
utype = "speed", | utype = "speed", | ||
| − | |||
scale = 1, | scale = 1, | ||
default = "isp", | default = "isp", | ||
| − | link = " | + | link = "Specific impulse", |
}, | }, | ||
["kNs/kg"] = { | ["kNs/kg"] = { | ||
| Line 79: | Line 76: | ||
symbol = "kN-s/kg", | symbol = "kN-s/kg", | ||
utype = "speed", | utype = "speed", | ||
| − | |||
scale = 1000, | scale = 1000, | ||
default = "isp", | default = "isp", | ||
| − | link = " | + | link = "Specific impulse", |
}, | }, | ||
-- units of inverse speed, because invert is negative | -- units of inverse speed, because invert is negative | ||
| Line 92: | Line 88: | ||
invert = -1, | invert = -1, | ||
iscomplex= true, | iscomplex= true, | ||
| − | scale = 1/101972/9. | + | scale = 1/101972/9.80665, |
default = "tsfc", | default = "tsfc", | ||
| − | link = " | + | link = "Thrust specific fuel consumption", |
}, | }, | ||
-- units of inverse speed, because invert is negative | -- units of inverse speed, because invert is negative | ||
| Line 104: | Line 100: | ||
invert = -1, | invert = -1, | ||
iscomplex= true, | iscomplex= true, | ||
| − | scale = 1/9. | + | scale = 1/9.80665/3600, |
| − | default = " | + | default = "si tsfc", |
| − | link = " | + | link = "Thrust specific fuel consumption", |
}, | }, | ||
} | } | ||
return { extra_units = extra_units } | return { extra_units = extra_units } | ||
Revision as of 11:27, 28 December 2013
Documentation for this module may be created at Module:Convert/extra/sandbox/doc
-- Extra conversion data used by Module:Convert.
--
-- [[Module:Convert/data]] defines all units and is transcluded in all pages
-- where [[Module:Convert]] is used. Testing new units by editing that module
-- would invalidate the cache for all affected pages.
--
-- For quick changes and experiments with new units, this module can be edited.
-- Since this module is transcluded in only a small number of pages, changes
-- should cause little server overhead and should propagate quickly.
--
-- If a unit is defined in the data module, any definition here is ignored,
-- so defining the same unit in both modules is not an error.
-- A unit defined here can refer to units that are also defined here, and
-- can refer to units defined in the data module.
--
-- Periodically, those extra units that are wanted permanently can be removed
-- from here after being added to [[Module:Convert/data]].
local extra_units = {
["dpi"] = {
name1 = "DPI",
name2 = "DPI",
symbol = "DPI",
utype = "length",
invert = -1,
iscomplex= true,
scale = 1/0.0254,
default = "pitch",
link = "Dots per inch",
},
-- the convention is that resolution appears as simply micrometers dimensionally
-- see Digital Photogrammetry: A Practical Course by Wilfried Linder
["pitch"] = {
name1 = "µm",
name2 = "µm",
symbol = "µm",
utype = "length",
scale = 1e-6,
default = "dpi",
link = "Dots per inch",
},
["dpcm"] = {
name1 = "dot/cm",
name2 = "dot/cm",
symbol = "dot/cm",
utype = "length",
invert = -1,
iscomplex= true,
scale = 1/0.01,
default = "dpi",
link = "Dots per inch",
},
["isp"] = {
name1 = "second",
name2 = "seconds";
symbol = "s",
utype = "speed",
scale = 9.80665,
default = "km/s",
link = "Specific impulse",
},
-- from F=ma, Ns/kg is equivalent to units of speed
-- which is fortunate because convert couldn't handle it otherwise
["Ns/kg"] = {
name1 = "N-s/kg",
name2 = "N-s/kg";
symbol = "N-s/kg",
utype = "speed",
scale = 1,
default = "isp",
link = "Specific impulse",
},
["kNs/kg"] = {
name1 = "kN-s/kg",
name2 = "kN-s/kg";
symbol = "kN-s/kg",
utype = "speed",
scale = 1000,
default = "isp",
link = "Specific impulse",
},
-- units of inverse speed, because invert is negative
["si tsfc"] = {
name1 = "g/(kN·s)",
name2 = "g/(kN·s)",
symbol = "g/(kN·s)",
utype = "speed",
invert = -1,
iscomplex= true,
scale = 1/101972/9.80665,
default = "tsfc",
link = "Thrust specific fuel consumption",
},
-- units of inverse speed, because invert is negative
["tsfc"] = {
name1 = "lb/(lbf·h)",
name2 = "lb/(lbf·h)",
symbol = "lb/(lbf·h)",
utype = "speed",
invert = -1,
iscomplex= true,
scale = 1/9.80665/3600,
default = "si tsfc",
link = "Thrust specific fuel consumption",
},
}
return { extra_units = extra_units }