DCS func getTemperatureAndPressure

From DCS World Wiki - Hoggitworld.com

Scripting Root

Envrioment: Mission Scripting
Function: getTemperatureAndPressure Added with: 1.5.6/2.0.6
Member Of: atmosphere
Syntax: number, number atmosphere.getTemperatureAndPressure(table vec3 )
Description: Returns the temperature and pressure at a given point in 3d space.

Temperature is returned in Kelvins Pressure is returned in Pascals

Return Value: number, number
Return Example: Temp: 293.15. Pressure: 101325
Examples: With a default 20*C and QNH 760 the temperature and pressure of a point at sea level will be Temp: 293.15. Pressure: 101325

The following will get the temperature and pressure value from 0 meters to 10000 in 1000 meter increments.

local pos = trigger.misc.getZone('posit').point
for i = 0, 10 do
local coord = pos
pos.y = (i * 1000)
local t, p = atmosphere.getTemperatureAndPressure(coord)

Related Functions: atmospherefunctions: getWind, getWindWithTurbulence, getTemperatureAndPressure