cosinekitty / astronomy

Astronomy Engine: multi-language calculation of Sun, Moon, and planet positions. Predicts lunar phases, eclipses, transits, oppositions, conjunctions, equinoxes, solstices, rise/set times, and other events. Provides vector and angular coordinate transforms among equatorial, ecliptic, horizontal, and galactic orientations.
MIT License
461 stars 63 forks source link

Add Saturn Moons #301

Open sebagr opened 1 year ago

sebagr commented 1 year ago

What would it take to do this? I might be able to try and submit a PR in JS and Python.

cosinekitty commented 1 year ago

I think this would be a great addition to Astronomy Engine! I would definitely welcome a PR for this. Which moons would you want to support? Clearly Titan, but how many of the others? My personal inclination would be to include only those moons visible through a ground-based telescope that an amateur would reasonably own.

One unusual thing about contributing to Astronomy Engine: all of the coding takes place in the generate/template subdirectory. Then you execute the run bash script in Linux or Mac, or the run.bat batch file on Windows, to run the template source through the code generator and execute all the unit tests.

The first step in this task would be to obtain reliable test data and put it in a new directory beneath generate. For example, there is already a directory generate/jupiter_moons, which contains a horizons subdirectory that includes Jupiter moon test data generated by JPL Horizons, and a fortran subdirectory with code from the Observatoire de Paris that I based my calculations on.

Then I would pick either TypeScript or Python to start with. If you start with TypeScript, there is a JavaScript test program test.js in which you can write your unit tests to verify calculations against the test data. (I follow the TDD philosophy of writing tests before implementing the code, but all that really matters is that we end up with complete test coverage.)

For consistency, we should follow the pattern of the data type JupiterMoonsInfo and the function name JupiterMoons. Also follow the pattern of embedding documentation in the source code for both. The build process (run or run.bat) automatically extracts the documentation from source and inserts it into the Markdown so people can refer to it right here on the GitHub repo.

Take a look at the contributor documentation to get an idea of what tools you need installed for your development platform.

Usually this is more work than people realize, so I totally get it if it's more than you bargained for. Just let me know what you think, and I'll be happy to help as you go along. It is a cool project to work on, and it is a satisfying way to contribute to the open source community around the world!

sebagr commented 1 year ago

Thank you for all the info!

It is definitely more than I bargained for, but I'll take a look in the near future and I hope I'm able to contribute to this beautiful project :)

On Wed, Apr 12, 2023 at 12:51 PM Don Cross @.***> wrote:

I think this would be a great addition to Astronomy Engine! I would definitely welcome a PR for this. Which moons would you want to support? Clearly Titan, but how many of the others? My personal inclination would be to include only those moons visible by a ground-based telescope that an amateur would reasonably own.

One unusual thing about contributing to Astronomy Engine: all of the coding takes place in the generate/template https://github.com/cosinekitty/astronomy/tree/master/generate/template subdirectory. Then you execute the run https://github.com/cosinekitty/astronomy/blob/master/generate/run bash script in Linux or Mac, or the run.bat https://github.com/cosinekitty/astronomy/blob/master/generate/run.bat batch file on Windows, to run the template source through the code generator and execute all the unit tests.

The first step in this task would be to obtain reliable test data and put it in a new directory beneath generate. For example, there is already a directory generate/jupiter_moons https://github.com/cosinekitty/astronomy/tree/master/generate/jupiter_moons, which contains a horizons subdirectory that includes Jupiter moon test data generated by JPL Horizons, and a fortran subdirectory with code from the Observatoire de Paris that I based my calculations on.

Then I would pick either TypeScript or Python to start with. If you start with TypeScript, there is a JavaScript test program test.js https://github.com/cosinekitty/astronomy/blob/master/generate/test.js in which you can write your unit tests to verify calculations against the test data. (I tend to follow the TDD philosophy of writing tests before implementing the code, but all that really matters is that we have tests at the end.)

Take a look at the contributor documentation https://github.com/cosinekitty/astronomy/tree/master/generate#source-generator to get an idea of what tools you need installed for your development platform.

Usually this is more work than people realize, so I totally get it if it's more than you bargained for. Just let me know what you think, and I'll be happy to help as you go along. It is a cool project to work on, and it is a satisfying way to contribute to the open source community around the world!

— Reply to this email directly, view it on GitHub https://github.com/cosinekitty/astronomy/issues/301#issuecomment-1505517835, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARGRF4WI4VVX63N7EZ6YXTXA3FPZANCNFSM6AAAAAAW3SLFRY . You are receiving this because you authored the thread.Message ID: @.***>

cosinekitty commented 1 year ago

Thanks for responding, and I want to leave this issue open. Eventually I or someone else will circle back and implement this, because it would be nice to support calculation of Saturn's major moons.