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
496 stars 63 forks source link

Expose a planet's orbital period to the library #256

Closed Alexbay218 closed 2 years ago

Alexbay218 commented 2 years ago

Looking a the js library, it doesn't look like the orbital period is exposed. Being able to get the information from the library would be nice, since I've resorted to copying and pasting the planettable into my code.

cosinekitty commented 2 years ago

This does sound reasonable as a feature request. My only caution is that the orbital period is an average only, not a precise concept that can be used for predictions. Out of curiosity, what are you using the orbital period for?

Alexbay218 commented 2 years ago

I'm using it for a game engine, which doesn't need precision. Maybe a disclaimer about the orbital period is good enough? If this doesn't quite fit the scope of the project, I understand. For me at least its only a convenience thing.

cosinekitty commented 2 years ago

That's cool! I will export the orbital periods then. I always like to ask why somebody wants something, because sometimes what they ask for turns out to be different from what they actually need.

Alexbay218 commented 2 years ago

Awesome! Really impressed with how fast this got resolved!