Page 1 of 1

DEGRES CONVERSION

Posted: Sat Jan 16, 2010 1:40 pm
by LEGRAND
I have difficulties to transform DEGRES as used in programs (DD.MMSS)
DD=DEGRES, MM=MINUTES etc; 24DEG 45MN 30S = 24.4530 as input
in DECIMAL notation (24. 75833)
I know it's elementary but for some reason I cannot find the actual number. I suppose that the code (3 lines) exists somewhere.I didn't find it.Could Somebody be kind enough to help me?
Thanks in advance.

Posted: Sun Jan 17, 2010 2:01 pm
by lrcvs
It is easy to translate 24 Deg, 45 Min, 30 seconds to Value Decimal
1 Dgr = 60 Min
1 Min = 60 Sec

Then:

24 * 60 * 60 = DSec
45 * 60 = MSec
30 sec = SSec

Total value decimal in Sec = DSec + MSec + SSec

1 Dgr Decimal = 3600 Sec

Dgr = ( Total Value in Sec) / 3600

Greetings

DEGRES TO DECIMAL

Posted: Tue Jan 19, 2010 9:01 am
by LEGRAND
Thanks.