MIST getMGRSString

From DCS World Wiki - Hoggitworld.com
Revision as of 10:48, 24 August 2021 by Grimes (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


mist.getMGRSString

Added with: Mist 3.0
Description
Returns a string of the average position of units defined by a UnitNameTable in the MGRS format to the specified accuracy.

UnitNameTables are a table format used within mist. Quite literally it is a table indexed numerically with unit names. There are two functons that can be used to generate the table: mist.makeUnitTable and mist.getUnitsByAttribute

  {"unit1", "unit2", "unit3"}

or written as:

  {
    [1] = "unit1",
    [2] = "unit2",
    [3] = "unit3",
  }
Syntax
string mist.getMGRSString(table vars )
Valid Input Values:

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

 vars = 
 {
 units = UnitNameTable units, 
 acc = number acc,
 
 }

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

acc is the accuracy of the coordinate. Valid entries are 0 through 5.

Return value:
string
Return example:
38T AB 123 123
Usage Examples:
Returns a MGRS string for an group named "arty" to an accuracy of 100m.


  local str = mist.getMGRSString(units = mist.makeUnitsTable({"[g]arty"}), acc = 3)
Notes:
Related Functions
tostringMGRS, tostringLL, tostringBR, getMGRSString, getLLString, getBRString, getLeadingPos, getLeadingMGRSString, getLeadingLLString, getLeadingBRString, getMilString, getClockString, getDateString, stringMatch, stringCondense

Scripting Engine

MIST Root Page