<p>These look good.  The differences are of the order of arc-seconds, which is very small.  I'm impressed that a simple algorithm that can be implemented with a spreadsheet can achieve arc-second accuracy.</p>
<p>So the algorithms seem to be calculating the same thing. But apparently, slightly different algorithms have been used (or slightly different values have been fed to the algorithm). If your worry is that you have done something wrong, then &quot;no&quot; you don't need to be worried.  If you need sub-arc-second accuracy on the position of the sun, then perhaps you need to investigate the assumption in the algorithms used.</p>

CC BY-SA 4.0
2021-06-26T17:59:57.350Z
Thanks for your answer. I've been looking for other algorithms to compare with mine (well, the one in the book) but I haven't found any. Do you know if there any other algorithms available on the Internet to compare? Thanks.
VansFannel
CC BY-SA 4.0
2021-06-26T18:13:06.330Z
I don't know that.
James K
CC BY-SA 4.0
2021-06-26T18:38:10.020Z
@VansFannel Duffett-Smith is pretty popular, but some of his numbers are slightly off (IMHO), but I've only seen his formulas online, not in a printed book, and those sources may be from old editions. Another option is [Jean Meuss](https://en.wikipedia.org/wiki/Jean_Meeus). See an example [here](https://squarewidget.com/solar-coordinates/) that uses a combination of things from Meuss and the USNO.
PM 2Ring
CC BY-SA 4.0
2021-06-26T17:56:52.260Z
2021-06-26T17:56:52.260Z
James K
<p>I'm reading the book &quot;<a href="https://rads.stackoverflow.com/amzn/click/com/B00E3UR5FQ" rel="nofollow noreferrer" rel="nofollow noreferrer">Practical Astronomy with your Calculator or Spreadsheet 4th Edition</a>&quot; implementing its formulas with C++.</p>
<p>Now, I have implemented formula 47 &quot;<strong>Calculating orbits more precisely</strong>&quot;.</p>
<p>I get, with my implementation, that the <strong>right ascension</strong> and <strong>declination</strong> of the Sun on Greenwich date 10 March 1986 at 0 h UT is:</p>
<ul>
<li>right ascension: 23h 20m 1.73s = 350.007226656 = 23.333815110378847</li>
<li>declination: -04º 18' 9.83&quot; = -4.3027310799565921</li>
</ul>
<p>I have checked it with two calculators:</p>
<p>In the <a href="https://www.neoprogrammics.com/de405_usno_ae98/DE405_Sun.php" rel="nofollow noreferrer">Sun Ephemeris Calculator</a> the values are:</p>
<ul>
<li>right ascension: 23h 19m 59.56s = 349.9981665°</li>
<li>declination: -04° 18' 25.97&quot; = -4.307214°</li>
</ul>
<p>And in the <a href="https://www.satellite-calculations.com/Satellite/suncalc.htm" rel="nofollow noreferrer">Sun &amp; Moon Position Calculator</a>, the values are:</p>
<ul>
<li>right ascension: 23h 20m 1.6s = 350.007°</li>
<li>declination: -04° 18' 10.8&quot; = -4.303</li>
</ul>
<p>All of them are different.</p>
<p>Do I have to be worried about it?</p>

CC BY-SA 4.0
2021-06-26T18:15:42.757Z
You can check your calculations against the [Jet Propulsion Laboratory Development Ephemeris](https://en.wikipedia.org/wiki/Jet_Propulsion_Laboratory_Development_Ephemeris). You can access (a lot of) that data via the [Horizons](https://ssd.jpl.nasa.gov/horizons.cgi) website. It's not hard to write code that accesses Horizons, but it's simpler to just use the web interface & copy the results to your own machine.
PM 2Ring
<the-sun><declination><right-ascension>
Sun right ascension and declination at date with different values on different calculators and also with my implementation
VansFannel
# Sun right ascension and declination at date with different values on different calculators and also with my implementation

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

I'm reading the book "[Practical Astronomy with your Calculator or Spreadsheet 4th Edition](https://rads.stackoverflow.com/amzn/click/com/B00E3UR5FQ)" implementing its formulas with C++.

Now, I have implemented formula 47 "**Calculating orbits more precisely**".

I get, with my implementation, that the **right ascension** and **declination** of the Sun on Greenwich date 10 March 1986 at 0 h UT is:

* right ascension: 23h 20m 1.73s = 350.007226656 = 23.333815110378847
* declination: -04º 18' 9.83" = -4.3027310799565921

I have checked it with two calculators:

In the [Sun Ephemeris Calculator](https://www.neoprogrammics.com/de405_usno_ae98/DE405_Sun.php) the values are:

* right ascension: 23h 19m 59.56s = 349.9981665°
* declination: -04° 18' 25.97" = -4.307214°

And in the [Sun & Moon Position Calculator](https://www.satellite-calculations.com/Satellite/suncalc.htm), the values are:

* right ascension: 23h 20m 1.6s = 350.007°
* declination: -04° 18' 10.8" = -4.303

All of them are different.

Do I have to be worried about it?

**Tags:** the-sun, declination, right-ascension
> **Comments:**
> **username_1**: You can check your calculations against the [Jet Propulsion Laboratory Development Ephemeris](https://en.wikipedia.org/wiki/Jet_Propulsion_Laboratory_Development_Ephemeris). You can access (a lot of) that data via the [Horizons](https://ssd.jpl.nasa.gov/horizons.cgi) website. It's not hard to write code that accesses Horizons, but it's simpler to just use the web interface & copy the results to your own machine.  

---

## 1 answers

### Answer by username_2 on 2021-06-26. Score: 1 | Accepted answer

These look good. The differences are of the order of arc-seconds, which is very small. I'm impressed that a simple algorithm that can be implemented with a spreadsheet can achieve arc-second accuracy.

So the algorithms seem to be calculating the same thing. But apparently, slightly different algorithms have been used (or slightly different values have been fed to the algorithm). If your worry is that you have done something wrong, then "no" you don't need to be worried. If you need sub-arc-second accuracy on the position of the sun, then perhaps you need to investigate the assumption in the algorithms used.

> **Comments:**
> **username_0**: Thanks for your answer. I've been looking for other algorithms to compare with mine (well, the one in the book) but I haven't found any. Do you know if there any other algorithms available on the Internet to compare? Thanks.  
> **username_2**: I don't know that.  
> **username_1**: @VansFannel Duffett-Smith is pretty popular, but some of his numbers are slightly off (IMHO), but I've only seen his formulas online, not in a printed book, and those sources may be from old editions. Another option is [Jean Meuss](https://en.wikipedia.org/wiki/Jean_Meeus). See an example [here](https://squarewidget.com/solar-coordinates/) that uses a combination of things from Meuss and the USNO.  

---

