Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexplained discrepancy in Earth-Moon distance test value #1011

Closed
neilberkman opened this issue Oct 26, 2024 · 3 comments
Closed

Unexplained discrepancy in Earth-Moon distance test value #1011

neilberkman opened this issue Oct 26, 2024 · 3 comments

Comments

@neilberkman
Copy link

neilberkman commented Oct 26, 2024

While implementing Earth-Moon distance calculations in a port of skyfield to another language, I noticed a discrepancy in what appears to be a test reference value.

Simple km-to-AU conversion of the typical Earth-Moon distance:

>>> print(f"{384400 / 149597870.700:.15f}")  # typical Earth-Moon distance in km / AU in km  
0.002569555289800

However, I can't find the origin of the value 0.002568451424025 that appears in some tests. This value differs from the raw conversion by about 0.043% (ratio ≈ 1.0004298).

I've searched through the codebase but haven't found this exact value hardcoded. If this value includes corrections beyond the raw km-to-AU conversion, it would be helpful to document what those corrections are. If not, the test value may need to be updated to match the actual conversion.

@brandon-rhodes
Copy link
Member

However, I can't find the origin of the value 0.002568451424025 that appears in some tests.

I don't see the value 0.002568451424025 in any of Skyfield's code — could you clarify where you have run across that value?

@brandon-rhodes
Copy link
Member

As it's now been two months, I'm going to close this issue, as I don't see that number anywhere in Skyfield's code. But I'll be happy to answer further if you'd like to comment on the closed issue with a specific line number where I can find it.

@neilberkman
Copy link
Author

Hey sorry for being non-responsive. I don't recall the issue at this point and I should have closed this out myself. Thanks for taking care of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants