Solved

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

Posted on 2004-03-21
13
12,270 Views
Last Modified: 2007-12-19
I know and have VB6.  I haven't been successful in locating a routine.  This is urgent, for a work project.  Thanks, Russ
0
Comment
Question by:RUSS_EMI
  • 7
  • 2
  • 2
  • +2
13 Comments
 
LVL 6

Expert Comment

by:___XXX_X_XXX___
ID: 10644140
What kind of system is MGRS ? and what is Lat/Lon ? Is it Lattitude/Longtitude ?
0
 

Author Comment

by:RUSS_EMI
ID: 10644396
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
 
LVL 5

Expert Comment

by:Xentor_
ID: 10644497
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
 

Author Comment

by:RUSS_EMI
ID: 10644749
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
 
LVL 5

Expert Comment

by:Xentor_
ID: 10644909
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
 

Author Comment

by:RUSS_EMI
ID: 10645116
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 12

Accepted Solution

by:
dfiala13 earned 350 total points
ID: 10645147
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
 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 150 total points
ID: 10646328
Here's a page with a complete description of how it's done:  http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM
0
 

Author Comment

by:RUSS_EMI
ID: 10646746
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
 

Author Comment

by:RUSS_EMI
ID: 10647045
I'm looking for something in VB6.  I will try to disect the java, but honestly I've never seen it before.  
Russ
0
 
LVL 76

Expert Comment

by:David Lee
ID: 10648174
If I understand correctly MGRS and UTM are one int he same.
0
 

Author Comment

by:RUSS_EMI
ID: 10648560
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
 

Author Comment

by:RUSS_EMI
ID: 10721626
I found the code in C, translated myself.  Please close this question and refund the points.
Russ
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now