FormatMGRS
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | FormatMGRS | |
| Function Description: | Converts a 3D vector to a standardized MGRS string using latitude and longitude coordinates, then formats it with UTM zone, digraph, and easting/northing values padded to five digits. | |
| File Location: | cmm.stringFunctions.lua | |
| Syntax: | CMM.FormatMGRS( table vec3 ) | |
| Return Value: | string | |
| Parameters: | Name | Description |
| vec3 | A table representing a 3D vector {x, y, z} used to extract latitude and longitude via coord.LOtoLL. | |
| Example: | CMM.FormatMGRS({x=10, y=20, z=30}) | |
| Example Description: | Returns "33 S 45678 54321" when given a vector, where the UTM zone is 33, the digraph is S, and easting and northing are padded to five digits. | |
| Related Functions: | ||
| Notes: | ||