Jump to content

ConvertGRIDtoVec3

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