From: Chris Gifford on
Hello,

I am needing to batch convert many Military Grid Reference System (MGRS) coordinates to Latitude/Longitude coordinates, and vice versa. Matlab is a requirement, as it will be embedded in a much larger Matlab application. The machines which these scripts will be run on will not have internet access, so the solution cannot involve the Web. The functionality I want is essentially what the following webpage provides:

http://www.arsitech.com/mapping/mgrs/

Let's assume the WGS84 datum is used. Is there an existing Matlab function that can do this? If not, is anyone familiar with the equations required to do so? Ideally I would like to pass the MGRS coordinate (alphanumeric string, e.g. 4QFJ1234567890) to a function which would return the corresponding [latitude, longitude]. The accompanying function would ideally pass the latitude/longitude coordinate and return the corresponding MGRS.

Thank you in advance for your time and help.