PDA

Click to See Complete Forum and Search --> : Astronomy conversion


oswaler
Aug 10th, 2007, 07:58 PM
I have an RA and Dec in decimal degrees. I need to convert them to hrs min sec. I know how to go from hrs min sec to degrees, but not back.

For example, I have an RA = 66.918277 and Dec = 24.622590

I would appreciate someone showing how I would convert these to hours minutes seconds.

Thanks - Eric

jemidiah
Aug 11th, 2007, 08:04 PM
After a (brief) search, I couldn't find how many hours there are in a degree. So, I'll just assume there's 1 hour in 1 degree and edit this post if that assumption is wrong.

Example conversion:

121.1456 = D
H = 121
M = Int((121.1456 - 121) * 60) = Int(8.736) = 8
S = Int(8.736 - 8) * 60 = 44.16

So 121.1456 degrees becomes 121h8m44.16s

Note that 121 + 8 / 60 + 44.16 / (60 * 60) = 121.1456.


General conversion:

Let D = number of decimal degrees.
Let H = number of hours
Let M = number of minutes
Let S = number of seconds

Then H = Int(D), M = Int((D - H) * 60), S = (D - H) * 60 - M) * 60.