[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 13173
  • Last Modified:

Need to convert Military Grid Reference System (MGRS) to Lat/Lon

I know and have VB6.  I haven't been successful in locating a routine.  This is urgent, for a work project.  Thanks, Russ
0
RUSS_EMI
Asked:
RUSS_EMI
  • 7
  • 2
  • 2
  • +2
2 Solutions
 
___XXX_X_XXX___Commented:
What kind of system is MGRS ? and what is Lat/Lon ? Is it Lattitude/Longtitude ?
0
 
RUSS_EMIAuthor Commented:
Military Grid Reference System is similar, but not identical to UTM.  
Example: Sheraton Hotel, Baghdad, Iraq = 38S MB 45956 86195  MGRS
or N 33 18 48.42 / E 044 25 10.09  Latitude/Longitude.
0
 
Xentor_Commented:
It's going to be a bit tricky figuring out a conversion method, if we have no idea how MGRS works.  Latitude/Longitude is just a coordinate system, but what do all those numbers in MGRS mean?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
RUSS_EMIAuthor Commented:
A Quick Guide to Using UTM Coordinates



Standing at the road junction marked with the star on the topographic map pictured above, a GPS unit set to display position in UTM coordinates, would report a location of:

10 S 0559741
    4282182

The 10 S represents the zone you are in. The zone is necessary to make the coordinates unique over the entire globe.

The top set of numbers, 0559741, represent a measurement of East-West position, within the zone, in meters. It's called an easting.

The bottom set of numbers, 4282182, represent a measurement of North-South position, within the zone, in meters. It's called a northing.

The map has Universal Transverse Mercator (UTM) grid lines spaced every kilometer or 1000 meters. The vertical grid lines determine East-West position and the horizontal grid lines determine North-South position.

Look along the bottom edge of the map at the labels for the vertical grid lines.

559 and 560000 mE.

The label, 560000 mE., reads "five hundred and sixty thousand meters East." The label, 559, is an abbreviation for, 559000 mE. The two grid lines are 1000 meters apart. The horizontal grid lines are labeled in a similar manner.

This discribes UTM.  MGRS is similar, but in addition to the grid zone designators (10S / 38S) uses 2 alpha characters (MB) to further define the position with the zone, like a square broken down into smaller squares.

Russ
0
 
Xentor_Commented:
So what you really need is a way to translate between the zone identifiers and the actual coordinates.  Kind of like a geometric translation, where the easting and northing are the offset from that position.

Is there a logical system by which those zones are marked?  In other words, without any kind of list or lookup (Only with formulas), would it be possible to take "10S", and get, say, the Lat/Lon coordinates of the northeast corner of that zone?
0
 
RUSS_EMIAuthor Commented:
I don't know.  I have been on the internet searching for code, with no luck.  There are stand alone programs that work almost (they convert MRGS into Degrees; Minutes; Seconds, but I am looking to build this into a larger program which needs Lat/Long as Degree Decimal (which I can easily do from Lat/ Long DMS.
Russ
0
 
dfiala13Commented:
http://earth-info.nima.mil/GandG/geotrans/ has source code available.  It is in java and I'm not sure if it is what you are looking for, but here is the download link...

http://earth-info.nima.mil/GandG/geotrans/index.html#DOWNLOAD
0
 
David LeeCommented:
Here's a page with a complete description of how it's done:  http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM
0
 
RUSS_EMIAuthor Commented:
Thank you.  Looks very complete.  Does this convert from MGRS?  That is what is needed exactly.
I do appreciate the info on UTM.
Thanks, Russ
0
 
RUSS_EMIAuthor Commented:
I'm looking for something in VB6.  I will try to disect the java, but honestly I've never seen it before.  
Russ
0
 
David LeeCommented:
If I understand correctly MGRS and UTM are one int he same.
0
 
RUSS_EMIAuthor Commented:
No, just similar.  Example:  Sheraton Hotel, Baghdad (my location)
MGRS = 38S MB 45956 86195
UTM   = 38N 0445956 3686195
That's why I just can't go with UTM.  I need that extra piece for MGRS.
Russ
0
 
RUSS_EMIAuthor Commented:
I found the code in C, translated myself.  Please close this question and refund the points.
Russ
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 7
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now