A professional-grade, real-time 3D orbital visualization of artificial satellites and natural moons orbiting Mars. This application integrates high-fidelity astrophysical data from NASA's JPL Horizons system with a modern Three.js rendering engine.
- Real-Time Orbital Dynamics: Satellites move along their trajectories in synchronization with Earth's real-time clock.
- High-Fidelity Trajectories: Uses Catmull-Rom spline interpolation to render smooth, continuous orbital paths from discrete NASA vector data.
- Interactive Sidebar: A dedicated control interface for monitoring entity status and filtering objects by country of origin or mission type.
- Contextual Visualization: Hover-state synchronization between the 3D scene and the UI sidebar for immediate orbital identification.
- Scientific Accuracy: Implements planetocentric coordinate scaling to map Astronomical Units (AU) to 3D space relative to the Martian radius.
- Language: Python 3
- Libraries:
astroquery(JPL Horizons interface),json,os - Function: Retrieves 200-point ephemeris arrays for international missions (NASA, ESA, ISRO, UAE, China) and natural satellites (Phobos, Deimos).
- Framework: React 18
- 3D Engine: Three.js / React Three Fiber (R3F)
- Tooling: Vite, @react-three/drei
- Styling: Standard CSS-in-JS for professional, minimal UI overlays.
Mars-Tracker/
├── docs/ # Technical specifications and math logic
├── public/ # Static assets and generated JSON data
│ ├── mars_texture.jpg # 2K Mars surface map
│ └── trajectories.json # Processed NASA vector data
├── src/
│ ├── App.jsx # Main 3D scene and UI logic
│ ├── fetch_data.py # Python engine for data retrieval
│ └── main.jsx # React entry point
├── package.json # Node.js dependencies
└── README.md # Project documentation
Ensure Python 3.8+ is installed. It is recommended to use a virtual environment.
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install astroquery
# Fetch latest trajectory data
python3 src/fetch_data.pyEnsure Node.js is installed.
# Install dependencies
npm install
# Launch the development server
npx viteOnce the development server is active, the application can be accessed via the local network.
Local: http://localhost:5173/
The project utilizes a custom scale factor to translate astrophysical vectors into 3D units. The conversion is based on the ratio of 1 AU to the Martian radius:
Detailed derivations of the coordinate transformations are located in docs/coordinate_transformation.md.
- Automation: Implementation of GitHub Actions for automated daily data synchronization.
- Deployment: Production build optimization for hosting on GitHub Pages.
- Visual Enhancements: Atmospheric scattering shaders for the Martian limb and starfield background integration.