Possible issue with Moon positions
See original GitHub issue@mkbrewer, @dhomeier - I’m moving our discussion in #11753 to a new issue, since I convinced myself that at least it has nothing to do specifically with the use of moon98
. But there does seem something weird with the Moon. Somewhat similarly to @dhomeier’s worry, I had just been checking what happens if I adjust the time a bit, and I find the match is significantly better for a time offset of 0.65 s. It is independent of whether I use the new moon98
or our own implementation, and does not seem to depend on time span I try to cover. Note that there is no such offset for body='earth'
.
This is my test programme:
import numpy as np
from astropy.time import Time
from astropy import units as u
from astropy.coordinates import get_body_barycentric_posvel, get_body_barycentric
t = Time('1990-03-20T12:30:00') + np.linspace(0, 20*u.yr, 800)
time_diffs = np.linspace(-1*u.s, 1.*u.s, 21)
body = 'moon'
dp, dv = get_body_barycentric_posvel(body, t, ephemeris='de432s')
bp = get_body_barycentric(body, t, ephemeris='builtin')
for time_diff in time_diffs:
pos_diff = (bp + time_diff * dv - dp).norm().to(u.km)
print(f'Δt={time_diff:5.2f}, rms={np.sqrt((pos_diff**2).mean()):.2f}')
(Note I use the velocity from JPL so I can also check current master - the velocities are close enough it does not matter much.)
Output
Δt=-1.00 s, rms=53.25 km
Δt=-0.90 s, rms=50.52 km
Δt=-0.80 s, rms=47.82 km
Δt=-0.70 s, rms=45.16 km
Δt=-0.60 s, rms=42.54 km
Δt=-0.50 s, rms=39.96 km
Δt=-0.40 s, rms=37.45 km
Δt=-0.30 s, rms=35.02 km
Δt=-0.20 s, rms=32.67 km
Δt=-0.10 s, rms=30.43 km
Δt= 0.00 s, rms=28.33 km
Δt= 0.10 s, rms=26.41 km
Δt= 0.20 s, rms=24.69 km
Δt= 0.30 s, rms=23.22 km
Δt= 0.40 s, rms=22.07 km
Δt= 0.50 s, rms=21.27 km
Δt= 0.60 s, rms=20.87 km
Δt= 0.70 s, rms=20.90 km
Δt= 0.80 s, rms=21.34 km
Δt= 0.90 s, rms=22.18 km
Δt= 1.00 s, rms=23.37 km
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Moon Phases May Affect Sleep Differently in Men and Women
While the evidence doesn't bear that out, it's possible people might sleep differently during different phases of the moon, a new study ...
Read more >HOW THE MOON AFFECTS US - ĀTHR Beauty
What the science says: some researchers theorize that humans are reacting to subtle changes in the Earth's magnetic field that occur with the...
Read more >What Determines the Moon Phases? - Sky & Telescope
Some people mistakenly believe the phases come from Earth's shadow cast on the Moon. Others think that the Moon changes shape due to...
Read more >The Cause of Moon Phases Name: SOLUTIONS Section:
Figure 1 shows Earth, the Sun, and five different possible positions for the Moon during one full orbit. (dotted line). It is important...
Read more >Sky Tellers - Moon Phases - Lunar and Planetary Institute
From Earth, the Moon's surface looks dark because the illuminated side is facing away from Earth. As our Moon continues its orbit counterclockwise...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mhvk I believe that this issue can now be closed.
Just for completeness in case someone stumbles on this in the future: #11753 now uses
moon98
correctly and will thus fix this issue.