<p>These steps can be used to find which of the two horizons is to the east:</p>

<p>The local sidereal time equals the right ascension (<span class="math-container">$\alpha$</span>) of the meridian. From equation (13.3) that transforms the ecliptical into equatorial coordinates, the ecliptic longitude of the meridian (<span class="math-container">$\lambda_m$</span>) can be calculated. Since the ecliptic latitude is zero (<span class="math-container">$\beta=0$</span>) on the ecliptic, </p>

<p><span class="math-container">$$\frac{\tan(\alpha)}{\cos(\epsilon)} = \tan(\lambda_m)$$</span></p>

<p>Note that <span class="math-container">$\lambda_m$</span> must be in the same quadrant as <span class="math-container">$\alpha$</span>. If this is not the case, add 180 degrees. Of the two ecliptic longitudes calculated to intersect the horizon, the one that is approximately 90 degrees greater than the adjusted <span class="math-container">$\lambda_m$</span> is the one that is in the east.</p>

CC BY-SA 4.0
2020-05-19T14:17:51.267Z
Thank you! I'll try this out tomorrow and let you know if it works.
Shawn Lauzon
CC BY-SA 4.0
2020-05-20T03:00:13.013Z
Unfortunately this isn't giving me the result I expect for my test case. I'm using $\theta=2.571rad$ and $\epsilon=0.409rad$. If I put those results in my original formula I get the two angles $.861rad$ and $4.003rad$ of which I know the latter is the correct. If I use your formula, substituting $\theta$ for $\alpha$, I get $-.610rad$ to which I can add $\pi$ and arrive at $2.531rad$ which is not either of the expected values. Do you have any advice?
Shawn Lauzon
CC BY-SA 4.0
2020-05-20T04:35:12.567Z
@ShawnLauzon. I added a statement about the ecliptic longitude of the meridian and sidereal time being in the same quadrant. So -0.610 rad that you found for the meridian's longitude and added pi to gives the ecliptic longitude of the meridian = 2.531 radian in the correct quadrant. Adding pi/2 to the longitude of the meridian gives the approximate eastern point = 2.531+pi/2=4.102 radian. So 4.003 radian that you found from your formula is the ecliptic longitude where it rises in the east.
JohnHoltz
CC BY-SA 4.0
2020-05-20T08:35:52.400Z
Thanks for your comment @JohnHoltz, and that works for the original problem, but not for another one. With a sidereal time of 3.575 rad, the two longitudes calculated are 1.449 (Q1) and 4.591 rad (Q3) (the second one is east). $\lambda_m$ is calculated to be 0.467 rad (Q1). Adding $\pi/2$ = 2.0381 rad (Q2) which does not point to the correct answer. I imagine I'm doing something wrong, but can't tell what.
Shawn Lauzon
CC BY-SA 4.0
2020-05-20T12:20:46.680Z
0.467 radians is wrong because it is not in the same quadrant as 3.575 radians. 0.467+pi=3.609 radians is the correct value for the longitude of the meridian, plus pi/2=5.179 radians. So Q3 (4.591) is the longitude to the east.
JohnHoltz
CC BY-SA 4.0
2020-05-20T15:27:50.017Z
Oh! Keep adding 90 degrees until getting to the same quadrant as $\alpha$, that's the part I wasn't getting. I'll try it again in the morning. Thanks again for all the great help, I think this is what I needed.
Shawn Lauzon
CC BY-SA 4.0
2020-05-20T16:02:11.667Z
Actually, add 180 degrees to the arctangent result to get it in the proper quadrant since the arctangent function returns a result in quadrants 1 and 4. Quadrans 3 and 2 are 180 degrees apart from quadrants 1 and 4.
JohnHoltz
CC BY-SA 4.0
2020-05-20T23:45:26.023Z
Yes, in that case you add 180 degrees, but I believe in general you add 90 degrees until it's in the right quadrant.

Anyway, all of the tests I have tried now pass, and so I'm happy. Thank you so much for your time! I've taken the liberty to add a couple things to your answer which caused me some problems; feel free to revise as needed. You've been a great help :)
Shawn Lauzon
CC BY-SA 4.0
2020-05-21T02:07:50.630Z
Thanks for the suggested edits. I accepted them with the correction of adding 180 degrees (not 90) to convert the arctan to the proper value if it is originally in the incorrect quadrant.
JohnHoltz
CC BY-SA 4.0
2020-05-22T04:28:03.003Z
Sounds good. I just made one small edit then: since we are adding 180 degrees, only need to do that once. Thanks again for all the help.
Shawn Lauzon
CC BY-SA 4.0
2020-05-19T03:34:38.880Z
2020-05-22T08:03:24.583Z
2020-05-22T08:03:24.583Z
JohnHoltz
<p>Jean Meeus' <em>Astronomical Algorithms, 2nd ed.</em> p. 99 gives a formula for finding the two longitudes where the ecliptic crosses the horizon:</p>

<p><span class="math-container">$$\tan\lambda = \frac{-\cos\theta}{\sin\epsilon \tan\phi + \cos\epsilon\sin\theta}$$</span></p>

<p>where "<span class="math-container">$\epsilon$</span> is the obliquity of the ecliptic, <span class="math-container">$\phi$</span> is the latitude of the observer, and <span class="math-container">$\theta$</span> is the local sidereal time, returns <span class="math-container">$\lambda$</span> the longitudes of the two points of the ecliptic which are (180 degrees apart) on the horizon".</p>

<p>The software I am using then applies <span class="math-container">$\arctan$</span> to get <span class="math-container">$\lambda$</span> and adds <span class="math-container">$\pi$</span> if <span class="math-container">$\lambda &lt; 0$</span>. Then it returns <span class="math-container">$\lambda$</span> and <span class="math-container">$\lambda + \pi$</span>.</p>

