Module:Sandbox/Chlod/Storm units

local ConvertData = require("Module:Convert/data")

local unitsDefault = { distance = "km", speed = "kn" -- knots } local unitsOut = { atl = { distance = "mi", speed = "mph", speed2 = "km/h" },	["#default"] = { distance = "km", speed = "km/h", speed2 = "mph" } } unitsOut["epac"] = unitsOut["atl"]

local p = {}

function p._distance -- test if starts with number -- test if the number is the entire string (trimmed) -- return automatic conversion (input unit is default) and output based on basin -- extract string -- check if in format " " or "  " -- check if is a unit with ConvertData -- take written unit as input unit and output based on basin -- else -- raw output (might not be parsable) end

return p