MIST getWindBearingAndVel

From DCS World Wiki - Hoggitworld.com
Revision as of 21:15, 11 February 2022 by Grimes (talk | contribs) (Created page with "{{Mission Scripting |fName= mist.utils.getWindBearingAndVel| |vNum = Mist 4.5 |desc= Returns the bearing and velocity of the wind at a given point. The bearing is the direc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


mist.utils.getWindBearingAndVel

Added with: Mist 4.5
Description
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

Syntax
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)
Notes:
Related Functions
makeUnitTable, getRandPointInCircle, getRandomPointInZone, getRandomPointInPoly, 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