<p>Using JPL <a href="https://ssd.jpl.nasa.gov/horizons/" rel="noreferrer">Horizons</a>, I found that Earth's aphelion last occurred near the northern winter solstice some time around 9540 BC.</p>
<p>There might be a clever way to get this info from Horizons, but I just used crude estimates and trial &amp; error. This task is a bit tricky. To get accurate results, you need to use the <a href="https://en.m.wikipedia.org/wiki/Terrestrial_Time" rel="noreferrer">Terrestrial Time</a> (TT) scale; in that epoch, the uncertainty in the difference between Universal Time and TT is <a href="https://www.eclipsewise.com/help/uncertainty.html" rel="noreferrer">rather large</a>.</p>
<p>As I mentioned <a href="https://astronomy.stackexchange.com/a/49546/16685">here</a>, the exact time of Earth's perihelion and aphelion is a little wobbly, mostly because of the influence of the Moon. However, the perihelion and aphelion of the Earth-Moon barycentre (EMB) are more stable, although they do get affected slightly by perturbations from the other planets (I assume Jupiter &amp; maybe Venus are the main culprits). Fortunately, in 9542 BC, the aphelion of the EMB and of the Earth itself are fairly closely aligned.</p>
<p>Here's a graph of the distance from the Sun to the Earth (in blue) and to the EMB (in red). The &quot;+1.525e8&quot; means you need to add 152.5 million km to the numbers on the vertical axis. (For reference, the mean radius of the Earth is 6371 km).</p>
<p><a href="https://i.sstatic.net/WwhYt.png" rel="noreferrer"><img src="https://i.sstatic.net/WwhYt.png" alt="Aphelion 9542 BC" /></a></p>
<p>And here's the corresponding graph of the Sun's declination.</p>
<p><a href="https://i.sstatic.net/dVGlb.png" rel="noreferrer"><img src="https://i.sstatic.net/dVGlb.png" alt="Capricorn solstice 9542 BC" /></a></p>
<p>Those graphs say that aphelion and solstice occur around midnight on the 5th of March, 9541 BC, or Julian day -1763363.5. Horizons uses the Julian calendar for dates prior to 1582-Oct-15. The equivalent (proleptic) Gregorian calendar date is the 22nd of December, 9542 BC.</p>
<p>FWIW, the aphelion coincided with the June solstice in 1250 AD. It coincided with the March equinox around 4100 BC, and will coincide with the September equinox around 6450 AD.</p>
<hr />
<p>I just want to say a little more about the variation in the time of perihelion / aphelion. Here's a plot for the year 2000 of the distance from the Sun to the Earth and to the EMB. At this scale, the graphs overlap almost perfectly. That ±~5000 km monthly variation due to the Earth's orbit around the EMB (which you can see in a graph in my linked answer) is pretty small compared to the 5 million km difference between perihelion &amp; aphelion. But as the top graph in this answer shows, we can see the difference if we zoom in close enough.</p>
<p><a href="https://i.sstatic.net/OKtYy.png" rel="noreferrer"><img src="https://i.sstatic.net/OKtYy.png" alt="Distances from Sun to Earth &amp; EMB" /></a></p>
<p>The year doesn't contain a whole number of synodic months, so the effect of the Earth-EMB orbit on the exact time of Earth's perihelion varies from year to year.</p>
<p>Here's an anim covering the years 2000 to 2019 for 30 days around perihelion. The dots are 1 day apart, but the curves were calculated using 6 hour steps. The frame step is a Julian year of 365.25 days, rather than a calendar year, to (mostly) eliminate the shift due to the leapyear cycle.</p>
<p><a href="https://i.sstatic.net/v2V8v.gif" rel="noreferrer"><img src="https://i.sstatic.net/v2V8v.gif" alt="New Anim of perihelion variation" /></a></p>
<p>The previous version of this anim is <a href="https://i.sstatic.net/F86um.gif" rel="noreferrer">https://i.sstatic.net/F86um.gif</a></p>
<hr />
<p>The aphelion plot was done using a slightly updated version of the script in this answer: <a href="https://space.stackexchange.com/a/58339/38535">https://space.stackexchange.com/a/58339/38535</a></p>
<p>The perihelion plot was done using a hacked version of that script. Sorry, but it's a bit too ugly to post. ;)</p>
<p>Here's the Sage / Python <a href="https://sagecell.sagemath.org/?z=eJyVGGtz2kjyu37FRMmeJEeWgcR7u1SpLsSWE3KxYYHdraxDqcZoAMV63czIxknlv1_3zEgCO3UPqgyafk2_u2XbtsmMSZ6yO0bmdUFoVVHOCkkStsrSgsq0LMialzl5X_L0a1kIi8DnT55KyQpy80Cml2QwS4sNGfQGg6B3GvRfWbZtW1aaVyWXhDMf_v5VMyGFpSSt62IlyzITxJBkvI5XdLVlGp9TWWWlzNKbQKarW8YbuvmKZpRflBwoJOPWunki4WOcWws2Wa8Fk-EFzQTzLKvmGdDZWykrMTw5ESIJvlRZUFBBg015d0Kr9GRrjIzXacYC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1FTbhCWjt2y6Ly4UPV2ZSnio5cEwQJZj5DYBIOec3nda4NyxWnPwhL0D70K06hDb1ByWB7b5ehWUDxkL7aFJdSUF10LY_YHFRv49YQfs5mVa0iymWbopcphDoc3TzVbaB7sTSsLlSgnRHr29p3yj5nW6kq6JiaqKUH37LWh1G7f_BwgHR9ftYdnQbHiaKFPC6-savNjtMip3wWo7T4uS2_C05jQ3TcZw0x0TcUZvWAb8drdBgb72-V5hugnbcMaEh2L2mGKVlP2gf4rvaBt1wi_jzyBWdRXf3ici0F3L1ca3uTVKkr2F9AF0hVYMr6_gnWmAR2wh-ER38KSJ1CYEJDBV1O-x4sOZ0gv67QTE_QYWptYVj4pLxVltYGoTwnmyhngqE2yR0yyz_ZbDlHFo32R0dQvegTcmiM5h8KEN2Xt2famhwVJRYcPl6Ea9AikLd6C2_9jaXWvtTlv7Aw_oDUALhfG60-bvlPknh-4wIRBMxpohVlq4veAX8JSRcaKnjFF7XUCCYI1iFgacVWAtc21c_e3YpLWmAQfaAcwlG7sP_BJIBgagCl6Lm4vpHXMVddumgLCLwn0qtwQ2qUITwRXc9kAvsj7ckrFdbmWeuWvQiCau2VjFtrx3p96_ASR2y48=&amp;lang=python" rel="noreferrer">Declination</a> script. Please see the <a href="https://ssd.jpl.nasa.gov/horizons/manual.html#time" rel="noreferrer">Horizons manual</a> for info on the various time formats that Horizons understands.</p>
<p>Here's a <a href="https://sagecell.sagemath.org/?z=eJzNVl1vq0YQfedXjOiDIbYxYDuOkVCbe6NeKVLS6N5KfUgia80uNreGRbAkolH-e2c_bEOcqJXaSrUS4Z09M3PmzOxi27bhutllpABKWiiafM0qEBxXgkHCiydW1RkvLMDPb5nYwjeyYZAVZSMsZbyr-I6VIkvgS8U2vJKhSEFN1BE8S6fLWlS84HmWkB20jFS18s085o0ggMsriJUZArn89Hm_9EcQdpZj3GYi0YmvWJU9MQppxXP4-gV-JYX4gxXgBMvzqTuCy883ngJe7iQtsc0hWC6jTlE1rJl4ZuiDtFhBM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jiYvBBz7ojmEvx--fwsImjW3AhMZEZvcMWkoL4nZfrWS_Am0o7jHWfDGPzk-CE8XF0_jXGp6-Fv8M4bYqklsdKdSnqokawFzYycqDFEI9Muld9EZjhclS0ezlcj-6fRmlVMw==&amp;lang=python" rel="noreferrer">converter</a> for Julian day numbers / Gregorian dates / Julian dates. Note that it uses Astronomical years i.e., 1 AD = year 1, 1 BC = year 0, 2 BC = year -1, etc. The code is also available on <a href="https://gist.github.com/PM2Ring/f078d8d60b7203e423b229fc4afa3a04" rel="noreferrer">GitHub</a>.</p>

