Solved

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

Posted on 2004-03-21
13
12,628 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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
 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Passing a Text Box name to a Sub 6 104
VBA - If Bookmark = "XXBOOKMARKXX" then 15 66
Collapse and expand table in Word 2010 2 157
Fastest way to find and count same items VB6 16 62
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

734 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