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

MOID calculation at a given timestep #776

Open
tamidodo opened this issue Jun 12, 2024 · 7 comments
Open

MOID calculation at a given timestep #776

tamidodo opened this issue Jun 12, 2024 · 7 comments

Comments

@tamidodo
Copy link

There are C++ libraries (https://sourceforge.net/projects/distlink/) to calculate the MOID between two orbits but it would be really useful to integrate something like that into the REBOUND package so a user can collect that value the same way you can get orbital elements with respect to a primary body at a given timestep.

@hannorein
Copy link
Owner

Hi Tammy,

That would be a nice feature. I don't have any experience with this myself. Do you know if this implementation is any good? The code looks relatively clean, relatively short, and could probably be easily ported over to C. It doesn't include any license, so one should probably get in touch with the author beforehand and ask if it's ok to include.

Hanno

@tamidodo
Copy link
Author

A recent paper used rebound to integrate a large number of fireballs and JFCs, somehow integrating this code into their runs such that they could get the MOID at every timestep they collected the orbital elements and positional information so it has been done, they just don't describe in any detail how exactly they did that and their code isn't public... I was considering reaching out to these folks to ask how they did it but I figured this would also just be a useful addition to the rebound package in general. Should I reach out to the authors then?

https://arxiv.org/pdf/2405.08224
https://www.sciencedirect.com/science/article/abs/pii/S2213133718301173

@hannorein
Copy link
Owner

I think the C++ code that you posted a link to is enough! I'd probably rather e-mail the authors of that...

I don't quite understand the point of calculating MOID every timestep? Isn't the idea that you input two keplerian orbits and get an answer that, ignoring planet interactions, is constant?

@tamidodo
Copy link
Author

The point is that over time, the orbital elements of one of the objects is changing, due to interactions with planets and radiative forces. I'm interested in finding the MOID between Jupiter and the meteoroid over time, as it is relevant to classifying the orbit of the meteoroid.

Would you like me to email the authors of the C++ code and cc you on it?

@hannorein
Copy link
Owner

That would be great! Ask them if it's ok if we include their algorithm into REBOUND, with the proper attribution of course.

@hannorein
Copy link
Owner

@tamidodo Thanks for asking for permission.

I'm not sure if you want to have a go at it or not. If so feel free to go ahead! I can work on it myself but I will probably not get to it until at least a couple of weeks.

In either case, here's a checklist:

  • We will only ever use the code in double precession, so we can get rid of the generalization to float and long double.
  • Convert code to C99. Should be straightforward. Need to think about the complex data type
  • The orbit structure can probably be removed and replaced with the REBOUND orbit structure.
  • Think about which coordinate system to use by default. Heliocentric? Jacobi? This is not clear to me yet.
  • Add references to code and documentation
    Baluev, R. V. & Mikryukov, D. V., 2019, Astronomy & Computing, V. 27, P. 11-22
    Baluev, R. V., 2021, Astronomy & Computing, V. 34, article id. 100440
  • Write unit tests
  • Write documentation (at least one C and one python example)

@hannorein
Copy link
Owner

I have not forgotten about this! I looked into it a bit. But their algorithm offers a several different options with different solvers, ways to check the convergence. I am feeling a bit overwhelmed by this because I'm just not very familiar with the possible use cases. If you @tamidodo (or someone) else has use this MOID algorithm and can provide a bit of guidance, that would be most appreciated.

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