How hesselberth/cnav works
Main Components and Their Roles
• Core Library (Cnav Package):
• The heart of the project is the “cnav” directory which contains Python modules providing core functionality.
• Calculation & Utilities Modules:
• calendar.py, dt.py, dt2.py: Manage calendar computations and date/time arithmetic.
• constants.py: A central repository for astronomical or navigational constants.
• iersch5.py: Likely interacts with IERS data for Earth rotation or similar measurements.
• rot3d.py: Handles three-dimensional rotations – essential for transforming coordinate systems.
• xys.py: Appears to be concerned with coordinate conversions and/or computations.
• Performance Optimization Module:
• cnumba.py: Contains routines that are possibly optimized using numba to speed up calculations.
• External Data Integration:
• webdata.py (with accompanying webdata.ini): Manages configuration and retrieval of external or web-based data that might supplement celestial navigation calculations.
• Testing:
• The “tests” directory holds modules that ensure each chunk of functionality works as expected (e.g., test_calendar.py, test_cip.py).
• CI/CD and Packaging:
• The .github/workflows folder and pyproject.toml denote automated testing/deployment and packaging settings.
Relationships and Data Flow
• “Date & Time Utilities” could aggregate calendar.py, dt.py, dt2.py.
• “Mathematical & Coordinate Calculations” might include iersch5.py, rot3d.py, xys.py.
• “Constants & Optimizations” should highlight constants.py and cnumba.py.
• “External Data Module” should showcase webdata.py (supported by the webdata.ini configuration file).
• Dependency on optimization by showing that parts of the calculations initially done in pure Python are enhanced by cnumba.py.
Architectural Patterns and Design Principles
• Modularity: Each module (or group of modules) encapsulates a specific functional area.
• Separation of Concerns: Configuration (webdata.ini) is separated from core computational logic (modules under cnav), and testing is separated into the “tests” folder.
• Designated external integration via CI/CD with GitHub Actions (.github/workflows).
Additional Detail
Happy diagramming!