Imported from ajeet-krish/zenith-desktop (
AGENTS.md). Install upstream withnpx skills add ajeet-krish/zenith-desktop. Copyright stays with the author.
Project Context, Zenith: High-Fidelity Orbital Propagation Engine
Style Rules
- No em dashes or two hyphens (--) in any file. Use standard punctuation.
- C++ code style: 4-space indentation, K&R braces, no tabs, no trailing whitespace.
- Variable naming: snake_case for local variables, PascalCase for structs/classes, SCREAMING_SNAKE_CASE for constants.
- Header-only pattern: All core logic in
.hppfiles with#pragma once. Useinlinefor functions and variables to avoid ODR violations. - Enum classes: All enums use
enum classwith PascalCase values. - Global variables:
g_prefix for inline globals (e.g.,g_mu_earth,g_use_j2). - HTML/CSS: Double quotes for attributes, 2-space indentation, semantic HTML5 elements.
- JavaScript: ES6+ modules where supported, 2-space indentation, single quotes for strings, semicolons required.
- No em dashes in JS/HTML: Use
--or—entity.
Goal
Build and deploy a comprehensive orbital mechanics suite in C++20 as a portfolio piece for Flight Dynamics Analyst roles (MDA, SpaceX, ULA). Covers the full flight dynamics pipeline: parse, propagate, determine, analyze, visualize. Uses Apple Metal GPU compute for parallel propagation of 10,000+ orbits, Dear ImGui + OpenGL for real-time visualization, and Python for orbit determination.
Target Audience
Aerospace hiring managers at MDA, SpaceX, Lockheed Martin, ULA, and similar. The project must communicate: orbit propagation competency (SGP4, numerical integrators, force models), orbit determination skills (batch least-squares, EKF), conjunction assessment, GPU computing (Metal), and engineering communication (interactive visualization, portfolio website).
Hardware
MacBook Pro M5, 16GB unified memory, 10-core GPU. Apple Silicon -- no CUDA support. Use Apple Metal for GPU compute.
Current Status
| Phase | Description | Status |
|---|---|---|
| 1 | Core physics engine (SGP4, Kepler, force models, integrators) | In Progress |
| 2 | Metal GPU pipeline (parallel propagation) | Pending |
| 3 | Analysis modules (conjunction, maneuvers, Monte Carlo, OD) | Pending |
| 4 | Visualization (Dear ImGui + OpenGL desktop app) | Pending |
| 5 | TLE integration & portfolio website | Pending |
| 6 | Polish & advanced features | Pending |
File Layout
zenith/
├── AGENTS.md # This file
├── README.md # Project overview
├── PROJECT_PLAN.md # Comprehensive project plan
├── CMakeLists.txt # Build system
├── .gitignore
│
├── src/
│ ├── core/ # Layer 1: Physics engine (header-only)
│ │ ├── orbit_types.hpp # State vectors, orbital elements, constants
│ │ ├── time_system.hpp # UTC, UT1, TAI, Julian date conversions
│ │ ├── coordinate_frames.hpp # TEME, GCRF, ECEF conversions
│ │ ├── kepler.hpp # Keplerian propagation
│ │ ├── sgp4_parser.hpp # TLE parsing
│ │ ├── sgp4_propagator.hpp # SGP4/SDP4 analytical propagation
│ │ ├── force_models.hpp # J2/J4, drag, SRP, third-body
│ │ └── integrators.hpp # RK4, RK45 (Dormand-Prince)
│ │
│ ├── gpu/ # Layer 2: Metal compute (Phase 2)
│ │ ├── metal_context.hpp
│ │ ├── orbit_kernel.metal
│ │ ├── gpu_propagator.hpp
│ │ └── buffer_pool.hpp
│ │
│ ├── analysis/ # Layer 3: Analysis (Phase 3)
│ │ ├── conjunction.hpp
│ │ ├── ground_track.hpp
│ │ ├── pass_predictor.hpp
│ │ ├── maneuver.hpp
│ │ ├── monte_carlo.hpp
│ │ └── coverage.hpp
│ │
│ ├── viz/ # Layer 4: Visualization (Phase 4)
│ │ ├── orbit_viewer.hpp
│ │ ├── earth_renderer.hpp
│ │ ├── orbit_trail.hpp
│ │ └── imgui_interface.hpp
│ │
│ └── main_propagate.cpp # CLI entry point
│
├── python/
│ ├── pyproject.toml
│ ├── orbit_determination/ # Batch LS + EKF (Phase 3)
│ ├── data/ # TLE fetcher
│ └── postprocess/ # Matplotlib plots
│
├── tests/
│ ├── test_kepler.cpp
│ ├── test_sgp4.cpp
│ ├── test_force_models.cpp
│ ├── test_integrators.cpp
│ └── test_time_system.cpp
│
├── validation/
│ ├── sgp4_test_vectors.txt
│ └── vallado_examples.txt
│
├── docs/ # Portfolio website (Phase 5)
│ ├── index.html
│ ├── orbit-viewer.html
│ ├── theory.html
│ ├── results.html
│ ├── implementation.html
│ ├── css/style.css
│ └── assets/
│
└── .github/workflows/ci.yml
Build Commands
| Command | Description |
|---|---|
cmake -B build && cmake --build build -j |
Build all |
cd build && ./OrbitTests |
Run test suite |
cd build && ./orbit_propagate |
Run propagation CLI |
Key Architecture Decisions
| Decision | Choice | Rationale |
|---|---|---|
| Language | C++20 | Matches lbm-2d/fea-2d, header-only pattern |
| GPU | Apple Metal | Native to M5, unified memory, zero-copy |
| Integrator | Dormand-Prince RK45 | Adaptive step, industry standard, self-starting |
| SGP4 | Vallado reference | Gold standard for validation |
| OD | Python (numpy/scipy) | EKF and batch LS easier in Python |
| Visualization | Dear ImGui + OpenGL | Matches SwarmGNC GCS pattern |
| TLE source | space-track.org | Official NORAD TLE source |
| Testing | Google Test | Same as lbm-2d/fea-2d |
| Build | CMake + FetchContent | Same pattern as existing projects |
