?
Solved

formula for converting DD to DMS (waypoints)?

Posted on 2005-04-10
3
Medium Priority
?
1,233 Views
Last Modified: 2012-06-22
using the WGS-84 (NAD-83) datum

what is the formula for converting the following:


Degree Decimal  Example: lat = 37.379   lon = -122.061

TO

Degree Minute Second Example: lat= 37°22'44.4" N   lon = 122° 2'39.6" W



Please explain how to determine the N/W portions of the waypoint

IELite
0
Comment
Question by:IElite
3 Comments
 
LVL 85

Assisted Solution

by:ozo
ozo earned 1000 total points
ID: 13750501
Degree = floor(37.379)
Minute = floor((37.379-Degree)*60)
Second = ((37.379 - Degree) *60 - Minute) * 60
0
 
LVL 6

Expert Comment

by:Talmash
ID: 13750815
decimal to minutes : (replace ceiling function with int if negative value)
deg = int(lat)
min = int((lat-deg)*60)
sec = ((lat-deg)*3600) % 60

minute to decimal :

lat = deg + min/60 + sec/3600

* same for lon
** -/+ sign : if MINUS is used , ceiling function must replace the integer function
0
 
LVL 31

Accepted Solution

by:
GwynforWeb earned 1000 total points
ID: 13754915
IElite,
  All the equations you will use will have trigonometric function in them (eg, sin, cos etc). You  will require radians not degrees to use your formulea, just convert the degrees into radians ie

radians = 2*Pi*degrees/360

and use those values in the formulea

eg
lonDegree=37.379
lonRadians= 37.379*2*Pi*degrees/360

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

A Guide to the PMT, FV, IPMT and PPMT Functions In MS Excel we have the PMT, FV, IPMT and PPMT functions, which do a fantastic job for interest rate calculations.  But what if you don't have Excel ? This article is for programmers looking to re…
How to Win a Jar of Candy Corn: A Scientific Approach! I love mathematics. If you love mathematics also, you may enjoy this tip on how to use math to win your own jar of candy corn and to impress your friends. As I said, I love math, but I gu…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

840 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