CC BY-SA 4.0
2022-06-17T14:07:15.963Z
Wow. This will take me some time to understand and process, but I'm glad that you landed in the same century as W|A with a second data source. I had no idea Horizons existed! What an exciting treasure trove. I'll have a look at the tutorial. I'll probably accept this answer if something even more impressive doesn't show up here. Thank you. p.s. I appreciate the extra info. I was actually wondering about that wobble.
A. Bear
CC BY-SA 4.0
2022-06-17T14:18:24.690Z
@A.Bear No worries. Horizons is awesome. :) It gives you a direct pipeline to the [JPL ephemeris](https://en.wikipedia.org/wiki/Jet_Propulsion_Laboratory_Development_Ephemeris) which has been the source of data for the almanacs produced by the USNO & the British Navy since the mid 1980s. And of course NASA use that data for their space missions.
PM 2Ring
CC BY-SA 4.0
2022-06-17T14:38:46.803Z
"As of DE421, perturbations from 343 asteroids, representing about 90% of the mass of the main asteroid belt, have been included in the dynamical model." <- Wow, this is so impressive. What a fascinating read. The model and code are even open source.
A. Bear
CC BY-SA 4.0
2022-06-18T09:45:14.257Z
Okay, I think I understand it all now. Can you link to or describe the queries you did on Horizons though?
A. Bear
CC BY-SA 4.0
2022-06-18T10:17:41.453Z
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/137184/discussion-between-pm-2ring-and-a-bear).
PM 2Ring
CC BY-SA 4.0
2022-06-17T13:48:18.930Z
2022-08-03T10:20:47.507Z
2022-08-03T10:20:47.507Z
PM 2Ring
<p>I would like to know in what year precisely did Earth's aphelion coincide (within 24 hours) with the northern winter (December) solstice? From what I understand, the day (on any tropical calendar) on which Earth is at aphelion in its orbit changes over time due to axial precession. Is there a reference like an almanac where this is calculated? If not, how do we calculate this ourselves and how precise and accurate can we be?</p>
<p>Edit 1: I just read that maybe the calculation is more complicated because of apsidal precession but I don't really understand now...</p>
<p>Edit 2: My guess is that the date I'm seeking was roughly 13-14 thousand years ago since northern winter solstice was at perihelion in 1246 AD and the period of axial precession is roughly 26 thousand years (so, something kind of like (1246 AD) - (25,772/2 years) = 11641 BC. Wolfram Alpha says this is wrong though because the winter solstice would have been December 14th while the aphelion would have been November 9th. That would be quite a bit off.</p>
<p>Edit 3: I think I brute forced it using Wolfram Alpha although I don't know how accurate this is. It seems that the <a href="https://www.wolframalpha.com/input?i=aphelion%209510%20BC" rel="noreferrer">aphelion</a> and <a href="https://www.wolframalpha.com/input?i=%20winter%20solstice%209510%20BC" rel="noreferrer">winter solstice</a> could have coincided on December 16th, 9510 BC (11532 BP.)</p>

