Difference between revisions of "MIST getMGRSString"
From DCS World Wiki - Hoggitworld.com
| (One intermediate revision by the same user not shown) | |||
| Line 6: | Line 6: | ||
|desc= Returns a string of the average position of units defined by a UnitNameTable in the MGRS format to the specified accuracy. | |desc= Returns a string of the average position of units defined by a UnitNameTable in the MGRS format to the specified accuracy. | ||
| + | |||
| + | {{mist_makeUnitNames}} | ||
|rtnType= string | |rtnType= string | ||
| Line 99: | Line 101: | ||
}} | }} | ||
| − | |rtnExamples= | + | |rtnExamples= 38T AB 123 123 |
| + | |||
| + | |example= 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= | |notes= | ||
Latest revision as of 10:48, 24 August 2021
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 |
