HTML/JS: hour-min-sec to degree decimal

Hour Minute Seconds

Table of Contents

How to convert?

To convert from hour-min-sec to degree decimal, we use the following steps,

  1. Multiply the hour's value with $15$.
  2. Multiply the minute's value by $15/60$.
  3. Multiply the second's value by $15/3600$.
  4. Add the values.

Note

There are 24 hours of RA around a circle in the sky and 360$^\circ$ in a circle. Thus, 1 hour of RA equals 15 degrees of RA. The same applies to the minutes, and seconds for RA.

Example

Here we will convert the hour-min-sec value of $12^\text{h}12^\text{m}12^\text{s}$ to degree decimal using the procedure above,

\text{deg}: \frac{12^\text{h}}{1^\text{h}}\times15 = 180,\qquad \text{min}:\frac{12^\text{min}}{60^\text{min}}\times15 = 3,\qquad \text{sec}:\frac{12^\text{sec}}{3600^\text{sec}}\times15 = 0.05
\text{dd}: 180+3+0.05 \rightarrow 183.05

We can use the degree decimal value to convert it further into DD:MM:SS format, as outlined in the degree decimal to deg-min-sec post.

See also

  1. Degree decimal to deg-min-sec
  2. deg-min-sec to degree decimal

1 thought on “HTML/JS: hour-min-sec to degree decimal

Your thoughts