<p>I'm trying to make a game with high accuracy moon position so I followed some equations on <a href="http://www.geoastro.de/elevazmoon/basics/meeus.htm#jd" rel="nofollow noreferrer">geoastro.de Basics of Positional Astronomy and Ephemerides</a> and with some help from the questions answers, I get the same result which they explained in <a href="http://www.geoastro.de/elevazmoon/basics/index.htm" rel="nofollow noreferrer">the example</a>.</p>
<p>but there is problem that is I calculate <strong>declination</strong> and <strong>right ascension</strong> by Pre-calculated values of <strong>ecliptic latitude and longitude</strong> and they didn't explain their equations or any thing about them.</p>
<p>I tried to search and ask, but I did not find anything, or I found very complex equations, and I don't think I will need this complexity.</p>
<p>So is there equation or resource that can help me to calculate <strong>declination</strong> and <strong>right ascension</strong> with limited information (<strong>Julian day</strong> and <strong>(T) number of Julian centuries since 2000/01/01 at 12 UT</strong>) or to calculate <strong>ecliptic latitude and longitude</strong> without very complex equations?</p>
<p><strong>Equations of the moon altitude and azimuth:</strong></p>
<pre><code>1- Julian day = (365.25 * year) + (30.6001 * (month + 1)) - 15 + 1720996.5 + day + hour/24.0


2- T (number of Julian centuries since 2000/01/01 at 12 UT) = (JD - 2451545.0) / 36525.0


3- eps (obliquity of the ecliptic) = 23.0 + 26.0 / 60.0 + 21.448 / 3600.0 - (46.8150 * T + 0.00059 * T * T - 0.001813 * T * T * T) / 3600

Ecliptic latitude (B) = -1.87° (pre-calculated value)
Ecliptic longitude (L) = 131.52° (pre-calculated value)

4- delta (declination) = (180/PI) * arcsin[sin(eps) * cos(Ecliptic latitude) * sin(Ecliptic longitude) + cos(eps) * sin(Ecliptic latitude)]

5- RA (right ascension) = (180/PI) * arctan[(sin(Ecliptic longitude) * cos(eps) - tan(Ecliptic latitude) * sin(eps)) / cos(Ecliptic longitude)]
if arctan result is lower than zero add (PI) to arctan.


6- theta0 (sidereal time (degrees) at Greenwich) = 280.46061837 + 360.98564736629 * (JD - 2451545.0) + 0.000387933 * T * T - T * T * T / 38710000.0


7- theta (local sidereal time at longitude 10° E) = theta0 + longitude (eastern longitudes positive, western negative).


8- tau (local hour angle) = theta - RA


9- altitude = (180/PI) * arcsin[sin(latitude) * sin(delta) + cos(latitude) * cos(delta) * cos(tau)]


10- azimuth = (180/PI) * arctan2[- sin(tau) / (cos(latitude) * tan(delta) - sin(latitude) * cos(tau))]
</code></pre>
<p>Thanks for reading.</p>

