Solved

Need to convert UTM to latitude / longitude

Posted on 2004-03-30
10
851 Views
Last Modified: 2007-12-19
Need to convert UTM to Lat / Long. It's close, but not right. This is needed VERY ugently.
Thanks,
Russ


'********************************************************************
a = 6378137
b = 6356752.3142
e12 = 6.69437999014138E-03
e = 8.18191908426219E-02
e1 = 1.6792203863838E-03

M = Northing / 0.9996
mu = M / (a * (1 - e12 / 4 - 3 * e ^ 4 / 64 - 5 * e ^ 6 / 256))



J1 = 3 * e1 / 2 - 27 * e1 ^ 3 / 32 '
J2 = 21 * Sqr(e1) / 16 - (55 * e1) ^ 4 / 32 '
J3 = (151 * e1) ^ 3 / 96 '
J4 = (1097 * e1) ^ 4 / 512 '
fp = mu + J1 * Sin(2 * mu) + J2 * Sin(4 * mu) + J3 * Sin(6 * mu) + J4 * Sin(8 * mu) '
C1 = e12 * Sqr(Cos(fp)) '
T1 = Sqr(Tan(fp)) '
R1 = a * (1 - Sqr(e)) / (1 - Sqr(e) * Sqr(Sin(fp))) ^ 1.5 '
N1 = a / (1 - Sqr(e) * Sqr(Sin(fp))) ^ 0.5 '
D = Easting / (N1 * 0.9996) '
Q1 = (N1 * Tan(fp)) / R1 '
Q2 = (Sqr(D) / 2) '
Q3 = (5 + 3 * T1 + 10 * C1 - 4 * Sqr(C1) - 9 * e12) * D ^ 4 / 24
Q4 = (61 + 90 * T1 + 298 * C1 + 45 * Sqr(T1) - 3 * Sqr(C1) - 252 * e12) * D ^ 6 / 720
Q5 = D
Q6 = (1 + 2 * T1 + C1) * D ^ 3 / 6
Q7 = (5 - 2 * C1 + 28 * T1 - 3 * Sqr(C1) + 8 * e12 + 24 * Sqr(T1)) * D ^ 5 / 120

Latitude = fp - Q1 * (Q2 - Q3 + Q4) '
Longitude = Central_Meridian + (Q5 - Q6 + Q7) / Cos(fp) '

Longitude = Longitude * 180 / PI
Latitude = Latitude * 180 / PI
Easting = Easting
Northing = Northing
0
Comment
Question by:RUSS_EMI
10 Comments
 
LVL 5

Expert Comment

by:g0rath
ID: 10717957
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 10718440
g0arth, unfortunately, that code does EXACTLY the inverse of what RUSS EMI was asking for.  He has UTM and needs Latitude/Longitude.  The provided link returns UTM from Latitude/Longitude.

AW

0
 

Author Comment

by:RUSS_EMI
ID: 10721601
Found the answer myself.  A square root term should have been squared.  Please close this question and refund the points.
Russ
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 10725951
Russ, you need to post a zero-point request to Community Support, asking them to delete this question, and refund your points.

AW
0
 

Author Comment

by:RUSS_EMI
ID: 10726008
Thank you, AW
0
 

Author Comment

by:RUSS_EMI
ID: 11404389
Thank you.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11439634
PAQed, with points refunded (500)

modulo
Community Support Moderator
0
 
LVL 1

Expert Comment

by:LukeB
ID: 33362682
Hi Russ

could you post your final code? Also, I assume that your UTM paramters of a,b,e are specific to your 'zone'. Can you elaborate how I can use for my 'zone', here in Australia ?
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Saving history changes to sub form 4 43
VB6 - Convert HH:MM into Decimal 8 56
Help me. 3 55
vbModal 12 52
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

778 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