Difference between revisions of "DCS func getWind"

From DCS World Wiki - Hoggitworld.com
Line 37: Line 37:
 
[[DCS_singleton_atmosphere|'''atmospherefunctions:''']] {{listOfAtmoFuncs}}
 
[[DCS_singleton_atmosphere|'''atmospherefunctions:''']] {{listOfAtmoFuncs}}
  
|examples=  
+
|examples=   The following stores the wind values at an interval of 500m starting at 0 ASL over a given point.
 +
 
 +
    local point = trigger.misc.getZone('z').point
 +
    local windOverPoint = {}
 +
    for i = 0, 20 do
 +
        point.y = i * 500
 +
        windOverPoint[i+1] = atmosphere.getWind(point )
 +
    end
  
 
|notes= Returns wind values of 0 when the point is below or directly on ground level.
 
|notes= Returns wind values of 0 when the point is below or directly on ground level.
 
}}
 
}}
 
[[Category:Singleton Functions|getWind]]
 
[[Category:Singleton Functions|getWind]]

Revision as of 23:06, 30 July 2020

Scripting Root

Envrioment: Mission Scripting
Function: getWind Added with: 1.2.0
Member Of: atmosphere
Syntax: vec3 atmosphere.getWind(table vec3 )
Description: Returns a velocity vector of the wind at a specified point


Return Value: vec3
Return Example: { ["y"] = 0, ["x"] = 2.1700058188484, ["z"] = 3.058223998561, }
Examples: The following stores the wind values at an interval of 500m starting at 0 ASL over a given point.
   local point = trigger.misc.getZone('z').point
   local windOverPoint = {}
   for i = 0, 20 do
       point.y = i * 500
       windOverPoint[i+1] = atmosphere.getWind(point )
   end
Related Functions: atmospherefunctions: getWind, getWindWithTurbulence, getTemperatureAndPressure
Notes: Returns wind values of 0 when the point is below or directly on ground level.