Jump to content

GetVec3fromGrid

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetVec3fromGrid
Function Description: Converts an MGRS grid table into a 3D vector (vec3) using UTM zone and MGRS digit string data, transforming coordinates from MGRS to latitude, longitude, and altitude, then to local origin coordinates.
File Location: cmm.positionFunctions.lua
Syntax: CMM.GetVec3fromGrid( table GRID )
Return Value: table or nil
Parameters: Name Description
GRIDTable containing MGRS grid data with fields UTMZone and MGRSDigraph, used to derive geographic coordinates.
Example: CMM.GetVec3fromGrid({UTMZone = 33, MGRSDigraph = "123456"})
Example Description: Converts MGRS grid data into a 3D position vector using UTM zone and digit string, returning the resulting coordinates or nil if input is invalid.
Related Functions:
Notes: