FormatGRID
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | FormatGRID | |
| Function Description: | Converts a 3D vector into a simplified GRID string by extracting the MGRS digraph and first digit of easting and northing values scaled by 10,000, then concatenating them into a readable format. | |
| File Location: | cmm.stringFunctions.lua | |
| Syntax: | CMM.FormatGRID( 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.FormatGRID({x=10, y=20, z=30}) | |
| Example Description: | Returns "S123" when given a vector, where S is the digraph and 1, 2, 3 are the first digits of easting and northing after dividing by 10,000. | |
| Related Functions: | ||
| Notes: | ||