CC BY-SA 4.0
2024-06-10T13:06:35.583Z
No but it helped me to get the right way to calculate alt & az and  as I mentioned **"and with some help from the questions, I get the same result which they explained in the example."** But this time I have a problem with **declination** and **right ascension** and **ecliptic latitude and longitude**.
Ahmed Dyaa
CC BY-SA 4.0
2024-06-10T14:23:37.900Z
If you don't need high accuracy, why not just pre-generate the positions of the moon for say, every week for 100 years (using JPL Horizons), and linearly interpolate positions between the two?  High accuracy algorithms are going to have a lot of terms.
Greg Miller
CC BY-SA 4.0
2024-06-10T16:02:54.097Z
I don't understand the question. lots of that is constants, like obliquity of the ecliptic. The others are either precalculated or a function of time, which you know. You say they give the right answer.  Do you want to know how the equations are derived?
Miss Understands
CC BY-SA 4.0
2024-06-10T16:39:21.977Z
They used in example (that I put it's link) a pre-calculated values for **ecliptic latitude and longitude** to calculate **declination** and **right ascension**, **what I want** in my game is to calculate the position of the moon at specific date and time to do that, I **must** have equation for **ecliptic latitude and longitude** to calculate them at the specific date and time that I want **OR** to calculate**declination** and **right ascension** without **ecliptic latitude and longitude**, because I don't have them equation.
Ahmed Dyaa
CC BY-SA 4.0
2024-06-11T09:53:34.380Z
I *think* you are looking for simple analytical equations to predict where the Moon is but unfortunately you're going to be out of luck - the motion of the Moon is sufficiently complex that it has defied many attempts to make a simple, accurate theory. There are relatively simple [low precision methods](http://stjarnhimlen.se/comp/tutorial.html#7) or much more complex high precision methods with hundreds of terms; you will need to decide what precision is acceptable for your use. Take a look at the link above which gives ecliptic lat & long and the sec. 8 after it and see if it meets the needs
astrosnapper
CC BY-SA 4.0
2024-07-02T05:28:21.780Z
I tried to find out any thing but I failed. is there a formulas for **declination** and **right ascension** without **ecliptic latitude and longitude**? or is it impossible?.
Ahmed Dyaa
CC BY-SA 4.0
2024-07-02T15:02:50.637Z
Did you look at Paul Schlyter's site, http://stjarnhimlen.se/ that astrosnapper linked?
PM 2Ring
<the-moon><mathematics><declination><right-ascension><algorithm>
calculate declination and right ascension with limited information
Ahmed Dyaa
# calculate declination and right ascension with limited information

(Asked by: username_0 on 2024-06-10)

I'm trying to make a game with high accuracy moon position so I followed some equations on geoastro.de Basics of Positional Astronomy and Ephemerides and with some help from the questions answers, I get the same result which they explained in the example.
but there is problem that is I calculate declination and right ascension by Pre-calculated values of ecliptic latitude and longitude and they didn't explain their equations or any thing about them.
I tried to search and ask, but I did not find anything, or I found very complex equations, and I don't think I will need this complexity.
So is there equation or resource that can help me to calculate declination and right ascension with limited information (Julian day and (T) number of Julian centuries since 2000/01/01 at 12 UT) or to calculate ecliptic latitude and longitude without very complex equations?
Equations of the moon altitude and azimuth:
1- Julian day = (365.25 * year) + (30.6001 * (month + 1)) - 15 + 1720996.5 + day + hour/24.0


2- T (number of Julian centuries since 2000/01/01 at 12 UT) = (JD - 2451545.0) / 36525.0


3- eps (obliquity of the ecliptic) = 23.0 + 26.0 / 60.0 + 21.448 / 3600.0 - (46.8150 * T + 0.00059 * T * T - 0.001813 * T * T * T) / 3600

Ecliptic latitude (B) = -1.87° (pre-calculated value)
Ecliptic longitude (L) = 131.52° (pre-calculated value)

4- delta (declination) = (180/PI) * arcsin[sin(eps) * cos(Ecliptic latitude) * sin(Ecliptic longitude) + cos(eps) * sin(Ecliptic latitude)]

5- RA (right ascension) = (180/PI) * arctan[(sin(Ecliptic longitude) * cos(eps) - tan(Ecliptic latitude) * sin(eps)) / cos(Ecliptic longitude)]
if arctan result is lower than zero add (PI) to arctan.


6- theta0 (sidereal time (degrees) at Greenwich) = 280.46061837 + 360.98564736629 * (JD - 2451545.0) + 0.000387933 * T * T - T * T * T / 38710000.0


7- theta (local sidereal time at longitude 10° E) = theta0 + longitude (eastern longitudes positive, western negative).


8- tau (local hour angle) = theta - RA


9- altitude = (180/PI) * arcsin[sin(latitude) * sin(delta) + cos(latitude) * cos(delta) * cos(tau)]


10- azimuth = (180/PI) * arctan2[- sin(tau) / (cos(latitude) * tan(delta) - sin(latitude) * cos(tau))]

Thanks for reading.

**Tags:** the-moon, mathematics, declination, right-ascension, algorithm
> **Comments:**
> **username_0**: No but it helped me to get the right way to calculate alt & az and  as I mentioned **"and with some help from the questions, I get the same result which they explained in the example."** But this time I have a problem with **declination** and **right ascension** and **ecliptic latitude and longitude**.  
> **username_1**: If you don't need high accuracy, why not just pre-generate the positions of the moon for say, every week for 100 years (using JPL Horizons), and linearly interpolate positions between the two?  High accuracy algorithms are going to have a lot of terms.  
> **username_2**: I don't understand the question. lots of that is constants, like obliquity of the ecliptic. The others are either precalculated or a function of time, which you know. You say they give the right answer.  Do you want to know how the equations are derived?  
> **username_0**: They used in example (that I put it's link) a pre-calculated values for **ecliptic latitude and longitude** to calculate **declination** and **right ascension**, **what I want** in my game is to calculate the position of the moon at specific date and time to do that, I **must** have equation for **ecliptic latitude and longitude** to calculate them at the specific date and time that I want **OR** to calculate**declination** and **right ascension** without **ecliptic latitude and longitude**, because I don't have them equation.  
> **username_3**: I *think* you are looking for simple analytical equations to predict where the Moon is but unfortunately you're going to be out of luck - the motion of the Moon is sufficiently complex that it has defied many attempts to make a simple, accurate theory. There are relatively simple [low precision methods](http://stjarnhimlen.se/comp/tutorial.html#7) or much more complex high precision methods with hundreds of terms; you will need to decide what precision is acceptable for your use. Take a look at the link above which gives ecliptic lat & long and the sec. 8 after it and see if it meets the needs  
> **username_0**: I tried to find out any thing but I failed. is there a formulas for **declination** and **right ascension** without **ecliptic latitude and longitude**? or is it impossible?.  
> **username_4**: Did you look at Paul Schlyter's site, http://stjarnhimlen.se/ that astrosnapper linked?  

---

## 0 answers

