Difference between revisions of "MIST getBRString"

From DCS World Wiki - Hoggitworld.com
 
 
Line 99: Line 99:
 
}}
 
}}
  
|rtnExamples=  
+
|rtnExamples= 145 for 38
<pre>
+
 
mist.getBRString({
+
 
  units = {"Pilot #001"},
+
|example= Returns the bearing and range for pilot 001 as referenced from the point "LZ"
  ref = trigger.misc.getZone('LZ').point,
+
  mist.getBRString({
  alt = false,
+
    units = {"Pilot #001"},
  metric = false
+
    ref = trigger.misc.getZone('LZ').point,
}) => 145 for 38
+
    alt = false,
</pre>
+
    metric = false
 +
  })  
  
|example=
 
<pre>
 
do
 
  TBD
 
end
 
</pre>
 
  
 
|notes=  
 
|notes=  

Latest revision as of 09:49, 24 August 2021


mist.getBRString

Added with: Mist 3.0
Description
Returns a string of the average position of units defined by a UnitNameTable in the bearing/range format and optionally in metric distances. Uses most of the arguments that tostringBR does.
Syntax
string mist.getBRString(table vars )
Valid Input Values:

vars tables have the following recognized fields( required entries in blue, optional in green):

 vars = 
 {
 units = UnitNameTable units, 
 ref = table ref, 
 alt = boolean alt,
 metric = boolean metric,
 }

units is a UnitNameTable- a table of unit names that follow a special set of rules (see the entry on UnitNameTables).

ref is a vec3 point to be referenced

alt if present will display the averaged altitude of units

metric if present the distance will be in metric. If not present distance is in Nautical Miles and altitude in feet.

Return value:
string
Return example:
145 for 38
Usage Examples:
Returns the bearing and range for pilot 001 as referenced from the point "LZ"
  mist.getBRString({
    units = {"Pilot #001"},
    ref = trigger.misc.getZone('LZ').point,
    alt = false,
    metric = false
  })
Notes:
Related Functions
tostringMGRS, tostringLL, tostringBR, getMGRSString, getLLString, getBRString, getLeadingPos, getLeadingMGRSString, getLeadingLLString, getLeadingBRString, getMilString, getClockString, getDateString, stringMatch, stringCondense

Scripting Engine

MIST Root Page