GSoC'18: improving propagators, adding natural and artificial perturbations at Poliastro

By Nikita Astrakhantsev

It was a lazy Sunday at home and nothing prepared me for my girlfriend giving me the link for the GSoC'18 announcement page. I was considering participation a year ago, but had not enough resoluteness for that. This year I wanted it to be different so I started scrolling through the list of open-source organisations. As I am doing a PhD in theoretical physics now (defending in January 2019), I wanted the project to be scientific, not just some boring back-end development (in which I am anyway not strong enough). After a couple of iterations I converged to three space-aimed organisations. What shocked me, was the fact that mostly people of these organizations were not eager to even answer simple questions or it took them a week to provide a dataset for analysis. Only in Poliastro it was easy enough to get in touch with people and they (especially Juan Luis) turned out to be friendly and helpful. In such an atmosphere it is more than possible to work.

After looking project proposal list, I found what I am strong at and made a compilation of three project proposals into my own final proposal and got accepted.

During the GSoC, I was writing a blog on Medium. You can actually see how I was becoming more and more tired till the end as the length of posts was gradually shrinking :) Still, there I was trying to describe all the things we've done and give all the links to merged pull requests. Below I will repeat that in more of a shorter manner, giving links to PRs and corresponding Medium posts :)

So what was done (in chronological order)

  1. Bonding period. Fixed non-smoothness in orbit-plotting, added mean_motion propagator and made it possible to propagate Orbit to desired true anomaly. Added J2_perturbation, atmospheric_drag, fixed Newton method and kepler propagator convergence.
  2. First milestone, first part. Wrote my own DOP853 solver in python!! and optimized Orbit.sample method using now accessible dense output.
  3. First milestone, second part. After a veeery long search for mistake in validation (it actually turned out to be mistake in BOOK, see in the pull request link), added 3rd-body perturbation.
  4. Second milestone, first part. Added solar_drag perturbation, changed the source of docs download and implemented better treatment of parabolic region in mean_motion propagator.
  5. Second milestone, second part. Added J3_perturbations (there we could not validate one of the results and thus consider this feature experimental) and artificial perturbations from the old Juan Luis's code.
  6. Third milestone. Made propagators fasted by using numba and even more faster, added continuous benchmarking of propagators and spent some time documenting and demonstrating new features from this summer.

Conclusion

So, as you can see, quite some work has been done and I got really tired :) However, I want to thank Juan Luis for his continuous assessment and support, for teaching me right code structuring and using github. Juan Luis was always ready to help and save me from any bugs, which made all these contributions possible. This was a real experience and I am happy that I agreed to take part in it :) Now one can plot, for instance, evolution of planet orbits and classical elements over time! Decay of orbit due to atmospheric drag