MIST getWindBearingAndVel

From DCS World Wiki - Hoggitworld.com


Added with: Mist 4.5
Returns the bearing and velocity of the wind at a given point. The bearing is the direction the wind is blowing toward. If the point passed is below ground level the function automatically adjusts the point to be 10 meters above ground level.

Bearing is returned in radians

Velocity is returned in meters per second

number, number mist.utils.getWindBearingAndVel(table point )
Valid Input Values:
Any vec or vec3 value is accepted for point.
Return value:
number, number
Return example:
Usage Examples:
The following creates a value "WP2" 50km away from the current location of the unit CV into the wind.
   local cv = Unit.getByName('USSRanger'):getPoint()
   local heading, vel = getWindBearingAndVel(cv)
   heading = heading - math.pi + 0.15708 -- inverse the direction and add 9 degrees to get angle of landing area
   local WP2 = mist.projectPoint(cv, 50000, heading)
Related Functions
makeUnitTable, getRandPointInCircle, getRandomPointInZone, isTerrainValid, terrainHeightDiff, getUnitsInZones, getUnitsInMovingZones, pointInPolygon, getUnitsInPolygon, getDeadMapObjsInZones, getDeadMapObjsInPolygonZone, getUnitsLOS, random, randomizeNumTable, getAvgPoint, getQFE, getWindBearingAndVel, getPathLength, getPathInSegments, getPointAtDistanceOnPath, projectPoint, getGroupsByAttribute, , getUnitsByAttribute, mapValue,

Scripting Engine

MIST Root Page