General discussion
-
CreatorTopic
-
September 30, 2006 at 8:35 pm #2248474
How to convert 30.75 in 30?34’30
Lockedby aaasantacruz · about 17 years, 6 months ago
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?Topic is locked -
CreatorTopic
All Comments
-
AuthorReplies
-
-
September 30, 2006 at 9:52 pm #3139227
Converting Decimal Degrees to DMS
by the ice man · about 17 years, 6 months ago
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.
-
September 30, 2006 at 11:27 pm #3139220
Converting Decimal Degrees to DMS
by aaasantacruz · about 17 years, 6 months ago
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-
October 1, 2006 at 6:03 am #3139189
Translation problem ?
by tony hopkinson · about 17 years, 6 months ago
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. -
October 1, 2006 at 8:22 pm #3138965
Converting Decimal into and from DDMMSS
by aaasantacruz · about 17 years, 6 months ago
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. -
October 2, 2006 at 2:11 am #3140329
Unlikely – but thanks for the thought
by tony hopkinson · about 17 years, 6 months ago
In reply to Converting Decimal into and from DDMMSS
Twenty years and counting…
-
October 2, 2006 at 6:40 am #3140250
…sure, you’ve spent 20 years and counting, but…
by eddie n · about 17 years, 6 months ago
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.
-
October 3, 2006 at 9:45 am #3141101
Well I started looking at it
by tony hopkinson · about 17 years, 6 months ago
In reply to …sure, you’ve spent 20 years and counting, but…
before google was invented, so it took a while.
LOLHunt the parentheses is a great game isn’t it. Especially when there’s three missing, and operator precedence comes in to play.
-
-
September 30, 2006 at 11:55 pm #3139217
Converting Decimal Degrees to DMS
by aaasantacruz · about 17 years, 6 months ago
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.-
October 1, 2006 at 10:36 am #3139126
Converting Decimal Degrees to DMS
by the ice man · about 17 years, 6 months ago
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.
-
October 1, 2006 at 8:16 pm #3138969
Converting Decimal Degrees to DMS
by aaasantacruz · about 17 years, 6 months ago
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 -
October 2, 2006 at 5:29 pm #3141356
Re: Converting Decimal Degrees to DMS
by the ice man · about 17 years, 6 months ago
In reply to Converting Decimal Degrees to DMS
Your welcome aaasantacruz. Just took me a little bit to find it.
-
October 1, 2006 at 8:16 pm #3138968
Converting Decimal Degrees to DMS
by aaasantacruz · about 17 years, 6 months ago
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
-
-
March 2, 2007 at 8:05 pm #2536441
DMS TO DECIMAL DEGREES
by danmcphail · about 17 years, 1 month ago
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
-
-
October 1, 2006 at 11:46 am #3139107
well here’s a couple of quickies…
by dawgit · about 17 years, 6 months ago
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-
October 1, 2006 at 8:25 pm #3138963
Converting Decimal into and from DDMMSS
by aaasantacruz · about 17 years, 6 months ago
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.
-
-
-
AuthorReplies