DEV Community

Cover image for Vision for Astronoby - Call for contributors and maintainers
Rémy Hannequin
Rémy Hannequin

Posted on

Vision for Astronoby - Call for contributors and maintainers

Genesis

I started building Astronoby in April 2022. My initial ambition was to provide astronomical data in pure Ruby without the need for another programming language or for integrating a third-party API. Astronomical data are by definition universal, they should be accessible and understandable by anyone. They don't belong to a copy-righted website and they should not be accessible only to a niche of programmers.

My goal was to build a Ruby library that could provide data and be self-documented so that the calculations, geometrical and physical notions could be understood by just reading the code.

I was also aiming for decent accuracy, knowing I could never compare with official agencies and institutes or libraries with thousands of contributors for several decades, but good enough to cover most non-professional needs.

Current state

One week ago, version 0.6.0 was released and with it several bug fixes, but also a benchmark to start having a proper look at the accuracy of the library.

The current benchmark could greatly benefit from a more scientific approach and compare more data, but it turns out Astronoby is currently decently accurate. It is a few minutes away from the Sun and the Moon setting and rising times in most cases. The Sun and Moon's coordinates are usually less than half an arc-minute of margin error which represents approximately an angular distance 60 times smaller than the full Moon in the sky (this is not documented at the moment).

However, I have to admit not everything is perfect.

On the self-documented aspect, I have to be honest and say the current implementation does not enable anyone to understand celestial mechanics by just reading the code. There are also some notions I still don't understand myself that I managed to implement anyway.

This certainly didn't help encourage external help from the community. If it requires having access to the same books as me, reading the algorithms and trying to understand how I implemented them to contribute to Astronoby, I know why no one so far submitted a pull request on GitHub for a fix or a new feature. Contributing currently requires more than just Ruby knowledge; it is not newcomers-friendly.

On the accuracy aspect, the library is going to face some limits sooner or later. Because the algorithms are based on books with simplified calculations and definitions, there will always be some imprecision compared to what the current state of knowledge allows us. Even the different books that serve as sources don't always share the same level of precision, or the same methods, which doesn't help find the best and yet still most accurate implementation.

Finally, I regularly discover new sources of knowledge and I understand there are tools and models available for programmers to reach high accuracy but to the cost of having formulas with dozens of terms and absolutely no documentation -readable by a non-PhD person- to help understand celestial mechanics.

Vision for the future of Astronoby

I don't want to lose the battle on both sides. I want Astronoby to be the most accurate and performant astronomy library for Ruby. Still, I also want Astronoby to be a source of knowledge and inspiration for anyone who would like to learn more about how it works or even how to implement it themselves. The Ruby community deserves a Ruby gem that fulfils both of these goals.

I have the feeling Astronoby should be a library made of two distinct yet similar projects.

One could be a project for accuracy. By integrating physical models and with the inspiration of existing important projects like Skyfield or Astropy, this project could focus on providing the most accurate and performant results possible in Ruby. Contributors could help optimise the code, running benchmarks, and covering as many use cases as possible.

Another project could be education. With a focus on the quality of implementation, maintainability, and documentation of both the code and the astronomical concepts, this project would provide "good enough" results with code and documentation that would enable any contributor to help make astronomy more accessible to the community.

To give a practical example, let's take the location of a planet in the sky. To have a decent estimation of coordinates, it is necessary to calculate the mean and true anomaly, to include perturbations of the orbit or perturbations from the observer, and also to define all these concepts so that it's easier to understand what's going on and apply a detailed algorithm. To have a high-quality prediction, there are some models like VSOP or short-period ephemeris like DE 421 to apply formulas and generate extremely high-accuracy results. Both aspects seem relevant and useful to me.

Call for contributors

For too long I have kept the project unwelcoming. It is already difficult to dig into an unknown library and try to help, if it also requires understanding algorithms that I don't always understand myself, there is no way anyone would like to join.

With two projects and two focuses, I want to make Astronoby welcoming to newcomers, either interested in having a high-accuracy astronomy library in Ruby or having an educational astronomy Ruby gem for the community.

To the courageous folks who read until this point, join me and help me build Astronoby for the community. Join a group effort to make Astronoby not only the best astronomy Ruby library but also an efficient, accurate and educational astronomy library for the whole programming community. You can be either a curious developer, a scientist looking for a way to share your knowledge or someone who wants to help the community in any way.

I'm happy to share more ideas I have in mind and to discover ideas from others in the comments section or on GitHub issues. We could also consider having periodic pair-programming sessions work directly on the codebase or Q&A events to learn more about the project and its current state.

Thank you.


Cover picture credit: Pixabay

Top comments (0)