CC BY-SA 4.0
2022-06-14T16:17:13.953Z
If you read that the calculation is more complicated: what and where? What is your guess based on?
planetmaker
CC BY-SA 4.0
2022-06-14T16:27:40.033Z
I read that in the climate section of [this](https://en.wikipedia.org/wiki/Apsidal_precession) article. My guess is just half the precession period plus the time since the Dec. solstice was at perihelion but assumes that that occurred exactly half-way through the period which is likely false but is probably in the ballpark...
A. Bear
CC BY-SA 4.0
2022-06-14T18:39:34.040Z
My guess is you really mean "coincided within 24 hours".  Both the solstice and aphelion are just instants in time, and they likely never coincide exactly.  An implementation of the latest precession algorithm is here: https://www.iausofa.org/2021_0125_C/sofa/pfw06.c
Greg Miller
CC BY-SA 4.0
2022-06-15T04:44:49.400Z
@GregMiller Yes, thanks, I do mean coincide within 24 hours. I edited the question accordingly. I'll have a look at the code.
A. Bear
<orbit><precession><solstice>
When exactly was the last time that Earth's aphelion coincided (within 24 hours) with the northern winter (December) solstice?
A. Bear
# When exactly was the last time that Earth's aphelion coincided (within 24 hours) with the northern winter (December) solstice?

(Asked by: username_0 on 2022-06-14)

I would like to know in what year precisely did Earth's aphelion coincide (within 24 hours) with the northern winter (December) solstice? From what I understand, the day (on any tropical calendar) on which Earth is at aphelion in its orbit changes over time due to axial precession. Is there a reference like an almanac where this is calculated? If not, how do we calculate this ourselves and how precise and accurate can we be?

Edit 1: I just read that maybe the calculation is more complicated because of apsidal precession but I don't really understand now...

Edit 2: My guess is that the date I'm seeking was roughly 13-14 thousand years ago since northern winter solstice was at perihelion in 1246 AD and the period of axial precession is roughly 26 thousand years (so, something kind of like (1246 AD) - (25,772/2 years) = 11641 BC. Wolfram Alpha says this is wrong though because the winter solstice would have been December 14th while the aphelion would have been November 9th. That would be quite a bit off.

Edit 3: I think I brute forced it using Wolfram Alpha although I don't know how accurate this is. It seems that the [aphelion](https://www.wolframalpha.com/input?i=aphelion%209510%20BC) and [winter solstice](https://www.wolframalpha.com/input?i=%20winter%20solstice%209510%20BC) could have coincided on December 16th, 9510 BC (11532 BP.)

**Tags:** orbit, precession, solstice

> **Comments:**
> **username_1**: If you read that the calculation is more complicated: what and where? What is your guess based on?  
> **username_0**: I read that in the climate section of [this](https://en.wikipedia.org/wiki/Apsidal_precession) article. My guess is just half the precession period plus the time since the Dec. solstice was at perihelion but assumes that that occurred exactly half-way through the period which is likely false but is probably in the ballpark...  
> **username_2**: My guess is you really mean "coincided within 24 hours".  Both the solstice and aphelion are just instants in time, and they likely never coincide exactly.  An implementation of the latest precession algorithm is here: https://www.iausofa.org/2021_0125_C/sofa/pfw06.c  
> **username_0**: @username_2 Yes, thanks, I do mean coincide within 24 hours. I edited the question accordingly. I'll have a look at the code.  

---

## 1 answers

### Answer by username_3 on 2022-06-17. Score: 12 | Accepted answer

Using JPL [Horizons](https://ssd.jpl.nasa.gov/horizons/), I found that Earth's aphelion last occurred near the northern winter solstice some time around 9540 BC.

There might be a clever way to get this info from Horizons, but I just used crude estimates and trial & error. This task is a bit tricky. To get accurate results, you need to use the [Terrestrial Time](https://en.m.wikipedia.org/wiki/Terrestrial_Time) (TT) scale; in that epoch, the uncertainty in the difference between Universal Time and TT is [rather large](https://www.eclipsewise.com/help/uncertainty.html).

As I mentioned [here](https://astronomy.stackexchange.com/a/49546/16685), the exact time of Earth's perihelion and aphelion is a little wobbly, mostly because of the influence of the Moon. However, the perihelion and aphelion of the Earth-Moon barycentre (EMB) are more stable, although they do get affected slightly by perturbations from the other planets (I assume Jupiter & maybe Venus are the main culprits). Fortunately, in 9542 BC, the aphelion of the EMB and of the Earth itself are fairly closely aligned.

Here's a graph of the distance from the Sun to the Earth (in blue) and to the EMB (in red). The "+1.525e8" means you need to add 152.5 million km to the numbers on the vertical axis. (For reference, the mean radius of the Earth is 6371 km).

[![Aphelion 9542 BC](https://i.sstatic.net/WwhYt.png)](https://i.sstatic.net/WwhYt.png)

And here's the corresponding graph of the Sun's declination.

[![Capricorn solstice 9542 BC](https://i.sstatic.net/dVGlb.png)](https://i.sstatic.net/dVGlb.png)

Those graphs say that aphelion and solstice occur around midnight on the 5th of March, 9541 BC, or Julian day -1763363.5. Horizons uses the Julian calendar for dates prior to 1582-Oct-15. The equivalent (proleptic) Gregorian calendar date is the 22nd of December, 9542 BC.

FWIW, the aphelion coincided with the June solstice in 1250 AD. It coincided with the March equinox around 4100 BC, and will coincide with the September equinox around 6450 AD.

---

I just want to say a little more about the variation in the time of perihelion / aphelion. Here's a plot for the year 2000 of the distance from the Sun to the Earth and to the EMB. At this scale, the graphs overlap almost perfectly. That ±~5000 km monthly variation due to the Earth's orbit around the EMB (which you can see in a graph in my linked answer) is pretty small compared to the 5 million km difference between perihelion & aphelion. But as the top graph in this answer shows, we can see the difference if we zoom in close enough.

[![Distances from Sun to Earth & EMB](https://i.sstatic.net/OKtYy.png)](https://i.sstatic.net/OKtYy.png)

The year doesn't contain a whole number of synodic months, so the effect of the Earth-EMB orbit on the exact time of Earth's perihelion varies from year to year.

Here's an anim covering the years 2000 to 2019 for 30 days around perihelion. The dots are 1 day apart, but the curves were calculated using 6 hour steps. The frame step is a Julian year of 365.25 days, rather than a calendar year, to (mostly) eliminate the shift due to the leapyear cycle.

[![New Anim of perihelion variation](https://i.sstatic.net/v2V8v.gif)](https://i.sstatic.net/v2V8v.gif)

The previous version of this anim is <https://i.sstatic.net/F86um.gif>

---

The aphelion plot was done using a slightly updated version of the script in this answer: <https://space.stackexchange.com/a/58339/38535>

The perihelion plot was done using a hacked version of that script. Sorry, but it's a bit too ugly to post. ;)

Here's the Sage / Python [Declination](https://sagecell.sagemath.org/?z=eJyVGGtz2kjyu37FRMmeJEeWgcR7u1SpLsSWE3KxYYHdraxDqcZoAMV63czIxknlv1_3zEgCO3UPqgyafk2_u2XbtsmMSZ6yO0bmdUFoVVHOCkkStsrSgsq0LMialzl5X_L0a1kIi8DnT55KyQpy80Cml2QwS4sNGfQGg6B3GvRfWbZtW1aaVyWXhDMf_v5VMyGFpSSt62IlyzITxJBkvI5XdLVlGp9TWWWlzNKbQKarW8YbuvmKZpRflBwoJOPWunki4WOcWws2Wa8Fk-EFzQTzLKvmGdDZWykrMTw5ESIJvlRZUFBBg015d0Kr9GRrjIzXacYCgNgWfMV3jAt0BLD3gx7YBgaS32payFSmTFjPiPr0AzISEkxAj67IbET-Rs6jM40-IgNAN-59jHu9hxv9BbjoYyP17wH5WIJ1XWxEmjDOACLTnBmyV6-fkM0nH0ezjgYuGTyh2ZY1J7TYZEwH7YYKFq_yBE2F8-Xon1EcTd9Hl-GnaG6dTS4vR1fnYb9nKWC8-DSNwsnbeTT7I5pZZ9HVIpqFzmmv9-bVr7861m-_j64W48U4mofOwLFm0UU8_zRfgDRnfDa7cKyz0cf4YjK7HC1C5-1k8d6xFuPLKD4fvxsvgOdyfPX7Ipo71ujqXUt3Hr0DwHQ6msF1oTMazz5Gc6A5m__R0nxCpsnbD_H5aDEKnauJo81706aam9OdSL-yMC2k-9rzrIStyZrJ1TZOqKSukJRLnwhZVvjNKm-oMl_7Zo3Snr14MZ9cWN8an3235ovRbBGjCaHzTUn47gBwMu1gZaVA0TSej__SIIYgEBaB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Vlq4veAX8JSRcaKnjFF7XUCCYI1iFgacVWAtc21c_e3YpLWmAQfaAcwlG7sP_BJIBgagCl6Lm4vpHXMVddumgLCLwn0qtwQ2qUITwRXc9kAvsj7ckrFdbmWeuWvQiCau2VjFtrx3p96_ASR2y48=&lang=python) script. Please see the [Horizons manual](https://ssd.jpl.nasa.gov/horizons/manual.html#time) for info on the various time formats that Horizons understands.

Here's a [converter](https://sagecell.sagemath.org/?z=eJzNVl1vq0YQfedXjOiDIbYxYDuOkVCbe6NeKVLS6N5KfUgia80uNreGRbAkolH-e2c_bEOcqJXaSrUS4Z09M3PmzOxi27bhutllpABKWiiafM0qEBxXgkHCiydW1RkvLMDPb5nYwjeyYZAVZSMsZbyr-I6VIkvgS8U2vJKhSEFN1BE8S6fLWlS84HmWkB20jFS18s085o0ggMsriJUZArn89Hm_9EcQdpZj3GYi0YmvWJU9MQppxXP4-gV-JYX4gxXgBMvzqTuCy883ngJe7iQtsc0hWC6jTlE1rJl4ZuiDtFhBMYMq-0i_I4qns26FKOtoMmGF95z9npWMZsTj1WYiVxPttUIvBT5V1gdS19mmQN4ostgytVkLUoms2AARUHBegBH8mhQNqVqpymwRTFGJEZQHvU30PXflccufmEoUzpTP7I3PsUcHN91aFEigEOsW7m4g_CrJhH4Yen7ghRdaRkqRtWm_YFVKEmYw515w3pdnk9XC26DozdpLeD65u1ExJ6m_uKAX9NxfL0J_ymbhdB2GyzSZkZRMiT-zbNu2rCwveSWgYpb1A_ySpjUTkPLqVM_aQ4AaS65QMQ6M3PUhq8HHz_hnth6HS2uj6l5pFI5TsAiDIFha33XD3tgXlkVZCsapzelK8NV3WjjtCHLMgH_ZU85prB9upGpv5S7G0EYnhyEscZxDV-_CEKe4hTEEap2M0HQAo2vg-xpJJbJPeAgJnEEwO_eXC5hMYIaWVlsCtVaOFRNNVUh_wOy4O5_i19CViLkuCYuQtRwrcz4ohiI3hyLbHhEXo866JdBjCRhIE3QPAajmeqb4TrUM7_gE73jMJXNlzk885tM3DhIcfNSD8NgDIxAqjRkSpeHQuAzlIaNGJD0U_03fVXf7Y_fPenlk-5e97KXt9_J_3K73m1TiS4SpqvHfFFoSeYYr-6E-c8buj84DHboPV8Pe09YsiUi2Esu8Gt8sydZBXzyRGEq_mVIDwXvklhdMx1c5Krz9HPsTofplgfcSIiO749zhLn33Qhpl7qV_46oLrcGrVCfyNhVvSgern-LF7T72WJjNwD3SkHfHuO3JpDNoddJc7IfWOBlUar-0Efhz-jp-ySM_xAeVD7x1sRyCUV9ejcCy0JU0Ont5denXV7cRrrDidPAi9--lyX6MgL4O3C5Sv22kNpLPmcZqo_3o9qD6an8D1UYFVZRwajUhHP3ObNMsEQ5SiNE8MgrpLPHpfSdd9yAdPz49SBKkMGZyMafXlLLfDvbYOvAIZ_NgPpuj6Sf1TiSJUERXDo4zi7-xHUsEr5wBsjOUTNKBV5e7TDj4Q6U2qJVoSxYPKkIzPhjBjqzZLh4MXKxUszieecUEv8cd-TvD0dOpP7mmoceIWhp5iGJnYCjiYvBBz7ojmEvx--fwsImjW3AhMZEZvcMWkoL4nZfrWS_Am0o7jHWfDGPzk-CE8XF0_jXGp6-Fv8M4bYqklsdKdSnqokawFzYycqDFEI9Muld9EZjhclS0ezlcj-6fRmlVMw==&lang=python) for Julian day numbers / Gregorian dates / Julian dates. Note that it uses Astronomical years i.e., 1 AD = year 1, 1 BC = year 0, 2 BC = year -1, etc. The code is also available on [GitHub](https://gist.github.com/username_3/f078d8d60b7203e423b229fc4afa3a04).

> **Comments:**
> **username_0**: Wow. This will take me some time to understand and process, but I'm glad that you landed in the same century as W|A with a second data source. I had no idea Horizons existed! What an exciting treasure trove. I'll have a look at the tutorial. I'll probably accept this answer if something even more impressive doesn't show up here. Thank you. p.s. I appreciate the extra info. I was actually wondering about that wobble.  
> **username_3**: @username_0 No worries. Horizons is awesome. :) It gives you a direct pipeline to the [JPL ephemeris](https://en.wikipedia.org/wiki/Jet_Propulsion_Laboratory_Development_Ephemeris) which has been the source of data for the almanacs produced by the USNO & the British Navy since the mid 1980s. And of course NASA use that data for their space missions.  
> **username_0**: "As of DE421, perturbations from 343 asteroids, representing about 90% of the mass of the main asteroid belt, have been included in the dynamical model." <- Wow, this is so impressive. What a fascinating read. The model and code are even open source.  
> **username_0**: Okay, I think I understand it all now. Can you link to or describe the queries you did on Horizons though?  
> **username_3**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/137184/discussion-between-username_3-and-a-username_0).  

---

