General discussion

  • Creator
    Topic
  • #2248474

    How to convert 30.75 in 30?34’30

    Locked

    by aaasantacruz ·

    To resolve problems in trigonometry.
    Until now I resolve Cos, Sin, Tan, Air Cos, Air Sin and Air Tan but to converted results from 48.270/5.33=9.056285178 I don’t find out how to convert this on 9?3’22.6266″ How I have to do to get it?

All Comments

  • Author
    Replies
    • #3139227

      Converting Decimal Degrees to DMS

      by the ice man ·

      In reply to How to convert 30.75 in 30?34’30

      This looks like your converting decimal degrees into DMS (degrees, minutes, seconds) and it a very straight forward process.

      To convert 9.056285178 decimal degrees into DMS first subtract the 9, then mulitple the result .056285178 by 60 to get your minutes, 3.37711068. Once you have the minutes subtract that value (the 3) and multiple by 60 again to get your seconds .37711068 * 60 = 22.6266.

      You now have the three pieces you need for your DMS value, the 9, the 3 and 22.6266 putting them in order 9?3’22.6266″.

      If you need to proof it then reverse process and divide by 60 for the 2 steps. It will be off a little bit due to rounding.

      • #3139220

        Converting Decimal Degrees to DMS

        by aaasantacruz ·

        In reply to Converting Decimal Degrees to DMS

        Thanks Ice Man
        Your answer is logic; but when A1 is #.decimals I want to find a magic formul in A2 that give me as an answer DD?mm’ss.ss” in one cel; without so many calculs to do in diferents cels.
        For sample in Sin of A1(30) I find “=sin(radians(a1))” and I get .5; that is what I looking for.
        Thanks

        • #3139189

          Translation problem ?

          by tony hopkinson ·

          In reply to Converting Decimal Degrees to DMS

          0.5 is the sine it’s not an angle, expressing it in DMS is meaningless.

          If you calculate a sine from the lengths the triangle and then take it’s inverse (arcsin) then you get the angle that would subtend a triangle with those two lenghts.

          If you want to display a decimal number as DMS.s and put it in one cell as a label in that format, it’s doable but longwinded. Personally I’d work out the intermediates in other columns and do the string conversion last, then hide the working out columns.
          Or you could write functions to work out the intermediates and then chain them together.
          B1 = DegreesOf(A1) + ‘?’ + MinutesOf(A1) + ‘.’ … etc.
          Doing it all in one cell is possible but I wouldn’t recommend it, you’ll spend twenty days looking for missing parentheses ,and when you are done it will be unbelievably inefficient.

        • #3138965

          Converting Decimal into and from DDMMSS

          by aaasantacruz ·

          In reply to Translation problem ?

          There is a link that provide me all the information I need to have it done automatically without having to create a custom formatting. The site gives me the information for converting from decimail to DMS and from DMS to decimal.
          http://support.microsoft.com/?kbid=213449
          Thanks Tony I hope this helps you too in your programing career.

        • #3140329

          Unlikely – but thanks for the thought

          by tony hopkinson ·

          In reply to Converting Decimal into and from DDMMSS

          Twenty years and counting…

        • #3140250

          …sure, you’ve spent 20 years and counting, but…

          by eddie n ·

          In reply to Unlikely – but thanks for the thought

          …have you spent 20 years converting from DMS to decimal degrees and back? 🙂

          But seriously, sometimes in a bid to shorten code as much as possible we introduce unneeded complexity. I agree with you (and from the evidence pf that KB article, so do MSFT) that doing each step on a line of its own makes the coding less error-prone, especially in this case.

        • #3141101

          Well I started looking at it

          by tony hopkinson ·

          In reply to …sure, you’ve spent 20 years and counting, but…

          before google was invented, so it took a while.
          LOL

          Hunt the parentheses is a great game isn’t it. Especially when there’s three missing, and operator precedence comes in to play.

      • #3139217

        Converting Decimal Degrees to DMS

        by aaasantacruz ·

        In reply to Converting Decimal Degrees to DMS

        I create in Format-cell-Custom “dd?00’ss.0”; Excel 2003 of course but this is giving me for
        1.5 1?0:0.0 1.55 1?12:0.0
        1.6 1?24:0.0 1.66 1?50:24.0
        1.74 1?45:36.0 1.75 1?0:0.0
        15.25 15?0:0.0 15.5 15?0:0.0
        15.75 15?0:0.0 15.99 15?45:36.0
        119.99 28?45:36.0 59.99 28?45:36.0
        I get crazy trying to find out why.

        • #3139126

          Converting Decimal Degrees to DMS

          by the ice man ·

          In reply to Converting Decimal Degrees to DMS

          I believe this link will provide you the information you need to have it done automatically without having to create a custom formatting. The site gives the information for converting from decimail to DMS and from DMS to decimal. Just make sure your back on one of your worksheets when entering the data.

          http://support.microsoft.com/?kbid=213449

        • #3138969

          Converting Decimal Degrees to DMS

          by aaasantacruz ·

          In reply to Converting Decimal Degrees to DMS

          Good, very good, This is wonderful.
          This save me a lot of time and hearikkkkk.
          A little macro and that’s it.
          Thank you very much to you.
          Ice Man U the best, keeping like that.
          Thanks again

        • #3141356

          Re: Converting Decimal Degrees to DMS

          by the ice man ·

          In reply to Converting Decimal Degrees to DMS

          Your welcome aaasantacruz. Just took me a little bit to find it.

        • #3138968

          Converting Decimal Degrees to DMS

          by aaasantacruz ·

          In reply to Converting Decimal Degrees to DMS

          Good, very good, This is wonderful.
          This save me a lot of time and hearikkkkk.
          A little macro and that’s it.
          Thank you very much to you.
          Ice Man U the best, keeping like that.
          Thanks again

      • #2536441

        DMS TO DECIMAL DEGREES

        by danmcphail ·

        In reply to Converting Decimal Degrees to DMS

        G’day Mate

        I have trying to work out if it is possible to convert input data (dms) to decimal. Where the input data doesn’t display any symbols (ie. ? ‘ “).

        eg: 25.3512(dms) = 25.5867(decimal)

        Cheers, Dan

    • #3139107

      well here’s a couple of quickies…

      by dawgit ·

      In reply to How to convert 30.75 in 30?34’30

      Take a look at this site; http://software.geocomm.com/coorconv/ for a
      D/M/S Converter Unknown converts angles from decimal degrees, minutes, and seconds. Degrees and minutes are also supported. There are a few more that might help also. I just remember that one of the top of my head. Another good site is: http://www.efunda.com/home.cfm I’ve used something from both. -d

      • #3138963

        Converting Decimal into and from DDMMSS

        by aaasantacruz ·

        In reply to well here’s a couple of quickies…

        Your programs are very good, but I was looking to save the time to copy to excel.
        There is a link that provide me all the information I need to have it done automatically without having to create a custom formatting. The site gives me the information for converting from decimail to DMS and from DMS to decimal.
        http://support.microsoft.com/?kbid=213449
        Thanks to IceMan.
        And Thanks to you for your implication.

Viewing 1 reply thread