formula for converting DD to DMS (waypoints)?

Posted on 2005-04-10
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


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

Question by:IElite
    LVL 84

    Assisted Solution

    Degree = floor(37.379)
    Minute = floor((37.379-Degree)*60)
    Second = ((37.379 - Degree) *60 - Minute) * 60
    LVL 6

    Expert Comment

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

    Accepted Solution

      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

    lonRadians= 37.379*2*Pi*degrees/360


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    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…
    We are taking giant steps in technological advances in the field of wireless telephony. At just 10 years since the advent of smartphones, it is crucial to examine the benefits and disadvantages that have been report to us.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    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

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now