<h2>Answer to your question</h2>
<p><a href="https://en.wikipedia.org/wiki/Right_ascension" rel="nofollow noreferrer">RA</a> changes just a little bit through time (because of minor effects like <a href="https://en.wikipedia.org/wiki/Parallax" rel="nofollow noreferrer">parallax</a>), but we can just say it is constant for a specific non-Sun star. Same applies to <a href="https://en.wikipedia.org/wiki/Declination" rel="nofollow noreferrer">declination</a>. Why is that? The declination and right ascension of vernal equinox (where the Sun is in March) is defined to be 0°. This point is fixed with respect to other stars. Thus, the declination and right ascension are (almost) constant for some star. That's why we like to use it. But note, that these coordinates are changing for Solar System objects.</p>
<hr />
<h2>How should your program look like</h2>
<p>For you calculation, we need to understand what is <a href="https://en.wikipedia.org/wiki/Sidereal_time" rel="nofollow noreferrer">sidereal time</a>. This is just angular distance of <a href="https://en.wikipedia.org/wiki/First_Point_of_Aries" rel="nofollow noreferrer">vernal equinox</a> to the <a href="https://en.wikipedia.org/wiki/Celestial_equator" rel="nofollow noreferrer">celestial equator</a>. If Sun were to have same declination and right ascension through the year, one sidereal period would be same as one solar day. But Sun's right ascension changes slowly through time, so one sidereal period is just a little bit off the solar day. If we think carefully, Sun makes one circle on the right ascension in one year, thus there are around 366.25 <a href="https://en.wikipedia.org/wiki/Sidereal_time#Sidereal_day" rel="nofollow noreferrer">sidereal days</a> (&quot;star days&quot;), but just 365.25 <a href="https://en.wikipedia.org/wiki/Synodic_day" rel="nofollow noreferrer">solar days</a>. One sidereal day is thus around 23 hours and 56 minutes. We will need that concept later on.</p>
<p>We have to define new concept here: the <a href="https://en.wikipedia.org/wiki/Hour_angle" rel="nofollow noreferrer">hour angle</a>. This is basically the angular distance of some point to the celestial equator. For the vernal equinox, the hour angle is always just sidereal time <span class="math-container">$\Theta$</span> (by the definition). We can simply derive this relation for any object:</p>
<p><span class="math-container">$$h = \Theta - \alpha$$</span></p>
<p>where <span class="math-container">$\Theta$</span> is current sidereal time, <span class="math-container">$h$</span> is the hour angle, and <span class="math-container">$\alpha$</span> is the right ascension.</p>
<hr />
<p>But how could you determine if the object is above the horizon? You can use simple equation:</p>
<p><span class="math-container">$$\cos{h}=-\tan{\phi}\tan{\delta}$$</span>
for the hour angle, where the object sets. <span class="math-container">$\phi$</span> is the <a href="https://en.wikipedia.org/wiki/Latitude" rel="nofollow noreferrer">geographical latitude</a>, <span class="math-container">$\delta$</span> is the declination of the object. Note that some objects never set or rise, thus you need to check this before you apply <span class="math-container">$\arccos{x}$</span> which is defined only in the domain [-1,1].</p>
<p>Now you need to determine the sidereal times when this is visible. Just use <span class="math-container">$h = \Theta - \alpha$</span> for <span class="math-container">$\Theta$</span>. The <span class="math-container">$\Theta$</span> you get is the time of the set of the object. Let's denote it with <span class="math-container">$\Theta_{set}$</span>. The object <a href="https://en.wikipedia.org/wiki/Culmination" rel="nofollow noreferrer">culminates</a> at <span class="math-container">$\Theta_{culmination}=\alpha$</span>, but when does it rise? At <span class="math-container">$\Theta_{rise}=2\Theta_{culmination}-T_{set}$</span>. Thus, for the object to be seen, the current sidereal time must be <span class="math-container">$\Theta_{rise}\leq \Theta_{current} \leq \Theta_{set}$</span>. You see, that the sidereal time when the star is visible is independent of the current solar date and time. (Note that you must also handle the situation where the sidereal time of rise is for example <span class="math-container">$23^h50^{min}$</span> and the time of set is <span class="math-container">$2^h20^{min}$</span>. No number is larger than the first and lower than the second; I recommend you that in this case just add 24h to the second number.)</p>
<p>Note that this is only the sidereal time at some geographical longitude <span class="math-container">$\lambda$</span>. For the sidereal time at Greenwich, you need to calculate <span class="math-container">$\Theta_{Greenwich}=\Theta_{local}-\lambda$</span>. Make sure that they are both in same units. (Right ascension is normally given in hours, minutes and seconds.)</p>
<p>Now we have to just recalculate the sidereal time to solar time. Let <span class="math-container">$n$</span> be the number of days since the <a href="https://en.wikipedia.org/wiki/March_equinox" rel="nofollow noreferrer">vernal equinox</a>. We can now get the solar time <span class="math-container">$t$</span> using (of course, use more precise number than 4 min):
<span class="math-container">$$t=\Theta - 4\rm\, min \cdot n$$</span>
Now, we can just say that the time must be between:
<span class="math-container">$$t_{rise}\leq t\leq t_{set}$$</span>
for the object to be above the horizon.</p>
<p>The final thing is just to add some number of hours to the Greenwich time to include time zones.</p>
<hr />
<p>More concise version:</p>
<ol>
<li>For some declination and right ascension, calculate the hour angle of set.</li>
<li>Calculate the local sidereal times of rise and set.</li>
<li>Recalculate the local sidereal times to Greenwich.</li>
<li>Calculate the solar time at Greenwich of rise and set.</li>
<li>Add some hours for time zones.</li>
<li>Determine whether the selected time is between these two numbers.</li>
</ol>

