An open API service indexing awesome lists of open source software.

https://github.com/muichi-mon/dragonfly

A Java-based space mission simulator, from Earth to Titan, that models the Solar System with N-body physics.
https://github.com/muichi-mon/dragonfly

dynamic-system-modeling n-body-problem n-body-simulation ode-model ode-solver space-exploration space-mission space-mission-design

Last synced: 28 days ago
JSON representation

A Java-based space mission simulator, from Earth to Titan, that models the Solar System with N-body physics.

Awesome Lists containing this project

README

          

# πŸš€ Space Odyssey to Titan

A Java-based simulation of an interplanetary mission from Earth to Titan, Saturn’s largest moon β€” complete with **n-body simulation**, **ODE solvers**, **dynamic systems**, and **trajectory optimization** using **gradient descent**.

## πŸ“– Overview

This project models a naive space mission scenario where a probe is launched from Earth and navigates the Solar System to reach Titan. The system simulates gravitational interactions between multiple celestial bodies and computes the spacecraft's trajectory using various numerical ODE solvers.

The project also implements **random-restart finite-difference gradient descent** to search for the optimal initial probe state vector (position and velocity) that results in a successful Titan rendezvous.

---

## ✨ Features

- **3D N-body Simulation** of planets, moons, and spacecraft
- **Numerical ODE Solvers**: Euler, RK4, and more
- **Dynamic Solar System Model** with configurable bodies
- **Trajectory Optimization** using gradient descent
- **Random Initial State Exploration** for broad search space coverage
- **JavaFX 3D Visualization** of the Solar System and probe path

---

## πŸ›  Tech Stack

- **Language**: Java 17+
- **UI**: JavaFX 3D Visualization
- **Math Libraries**: Custom vector and matrix utilities
- **ODE Solvers**: Custom implementations of Euler and RK4
- **Optimization**: Gradient descent with random restarts

---

## πŸ“‚ Project Structure

```bash
dragonfly/
β”œβ”€β”€ src/main/java/io/github/rajveer/dragonfly/
β”‚ β”œβ”€β”€ gui/ # GUI setup and controller
β”‚ β”œβ”€β”€ missions/ # Mission planning & optimization
β”‚ β”œβ”€β”€ ode/ # ODE solver implementations (Euler, RK4, etc.)
β”‚ β”œβ”€β”€ simulation/ # Example simulations for other dynamic systems
β”‚ β”œβ”€β”€ systems/ # System models (e.g., Solar System)
β”‚ β”œβ”€β”€ utils/ # Math & helper utilities
β”‚ └── SolarSystem3D.java # JavaFX 3D visualization entry point
β”œβ”€β”€ src/main/resources/ # Textures, configs, assets
└── pom.xml # Maven project file
```

## βš™οΈ Getting Started

### Prerequisites
- Java 17 or later
- Maven or Gradle build system

### Running the Simulation
```bash
# Clone the repository
git clone https://github.com/muichi-mon/dragonfly.git
cd dragonfly
```
```bash
# Compile and run
mvn clean install
mvn clean javafx:run
```
---

## πŸ“ˆ Example Interface

### GUI Solar System Simulation
![Solar System GUI](src/main/resources/io/github/rajveer/dragonfly/gui.jpg)