Atmosphere¶
A Structure closely tied to Body
. A variable of type Atmosphere
contains information about the atmosphere (or lack of atmosphere) of a celestial body.
A Atmosphere
is usually is obtained by the :ATM
suffix of a Body
.
A Atmosphere
can also be obtained by using the following function:
- BODYATMOSPHERE(name)¶
Passing in a string (name
) parameter, this function returns the
ATM
of the body that has that name. It’s identical
to calling BODY(name):ATM
, but accomplishes the goal in fewer steps.
It will crash with an error if no such body is found in the game.
Structure¶
ALL The following values are read-only. You can’t change the value of a body’s atmosphere.
- structure Atmosphere¶
Suffix
Type
Description
Name of the celestial body
True if this body has an atmosphere
True if oxygen is present
SCALE
(DEPRECATED)Used to find atmospheric density
Scalar
(atm)pressure at sea level
Scalar
(atm)pressure at the givel altitude
Scalar
(m)advertised atmospheric height
Scalar
(kg/mol)The molecular mass of the atmosphere’s gas
The Adiabatic index of the atmosphere’s gas
Short alias for
ADIABATICINDEX
Estimate of temperature at the given altitude.
Short alias for
ALTITUDETEMPERATURE
- Atmosphere:BODY¶
- Type
- Access
Get only
The Body that this atmosphere is around - as a STRING NAME, not a Body object.
- Atmosphere:EXISTS¶
- Type
- Access
Get only
True if this atmosphere is “real” and not just a dummy placeholder.
- Atmosphere:OXYGEN¶
- Type
- Access
Get only
True if the air has oxygen and could therefore be used by a jet engine’s intake.
- Atmosphere:SEALEVELPRESSURE¶
- Type
Scalar
(atm)- Access
Get only
Pressure at the body’s sea level.
Result is returned in Atmospheres. 1.0 Atmosphere = same as Kerbin or Earth. If you prefer to see the answer in KiloPascals, multiply the answer by
Constant:AtmToKPa
.Warning
Changed in version 1.1.0: Previous versions returned this value in KiloPascals by mistake, which has now been changed to Atmospheres.
- Atmosphere:ALTITUDEPRESSURE(altitude)¶
- Parameters
altitude – The altitude above sea level (in meters) you want to know the pressure for.
- Return type
Scalar
(atm)
Number of Atm’s of atmospheric pressure at the given altitude. If you pass in zero, you should get the sea level pressure. If you pass in 10000, you get the pressure at altitude=10,000m. This will return zero if the body has no atmosphere, or if the altitude you pass in is above the max atmosphere altitude for the body.
Result is returned in Atmospheres. 1.0 Atmosphere = same as Kerbin or Earth. If you prefer to see the answer in KiloPascals, multiply the answer by
Constant:AtmToKPa
.
- Atmosphere:HEIGHT¶
- Type
Scalar
(m)- Access
Get only
The altitude at which the atmosphere is “officially” advertised as ending. (actual ending value differs, see below).
- Atmosphere:MOLARMASS¶
- Type
- Acces
Get only
The Molecular Mass of the gas the atmosphere is composed of. Units are in kg/mol. Wikipedia Molar Mass Explanation.
- Atmosphere:ADIABATICINDEX¶
- Type
- Access
Get only
The Adiabatic index of the gas the atmosphere is composed of. Wikipedia Adiabatic Index Explanation.
- Atmosphere:ALTITUDETEMPERATURE(altitude)¶
- Parameter
altitude (
Scalar
) the altitude to query temperature at.- Access
Get only
Returns an approximate atmosphere temperature on this world at the given altitude. Note that this is only approximate because the temperature will vary depending on the sun position in the sky (i.e. your latitude and what time of day it is).
- Atmosphere:ALTTEMP(altitude)¶
A shorthand alias for :meth:ALTITUDETEMPERATURE(altitude).