CC BY-SA 4.0
2021-06-19T18:34:08.723Z
Perfect.  It'll take me a bit of time to work through this, but it's exactly what I was looking for.  I appreciate your time writing this up.  Thank you.
Ray Walker
CC BY-SA 4.0
2021-06-21T19:27:08.397Z
For the Right Ascension, do I use the J2000 RA or the "on date" RA?  (This is the origin of my assumption that I would need to know the RA rate of change in order to calculate the On Date RA.)
Ray Walker
CC BY-SA 4.0
2021-06-21T20:57:12.157Z
@RayWalker The J2000 RA negligiblly differs from the "on date" RA (change is majorly due precession). For your use (whether the object is visible) you don't have to bother about this. If you are given the "on date" RA, use it, but you are fine with J2000 RA as well. Except if you want to make predictions 2000 years in the future, but then you would also need to include some additional corrections regarding time transformations.
User123
CC BY-SA 4.0
2021-06-18T08:09:59.470Z
2021-06-18T16:06:06.493Z
2021-06-18T16:06:06.493Z
User123
<p>On the vernal equinox, first day of spring, the zero reference point for right ascension was directly overhead at 9:37 UTC this year. It has been advancing westward at a rate of 360/365.25 degrees per day at 9:37 since then. So, on the first day of spring you will see objects with a right ascension of 12 hours overhead at 21:37. On the first day of summer objects with a right ascension of 18 hours will be overhead at 15:37. Your latitude and the object's declination don't enter into seasonal variations. You can use local standard time if you don't mind being off by a few degrees.</p>

CC BY-SA 4.0
2021-06-18T15:54:11.710Z
Ah!  I get it now.  Thank you.
Ray Walker
CC BY-SA 4.0
2021-06-18T15:02:52.787Z
2021-06-20T20:15:08.810Z
2021-06-20T20:15:08.810Z
stretch
<p>I am writing a small <a href="https://julialang.org/" rel="nofollow noreferrer">Julia</a> app to get my feet wet in that language.  And I want to calculate &quot;what's up tonight&quot; based on a table of <a href="https://en.wikipedia.org/wiki/Right_ascension" rel="nofollow noreferrer">right ascension (RA)</a>/<a href="https://en.wikipedia.org/wiki/Declination" rel="nofollow noreferrer">Dec(lination)</a> (table of stars), a terrestrial point of the observer, and the current date/time.</p>
<p>My starting point is understanding at what rate does RA change for a given <a href="https://en.wikipedia.org/wiki/Deep-sky_object" rel="nofollow noreferrer">Deep Sky Object (DSO)</a>, I would appreciate some guidance here.</p>

