<ol>
<li><p>I assume you have an algorithm to compute position of the Sun, since you can compute rise and set times.  You will need to compute the position of the Moon in a similar manner.  Then, convert both positions to geocentric ecliptical coordinates (ecliptic latitude and longitude) and use some numerical bisection method (root finder) to find where the difference of the longitudes of the two objects has a root (i.e., becomes zero).  The corresponding JD provides the moment of the geocentric conjunction.</p></li>
<li><p>Calculation of the altitude is a standard procedure - you'll need to convert your ecliptic coordinates to equatorial (right ascension and declination) and then to horizontal (azimuth and altitude).  Finally, correct for the horizontal parallax to convert your geocentric coordinates to topocentric coordinates for the location of the observer.</p></li>
</ol>

CC BY-SA 3.0
2016-07-18T19:24:35.880Z
2016-07-18T19:24:35.880Z
AstroFloyd
<p>Umm al-Qura calendar of Saudi Arabia determine the new moon if <a href="http://www.staff.science.uu.nl/~gent0113/islam/ummalqura.htm">these</a> criteria meet at 29th day:</p>

<ul>
<li>The geocentric conjunction occurs before sunset.</li>
<li>The moon sets after the sun.</li>
</ul>

<p>I've got the formula to calculate when the sun (seen by the observer) sets, considering observer's latitude, longitude, height (altitude from sea level), and the date (Julian Day). I would like to ask the formula to calculate:</p>

<ol>
<li>When (the time) geocentric conjunction happens.</li>
<li>How much (the angle) the altitude of the moon (seen by the observer) at a given time is.</li>
</ol>

<p>Thank you</p>

CC BY-SA 3.0
2015-06-10T05:21:03.323Z
There's a famous scientist quote (maybe Newton?) that says that if the orbit of the Moon were any more complicated it'd make people give up trying to get to the bottom of it and it was just hard enough to give work for thousands of years of the best minds (like Hipparchos, Ptolomy, Muslims, Kepler and Newton) (I don't remember the exact words). If you want a formula that's any good it's going to be a lot more complicated..
user6784
CC BY-SA 3.0
2015-06-10T21:38:36.410Z
I am curious how [KACST](http://www.kacst.edu.sa) calculate it.
fikr4n
CC BY-SA 3.0
2015-06-11T02:27:14.663Z
I don't know. I'd be interested to see too. But such a calendar would often be earlier than the traditional Islamic calendar. You can't code that, however, only look for the Moon. There must be mathematical Islamic calendar more accurate than that one, though. It seems like they made the calendar as simple as possible so people could get the new month from the western newspaper's weather page or something like that. I think there's one where the Moon has to be a x altitude when the Sun is at y altitude and at least this elongation apart, numbers chosen with observation. I like that one better.
user6784
<orbit><the-moon><the-sun><time>
How to calculate geocentric conjunction time and moon altitude at a given time
fikr4n
# How to calculate geocentric conjunction time and moon altitude at a given time

(Asked by: username_0 on 2015-06-09)

Umm al-Qura calendar of Saudi Arabia determine the new moon if [these](http://www.staff.science.uu.nl/~gent0113/islam/ummalqura.htm) criteria meet at 29th day:

* The geocentric conjunction occurs before sunset.
* The moon sets after the sun.

I've got the formula to calculate when the sun (seen by the observer) sets, considering observer's latitude, longitude, height (altitude from sea level), and the date (Julian Day). I would like to ask the formula to calculate:

1. When (the time) geocentric conjunction happens.
2. How much (the angle) the altitude of the moon (seen by the observer) at a given time is.

Thank you

**Tags:** orbit, the-moon, the-sun, time
> **Comments:**
> **username_1**: There's a famous scientist quote (maybe Newton?) that says that if the orbit of the Moon were any more complicated it'd make people give up trying to get to the bottom of it and it was just hard enough to give work for thousands of years of the best minds (like Hipparchos, Ptolomy, Muslims, Kepler and Newton) (I don't remember the exact words). If you want a formula that's any good it's going to be a lot more complicated..  
> **username_0**: I am curious how [KACST](http://www.kacst.edu.sa) calculate it.  
> **username_1**: I don't know. I'd be interested to see too. But such a calendar would often be earlier than the traditional Islamic calendar. You can't code that, however, only look for the Moon. There must be mathematical Islamic calendar more accurate than that one, though. It seems like they made the calendar as simple as possible so people could get the new month from the western newspaper's weather page or something like that. I think there's one where the Moon has to be a x altitude when the Sun is at y altitude and at least this elongation apart, numbers chosen with observation. I like that one better.  

---

## 1 answers

### Answer by username_2 on 2016-07-18. Score: 1

1. I assume you have an algorithm to compute position of the Sun, since you can compute rise and set times. You will need to compute the position of the Moon in a similar manner. Then, convert both positions to geocentric ecliptical coordinates (ecliptic latitude and longitude) and use some numerical bisection method (root finder) to find where the difference of the longitudes of the two objects has a root (i.e., becomes zero). The corresponding JD provides the moment of the geocentric conjunction.
2. Calculation of the altitude is a standard procedure - you'll need to convert your ecliptic coordinates to equatorial (right ascension and declination) and then to horizontal (azimuth and altitude). Finally, correct for the horizontal parallax to convert your geocentric coordinates to topocentric coordinates for the location of the observer.


---

