-
Notifications
You must be signed in to change notification settings - Fork 73
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
Predict Jupiter moon shadow and eclipse events #140
Comments
This might be especially interesting since the 2006 analytical model for Jupiter moons that you are using might be more precise than what the S&T app uses. By the way, something I discovered with your library that I find interesting is that the orbital period of the Galilean moons seems to vary. I wonder if that's due to LaPlace resonance. I know that their eccentricity varies due to resonance, but I didn't realize their periods vary too. |
@prideout Yes, it's possible the IMCCE formulas could be more accurate. I'm not sure what Sky & Telescope uses for their predictions, but they have been doing it for a long time. On the other hand, I truncate the IMCCE series to make the code smaller and faster, so it might be less accurate! I omit as many terms as possible while maintaining relative errors (position error divided by the satellite's distance from the center of Jupiter, and the velocity error divided by the satellite's Jovicentric speed) within 3.5e-7. This is especially important for the JavaScript version, where I value small downloads much more than the tiny residual improvement in accuracy. I'm not sure about the physical cause of the orbital periods changing, but it would make sense that it is a resonance effect of the moons on each other. It makes sense from the mathematical model's point of view, because the IMCCE series are representing the orbits as ever-changing ellipses. All 6 Keplerian elements are functions of time in their model. Especially when you allow the semi-major axis value to change with time, it implies a change in orbital period. I believe their models are "semi-analytic", meaning they are based on state-of-the-art numerical integrations (a direct gravity simulation) that is then fed into a best-fit model to produce the series coefficients. So it is possible to construct such a model without even thinking about resonance effects; any such effects will be captured by the original integration. I know, for example, that the VSOP87 model of the planets was based on NASA JPL numerical integrations. |
I'm using the Python variant of your library rather than the JS, does that have the truncation that you describe? I found a paper that has graphs of Io's changing eccentricity and it seems roughly consistent with what I'm seeing with your library. It's hard to find literature about this effect that's actually readable to amateurs like me. By the way I've authored some poor man's eclipse detection code. My strategy was to do point-line distance, where the point is Io's center, and the line goes from the Sun to Jupiter. However this approach approximates the shadow with a cylinder instead of a cone, so maybe you'll think of something smarter. Here it is for reference:
|
Yes, all 4 languages do the same exact numeric calculation, including the truncation. As much as possible, I keep them all numerically identical. The truncation also makes the math faster, which is especially important for the Python version. I think your approximation of the shadow as a cylinder is perfectly fine, because of how far away Jupiter is from the Sun, and how close the moons are to Jupiter. The distance ratios make the cone angles negligible. If you test this against S&T, you will probably find a plus or minus 8 minute error however, because of a plus or minus 1AU change the in the light arrival time as seen from the Earth. That is, unless you already thought of correcting for light travel time! (I can't tell from this snippet of code.) You can take a look at what I did in an experimental image raytracer I wrote in C++: That way you get an accurate prediction of what an observer on the Earth will see through a telescope. |
Just one idea about truncating precision to optimize for download size. Would it be possible to give users of your library a choice? Maybe add an optional build product that is 2x the size and includes increased precision. For my uses, I dont need the extra accuracy, but maybe someone does. |
Hi @offsky, if anyone needs higher precision, I would help them adjust things so they could rebuild the code generator to do less truncation. However, truncated series are only part of the work. There are many places where I took shortcuts, sacrificing an arcsecond or two of accuracy for much smaller code. Just one example: I ignore relativistic corrections for the bending of light rays as they pass near the Sun and planets, and time dilation effects. There are other such things I leave out that would otherwise bloat the code, but only add fractional improvements to accuracy. The big burden would be going through and adjusting the unit tests to validate that the accuracy has actually improved. I believe applications that really need extreme accuracy should use something like NOVAS C 3.1, and bear the burden of storing and accessing the large ephemeris files. Astronomy Engine is trying to fill a niche where you can actually do arcminute-precision calculations in a browser with a very small download of minified JS, and with very little CPU overhead. My mission is to serve the middle ground that I saw was missing: everything I found for astronomy calculation was either (a) too simple and woefully inaccurate or (b) hyper-aggressively accurate at the expense of being unusable in a browser or microcontroller environment. |
This is a little GIF I made using this library combined with skia-python for rendering. It shows the path of Jupiter and Io through space, while staying fixed on Jupiter. Io's radius is exaggerated but otherwise this is drawn to scale. The portion of Io's orbit that is eclipsed is drawn in black. To detect the eclipse, I used something similar to the code snippet I posted earlier. |
@prideout That is really cool! |
Sorry for the spam but I just want to mention that the I'm not familiar with the algorithm that |
Not spam at all! I really enjoy the social/intellectual interaction with like-minded people. That is great to hear that |
Here is an example of the kind of events I want to predict. This text comes from the Sky and Telescope Jupiter's Moon calculator. That tool also produces a nice image of the planet and moons. I am thinking about creating a similar rendering tool as a web page.
The text was updated successfully, but these errors were encountered: