This is part of the HicEst documentation
BarometricFormula: Shows FUNCTION, AXIS, LINE, ALARM
Air pressure as a FUNCTION of height over sea level and temperature. AXIS plots (h,p) axes. LINE plots pressure vs height for different temperatures..
⇾Home
⇾Contents
⇾more General
⇾ Examples
Estimate how air pressure depends on height over sea level and on temperature
FUNCTION
pressure(meter, centigrade) returns air pressure in hectopascal
AXIS
initializes a pressure-height graph
LINE
plots pressure vs height for 5 (blue) and 30 (red) degrees centigrade
ALARM
waits for a user interaction to keep the graph drawn on the script window
! no declarations needed for numeric variables
pressure(800, 15)
! gas pressure at 800m and 15C in hPa or mbar
920.7786
mbarPerMeter = pressure(800,15) - pressure(801,15)
! nice to remember
0.11115
mbarPerDegree = pressure(800,16) - pressure(800,15)
! amazing, isn't it?
0.307579
AXIS
(MiN=0, MaX=1000, Y, MiN=890, Max=1013, Title="height", Y, Title="pressure")
!
how to graph a coordinate system
LINE
(X=h, Y=pressure(h, 5), Color=9, Points=100)
!
how to draw lines to a graph
LINE
(X=h, Y=pressure(h,30), Color=12, Points=100)
!
⇾ colors
ALARM
(1)
! wait for keyboard or mouse activity !
how to delay wait quit
END
! terminate this "main" program
FUNCTION
pressure(meters, centigrade)
! in hectopascal hPa or mbar or mb
how to define a function procedure
pressure = 1013.25*(1 - 0.0065 * meters/(centigrade + 273.15))^5.255
END
! terminate this function (required)
⇾
Support HicEst
⇾
Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.