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.
Rho_SL = 1013 -- hPa
Incr = 30 -- feet
MSL = 0 -- feet
local p = {}
function p.Altitude (frame)
local it = 0
output = "ft"
repeat
it = it + 1
MSL = MSL + Incr
output = MSL .. output .. "<br />"
until (MSL > 5000)
return 'Altitude' .. "<br />" .. output
end
return p