CC BY-SA 4.0
2021-06-17T21:46:15.107Z
RA and Dec do not change for objects outside the solar system in a manner that it matters (much). Planets and the Moon and the Sun of course move - but that varies a lot, depending on what you look. You probably mean to ask about the change of azimuth and altitude (not RA and DEC) for objects.
planetmaker
CC BY-SA 4.0
2021-06-18T00:45:24.447Z
I think the question refers to the change in local sidereal time (LST) which is 24 hours of Right Ascension in 23 hours 56 min 4.091 sec (if my memory is correct).
JohnHoltz
CC BY-SA 4.0
2021-06-18T06:37:47.920Z
Welcome to astronomy SE! I edited in a few links to define the abbreviations (for newbies and search engines), and I added two tags as well. Good luck with learning a new programming language, that's always fun!
B--rian
CC BY-SA 4.0
2021-06-19T18:32:22.930Z
Thank you, B--rian.  I noted your edits and will use that as a guide going forward.
Ray Walker
<mathematics><declination><right-ascension>
What is the rate of change by day for a given right ascension?
Ray Walker
# What is the rate of change by day for a given right ascension?

(Asked by: username_0 on 2021-06-17)

I am writing a small [Julia](https://julialang.org/) app to get my feet wet in that language. And I want to calculate "what's up tonight" based on a table of [right ascension (RA)](https://en.wikipedia.org/wiki/Right_ascension)/[Dec(lination)](https://en.wikipedia.org/wiki/Declination) (table of stars), a terrestrial point of the observer, and the current date/time.

My starting point is understanding at what rate does RA change for a given [Deep Sky Object (DSO)](https://en.wikipedia.org/wiki/Deep-sky_object), I would appreciate some guidance here.

**Tags:** mathematics, declination, right-ascension
> **Comments:**
> **username_1**: RA and Dec do not change for objects outside the solar system in a manner that it matters (much). Planets and the Moon and the Sun of course move - but that varies a lot, depending on what you look. You probably mean to ask about the change of azimuth and altitude (not RA and DEC) for objects.  
> **username_2**: I think the question refers to the change in local sidereal time (LST) which is 24 hours of Right Ascension in 23 hours 56 min 4.091 sec (if my memory is correct).  
> **username_3**: Welcome to astronomy SE! I edited in a few links to define the abbreviations (for newbies and search engines), and I added two tags as well. Good luck with learning a new programming language, that's always fun!  
> **username_0**: Thank you, B--rian.  I noted your edits and will use that as a guide going forward.  

---

## 2 answers

### Answer by username_4 on 2021-06-18. Score: 3

## Answer to your question

[RA](https://en.wikipedia.org/wiki/Right_ascension) changes just a little bit through time (because of minor effects like [parallax](https://en.wikipedia.org/wiki/Parallax)), but we can just say it is constant for a specific non-Sun star. Same applies to [declination](https://en.wikipedia.org/wiki/Declination). Why is that? The declination and right ascension of vernal equinox (where the Sun is in March) is defined to be 0°. This point is fixed with respect to other stars. Thus, the declination and right ascension are (almost) constant for some star. That's why we like to use it. But note, that these coordinates are changing for Solar System objects.

---

## How should your program look like

For you calculation, we need to understand what is [sidereal time](https://en.wikipedia.org/wiki/Sidereal_time). This is just angular distance of [vernal equinox](https://en.wikipedia.org/wiki/First_Point_of_Aries) to the [celestial equator](https://en.wikipedia.org/wiki/Celestial_equator). If Sun were to have same declination and right ascension through the year, one sidereal period would be same as one solar day. But Sun's right ascension changes slowly through time, so one sidereal period is just a little bit off the solar day. If we think carefully, Sun makes one circle on the right ascension in one year, thus there are around 366.25 [sidereal days](https://en.wikipedia.org/wiki/Sidereal_time#Sidereal_day) ("star days"), but just 365.25 [solar days](https://en.wikipedia.org/wiki/Synodic_day). One sidereal day is thus around 23 hours and 56 minutes. We will need that concept later on.

We have to define new concept here: the [hour angle](https://en.wikipedia.org/wiki/Hour_angle). This is basically the angular distance of some point to the celestial equator. For the vernal equinox, the hour angle is always just sidereal time $\Theta$ (by the definition). We can simply derive this relation for any object:

$$h = \Theta - \alpha$$

where $\Theta$ is current sidereal time, $h$ is the hour angle, and $\alpha$ is the right ascension.

---

But how could you determine if the object is above the horizon? You can use simple equation:

$$\cos{h}=-\tan{\phi}\tan{\delta}$$
for the hour angle, where the object sets. $\phi$ is the [geographical latitude](https://en.wikipedia.org/wiki/Latitude), $\delta$ is the declination of the object. Note that some objects never set or rise, thus you need to check this before you apply $\arccos{x}$ which is defined only in the domain [-1,1].

Now you need to determine the sidereal times when this is visible. Just use $h = \Theta - \alpha$ for $\Theta$. The $\Theta$ you get is the time of the set of the object. Let's denote it with $\Theta\_{set}$. The object [culminates](https://en.wikipedia.org/wiki/Culmination) at $\Theta\_{culmination}=\alpha$, but when does it rise? At $\Theta\_{rise}=2\Theta\_{culmination}-T\_{set}$. Thus, for the object to be seen, the current sidereal time must be $\Theta\_{rise}\leq \Theta\_{current} \leq \Theta\_{set}$. You see, that the sidereal time when the star is visible is independent of the current solar date and time. (Note that you must also handle the situation where the sidereal time of rise is for example $23^h50^{min}$ and the time of set is $2^h20^{min}$. No number is larger than the first and lower than the second; I recommend you that in this case just add 24h to the second number.)

Note that this is only the sidereal time at some geographical longitude $\lambda$. For the sidereal time at Greenwich, you need to calculate $\Theta\_{Greenwich}=\Theta\_{local}-\lambda$. Make sure that they are both in same units. (Right ascension is normally given in hours, minutes and seconds.)

Now we have to just recalculate the sidereal time to solar time. Let $n$ be the number of days since the [vernal equinox](https://en.wikipedia.org/wiki/March_equinox). We can now get the solar time $t$ using (of course, use more precise number than 4 min):
$$t=\Theta - 4\rm\, min \cdot n$$
Now, we can just say that the time must be between:
$$t\_{rise}\leq t\leq t\_{set}$$
for the object to be above the horizon.

The final thing is just to add some number of hours to the Greenwich time to include time zones.

---

More concise version:

1. For some declination and right ascension, calculate the hour angle of set.
2. Calculate the local sidereal times of rise and set.
3. Recalculate the local sidereal times to Greenwich.
4. Calculate the solar time at Greenwich of rise and set.
5. Add some hours for time zones.
6. Determine whether the selected time is between these two numbers.

> **Comments:**
> **username_0**: Perfect.  It'll take me a bit of time to work through this, but it's exactly what I was looking for.  I appreciate your time writing this up.  Thank you.  
> **username_0**: For the Right Ascension, do I use the J2000 RA or the "on date" RA?  (This is the origin of my assumption that I would need to know the RA rate of change in order to calculate the On Date RA.)  
> **username_4**: @RayWalker The J2000 RA negligiblly differs from the "on date" RA (change is majorly due precession). For your use (whether the object is visible) you don't have to bother about this. If you are given the "on date" RA, use it, but you are fine with J2000 RA as well. Except if you want to make predictions 2000 years in the future, but then you would also need to include some additional corrections regarding time transformations.  

---

### Answer by username_5 on 2021-06-18. Score: 1

On the vernal equinox, first day of spring, the zero reference point for right ascension was directly overhead at 9:37 UTC this year. It has been advancing westward at a rate of 360/365.25 degrees per day at 9:37 since then. So, on the first day of spring you will see objects with a right ascension of 12 hours overhead at 21:37. On the first day of summer objects with a right ascension of 18 hours will be overhead at 15:37. Your latitude and the object's declination don't enter into seasonal variations. You can use local standard time if you don't mind being off by a few degrees.

> **Comments:**
> **username_0**: Ah!  I get it now.  Thank you.  

---