<p>I need to know which of the two angles returned points to the easterly direction. Is there any way to tell which is which? I have all of the information needed to perform the calculation (UT, local time, sidereal time, latitude, longitude), but I can't see how they are related.</p>

<p>Thanks much!</p>

CC BY-SA 4.0
2020-05-18T12:27:27.350Z
$\lambda$ must be the ecliptic longitude, but what are the other values?
JohnHoltz
CC BY-SA 4.0
2020-05-19T02:29:51.527Z
@JohnHoltz Good question, I've updated the text to say include what each value means.
Shawn Lauzon
<ecliptic><algorithm><horizon>
How to tell which of the ecliptic cross horizon angles is to the east?
Shawn Lauzon
# How to tell which of the ecliptic cross horizon angles is to the east?

(Asked by: username_0 on 2020-05-18)

Jean Meeus' *Astronomical Algorithms, 2nd ed.* p. 99 gives a formula for finding the two longitudes where the ecliptic crosses the horizon:

$$\tan\lambda = \frac{-\cos\theta}{\sin\epsilon \tan\phi + \cos\epsilon\sin\theta}$$

where "$\epsilon$ is the obliquity of the ecliptic, $\phi$ is the latitude of the observer, and $\theta$ is the local sidereal time, returns $\lambda$ the longitudes of the two points of the ecliptic which are (180 degrees apart) on the horizon".

The software I am using then applies $\arctan$ to get $\lambda$ and adds $\pi$ if $\lambda < 0$. Then it returns $\lambda$ and $\lambda + \pi$.

I need to know which of the two angles returned points to the easterly direction. Is there any way to tell which is which? I have all of the information needed to perform the calculation (UT, local time, sidereal time, latitude, longitude), but I can't see how they are related.

Thanks much!

**Tags:** ecliptic, algorithm, horizon

> **Comments:**
> **username_1**: $\lambda$ must be the ecliptic longitude, but what are the other values?  
> **username_0**: @username_1 Good question, I've updated the text to say include what each value means.  

---

## 1 answers

### Answer by username_1 on 2020-05-19. Score: 1 | Accepted answer

These steps can be used to find which of the two horizons is to the east:

The local sidereal time equals the right ascension ($\alpha$) of the meridian. From equation (13.3) that transforms the ecliptical into equatorial coordinates, the ecliptic longitude of the meridian ($\lambda\_m$) can be calculated. Since the ecliptic latitude is zero ($\beta=0$) on the ecliptic,

$$\frac{\tan(\alpha)}{\cos(\epsilon)} = \tan(\lambda\_m)$$

Note that $\lambda\_m$ must be in the same quadrant as $\alpha$. If this is not the case, add 180 degrees. Of the two ecliptic longitudes calculated to intersect the horizon, the one that is approximately 90 degrees greater than the adjusted $\lambda\_m$ is the one that is in the east.

> **Comments:**
> **username_0**: Thank you! I'll try this out tomorrow and let you know if it works.  
> **username_0**: Unfortunately this isn't giving me the result I expect for my test case. I'm using $\theta=2.571rad$ and $\epsilon=0.409rad$. If I put those results in my original formula I get the two angles $.861rad$ and $4.003rad$ of which I know the latter is the correct. If I use your formula, substituting $\theta$ for $\alpha$, I get $-.610rad$ to which I can add $\pi$ and arrive at $2.531rad$ which is not either of the expected values. Do you have any advice?  
> **username_1**: @username_0. I added a statement about the ecliptic longitude of the meridian and sidereal time being in the same quadrant. So -0.610 rad that you found for the meridian's longitude and added pi to gives the ecliptic longitude of the meridian = 2.531 radian in the correct quadrant. Adding pi/2 to the longitude of the meridian gives the approximate eastern point = 2.531+pi/2=4.102 radian. So 4.003 radian that you found from your formula is the ecliptic longitude where it rises in the east.  
> **username_0**: Thanks for your comment @username_1, and that works for the original problem, but not for another one. With a sidereal time of 3.575 rad, the two longitudes calculated are 1.449 (Q1) and 4.591 rad (Q3) (the second one is east). $\lambda_m$ is calculated to be 0.467 rad (Q1). Adding $\pi/2$ = 2.0381 rad (Q2) which does not point to the correct answer. I imagine I'm doing something wrong, but can't tell what.  
> **username_1**: 0.467 radians is wrong because it is not in the same quadrant as 3.575 radians. 0.467+pi=3.609 radians is the correct value for the longitude of the meridian, plus pi/2=5.179 radians. So Q3 (4.591) is the longitude to the east.  
> **username_0**: Oh! Keep adding 90 degrees until getting to the same quadrant as $\alpha$, that's the part I wasn't getting. I'll try it again in the morning. Thanks again for all the great help, I think this is what I needed.  
> **username_1**: Actually, add 180 degrees to the arctangent result to get it in the proper quadrant since the arctangent function returns a result in quadrants 1 and 4. Quadrans 3 and 2 are 180 degrees apart from quadrants 1 and 4.  
> **username_0**: Yes, in that case you add 180 degrees, but I believe in general you add 90 degrees until it's in the right quadrant.  Anyway, all of the tests I have tried now pass, and so I'm happy. Thank you so much for your time! I've taken the liberty to add a couple things to your answer which caused me some problems; feel free to revise as needed. You've been a great help :)  
> **username_1**: Thanks for the suggested edits. I accepted them with the correction of adding 180 degrees (not 90) to convert the arctan to the proper value if it is originally in the incorrect quadrant.  
> **username_0**: Sounds good. I just made one small edit then: since we are adding 180 degrees, only need to do that once. Thanks again for all the help.  

---

