2. adisalib

Download and install

Download the latest version as gzipped tarball and (for Linux) untar and install as root:

tar -xvzf adisalib-latest.tar.gz
cd adisalib<-x.y.z-yyyy-mm-dd>
sudo python setup.py install

Now the module can be used in python scripts by

import adisalib

The module has never been tested with Windows, but it should work.


ICAO Standard Atmosphere (ISA) - functions and routines

© Dietmar Thaler 2014-2016

Warning

adisalib calculates ISA only up to 32000 gpm!

Note

This module makes use of the numpy lybrary. NumPy is the fundamental package for scientific computing with Python. Make sure you have it installed. See http://www.numpy.org/ and http://sourceforge.net/projects/numpy/

Both Python 2.7 and Python >= 3.4 compatibility assured.

The core routines of the library are:

  • isa_pressure(height)
  • isa_density(height)
  • isa_temperature(height)
  • isa_height(pressure)
  • isa_QNH(barometer_altitude, pressure)
  • isa_QFE(barometer_altitude, arp_altitude, pressure)
  • isa_densityaltitude(density)
  • isa_table(h1,h2,dh)

Added are a couple of constants, variables and conversion routines (see below). A simple demo program that produces a matplotlib-graphic can be found at www.foehnwall.at/isa.html.


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License. If not, see <http://www.gnu.org/licenses/gpl.html> .


adisalib.Tice = 273.15

freezing point water under standard conditions in K

adisalib.c2k(tk)[source]

Converts temperature in Celsius to temperature in Kelvin

adisalib.celsius2kelvin(tc)[source]

Converts temperature in Celsius to temperature in Kelvin

adisalib.f2m(foot)[source]

Converts foot to meter

adisalib.foot2meter(foot)[source]

Converts foot to meter

adisalib.isa_GAMMA0 = 0.0065

ISA temperature gradient K/m from h=0 to h=11000 gpm

adisalib.isa_GAMMA2 = -0.001

ISA temperature gradient K/m from geopotential h=20000 to h=32000 m

adisalib.isa_M0 = 28.9664

ISA molar mass (kg / kmol)

adisalib.isa_QFE(barometer_altitude, arp_altitude, pressure)[source]

Returns QFE (pressure at aerodrome reference point arp) as function of:

barometer_altitude in gpm
arp_altitude in gpm
pressure … pressure reading at baromter_altitude in hPa
adisalib.isa_QNH(barometer_altitude, pressure)[source]

Returns QNH in hPa below 3200 gpm aas numpy array

barometer_altitude in gpm
pressure … barometer reading in hPa at barometer altitude as numpy array
adisalib.isa_R = 8314.32

ISA universal ideal gas constant [J/(kmol K)]

adisalib.isa_Rl = 287.03325231992926

ISA gas constant of dry air J/(kg K)

adisalib.isa_T0 = 288.15

ISA surface temperature (at z=0)

adisalib.isa_T1 = 216.64999999999998

ISA temperature between h = 11000 and h = 20000 gpm (tropopause)

adisalib.isa_T3 = 228.64999999999998

ISA temperature at h = 32000 gpm

adisalib.isa_T_error = -999.0

error value for ISA temperature

adisalib.isa_density(hh)[source]

Density in ISA below 32000 gpm

hh … altitude in gpm
isa_density … density kg/m**3 at level hh
adisalib.isa_densityaltitude(density)[source]

ISA-density altitude for a given air density

rho … actual air density
isa_densityaltitude … altitude where ISA-density equals rho (in gpam)
adisalib.isa_g0 = 9.80665

ISA standard gravity m/s^2

adisalib.isa_h1 = 11000.0

ISA tropopause geopot. altitude

adisalib.isa_h2 = 20000.0

ISA begin stratosphere altitude in gpm

adisalib.isa_h3 = 32000.0

ISA-stratosphere altitude in gpm

adisalib.isa_h_error = -9999.0

error value for ISA altitude

adisalib.isa_height(pressure)[source]

Height in ISA below 32000 gpm as function of pressure

pp … pressure in hPa
isa_height .. height in gpm
adisalib.isa_p0 = 1013.25

ISA surface pressur hPa

adisalib.isa_p1 = 226.2972158572153

ISA pressure at 11000 gpm (tropopause)

adisalib.isa_p2 = 54.737855915316608

ISA pressure at 20000 gpm (begin stratosphere)

adisalib.isa_p3 = 8.6773343930104669

ISA pressure at 32000 gpm (begin stratosphere)

adisalib.isa_p_error = -999.0

error value for ISA pressure

adisalib.isa_pressure(height)[source]

Pressure in ISA below 32000 gpm as function of height

hh … altiude in gpm
isa_pressure .. pressure at level hh in hPa
adisalib.isa_rho0 = 1.2250837424253853

ISA surface density kg/m^3

adisalib.isa_rho1 = 0.36390523694271565

ISA tropopause density kg/m^3

adisalib.isa_rho2 = 0.088023144037122733

ISA surface density kg/m^3

adisalib.isa_rho3 = 0.013221566577956929

ISA density kg/m^3 at h = 32000 m

adisalib.isa_rho_error = -999.0

error value for ISA density

adisalib.isa_table(h1=0, h2=32000, dh=500, csv=False)[source]

Prints a table with ISA-Data.

h1 and h2 … lower and upper vertical boundary in Meter
dh … vertical increment in Meter
csv … flag (locical)
True … the output is a CSV-formatted file with a semicolon ‘;’
as field separator and a dot ‘.’ as decimal separator.
False … Textfile
adisalib.isa_temperature(hh)[source]

Temperature of ISA-Standardatmosphere as function of altitude

z … altitude in gpm
isa_temperature … ISA temperature in K
adisalib.k2c(tk)[source]

Converts temperature in Kelvin to temperature in Ceslius

adisalib.kelvin2celsius(tk)[source]

Converts temperature in Kelvin to temperature in Ceslius

adisalib.m2f(meter)[source]

Converts meter to foot

adisalib.meter2foot(meter)[source]

Converts meter to foot