Module:User:Mr rnddude/Sandbox
Appearance
-- This is my module sandbox.
-- Simple repetition module.
-- At Sea level on an ISA day,
-- the pressure should be 1013.2 hPa.
-- I've reduced this to 1013 hPa. Up to
-- 5,000 feet the pressure reduces by 1
-- hPa per 30 feet. Beyond 5,000 feet
-- the rate of reduction decreases. Off
-- the top of my head I can't remember
-- what it is (1/27ft?), but, whatever.
P = 1013 -- hPa
Incr = 30 -- feet
MSL = 0 -- feet
local p = {}
function p.Altitude (frame)
output = "(Feet)"
repeat
MSL = MSL + Incr
P = P - 1
output = output .. "<br />" .. MSL .. ", " .. P
until (MSL > 5000 or P < 0)
return 'Altitude ' .. output .. ", " .. 'Pressure'
end
return p