Remix.run Logo
ddahlen 3 days ago

Working on orbital dynamics code for my PhD in astronomy, written in rust, it can accurately calculate the positions of all asteroids/comets to within a few meters. Today I am adding a new numerical integration method which should enable me to predict orbits from observations.

https://github.com/dahlend/kete

I'm working on modeling the motion of observed dust particles coming off of comet 67P, here is are some example 3d plots:

Example of rocks ejected from one position and their possible motions: https://dahlend.github.io/67p_beta_dust.html

Trying to determine possible orbits from a set of observations (the straight lines): https://dahlend.github.io/67p_dust_orbit.html

Shout out to pyvista for making these great 3d plots possible, a little less ergonomic than matplotlib, but it can export directly to html.

nhatcher 3 days ago | parent | next [-]

Hi, this looks amazing! Can't wait to check it out properly tonight. What are you using for numerical integration?

I did this last month: https://www.nhatcher.com/three-body-periodic/ https://github.com/nhatcher/three-body-periodic

There are a couple of half baked integrators there :)

ddahlen 2 days ago | parent [-]

Its an implementation of a pretty standard integrator used by astronomers informally called "RADAU", but it is not exactly the same RADAU you would find elsewhere. Basically it is about as good as you can typically get for multi-step integrators, tuned for speed not precision though.

Note that how the code is laid out you cant really simulate non-solar system masses. Its really aimed at massless objects in the solar system, your 3-body simulations are actually quite difficult to do given the design.

nhatcher 2 days ago | parent [-]

Thanks! Understood, I was more thinking along the lines of reading your code to learn something new. I wish I had infinite time

ddahlen 2 days ago | parent [-]

I suggest the appendix of the arxiv paper if you want to see some of the math required for solar system objects beyond simple Newtonian gravity (like Relativity corrections). I wrote that section specifically because I found it a pain in the ass to source those equations in literature.

anovikov 2 days ago | parent | prev [-]

Meters?? that's certainly an exaggeration