Solarsystem: A Validated Lightweight Python Package for Planetary Positions and Solar-Lunar Event Calculations

· Source: cs.SE updates on arXiv.org · Field: Science & Research — Space Science & Astronomy, Mathematics & Computational Sciences · Depth: Advanced, extended

Summary

Solarsystem is a lightweight, dependency-free Python package designed for calculating planetary positions and solar-lunar events. It provides heliocentric and geocentric coordinates for major planets, dwarf planets like Pluto, Ceres, and Eris, the Centaur Chiron, and the Moon. The package also computes sunrise, sunset, moonrise, moonset, and lunar illumination, alongside coordinate transformations between spherical/rectangular and ecliptic/equatorial systems. Utilizing analytical models, solarsystem avoids external ephemeris datasets, offering a portable and efficient solution. Validation against JPL DE440 ephemerides via Skyfield showed mean planetary longitude and latitude deviations of approximately 0.44 and 0.16 arcminutes, respectively. Solar and lunar event calculations exhibited timing differences of only a few minutes, while lunar illumination estimates varied by about 0.2%. The package is available on PyPI and GitHub, demonstrating a computational cost of 3.9e-5 per epoch for a 100-year interval.

Key takeaway

For software engineers or research scientists building astronomical applications, you should consider solarsystem for its lightweight, dependency-free approach to planetary and solar-lunar calculations. Its analytical models provide sufficient accuracy for visualization, educational tools, and observational planning, validated against JPL DE440 ephemerides. This allows you to integrate robust astronomical computations without the overhead of large external datasets or complex dependencies, streamlining deployment and reducing computational costs for your projects.

Key insights

Solarsystem offers accurate, dependency-free astronomical calculations via lightweight analytical models, balancing efficiency with scientific utility.

Principles

Method

Planetary positions use analytical approximations of orbital motion with time-dependent orbital elements and perturbation corrections. Moonrise/set employs a two-stage iterative estimation.

In practice

Topics

Code references

Best for: Software Engineer, Research Scientist

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.