Jump to content

Module:Convert/extra

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Johnuniq (talk | contribs) at 02:01, 4 May 2021 (remove apparently unused units: scf2 + scfoot2 + g0-temp + mi/kWh). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

-- 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 = {
    ["100mi"] = {
	target   = "mi",
	multiplier= 100,
    },
    ["100miles"] = {
	target   = "mi",
	symbol   = "miles",
	multiplier= 100,
    },
    ["g-force"] = {
	name2    = "''g''",
	symbol   = "''g''",
	utype    = "acceleration",
	scale    = 9.80665,
	default  = "m/s2",
	link     = "g-force",
    },
    ["kpm"] = {
	name1    = "kilopond metre",
	name1_us = "kilopond meter",
	symbol   = "kp⋅m",
	utype    = "torque",
	scale    = 9.80665,
	default  = "Nm lbft",
	link     = "Kilogram metre (torque)",
    },
    ["miyd"] = {
	combination= { "yd", "mi" },
	multiple = { 1760 },
	utype    = "length",
    },
    ["ton-mile"] = {
	symbol   = "ton-mile",
	usename  = 1,
	utype    = "transportation",
	scale    = 1.4599723182105602,
	default  = "tkm",
    },
    ["tkm"] = {
	name1    = "tonne-kilometre",
	name1_us = "tonne-kilometer",
	symbol   = "tkm",
	utype    = "transportation",
	scale    = 1,
	default  = "ton-mile",
    },
    ["rpm"] = {
	name1    = "revolution per minute",
	name2    = "revolutions per minute",
	symbol   = "rpm",
	utype    = "length",
	scale    = 5.5594015866358675e-11,
	invert   = -1,
	iscomplex= true,
	default  = "Hz",
	link     = "Revolutions per minute",
    },
}

return { extra_units = extra_units }