Jump to content

Module:User:Mr rnddude/Sandbox

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr rnddude (talk | contribs) at 14:38, 19 April 2017 (Try it differently). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- 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)
	repeat
		Altitude = MSL + Incr
		output = 'Altitude' .. "<br />" .. Altitude
	until (Altitude > 30)
end

return p