Skip to content

Repository files navigation

日本語 | Bahasa Indonesia

KSPDeltaVForMods

License: MIT Python 3.10+

Delta-V calculator for KSP1 planet pack mods powered by Kopernicus

Overview

KSPDeltaVForMods parses Kopernicus .cfg files and computes orbital mechanics delta-v values including launch-to-orbit, Hohmann transfers, escape burns, and mass ratios with full atmosphere modeling.

Why?

Delta-v maps exist for stock KSP, but not for modded planet packs. If you install a planet pack like Celestial Harmony, you have no reference for how much delta-v you need to reach orbit or transfer between planets. This tool reads the mod's Kopernicus config files and calculates everything automatically.

Key Features

  • Kopernicus ConfigNode Parser -- Handles modifiers, comments, nested nodes, and AnimationCurve keys
  • Delta-V Calculation Engine -- Launch to orbit, Hohmann transfer, escape velocity, Tsiolkovsky rocket equation
  • Atmosphere Modeling -- Cubic Hermite spline interpolation compatible with KSP's AnimationCurve
  • Interactive CLI -- Navigate the celestial body tree and compute routes between bodies
  • GameData Scanner -- Recursively scans a KSP GameData directory and persists parsed data as JSON
  • GUI Frontend -- Vue 3 SPA with 8 pages and interactive D3.js subway-map ΔV route visualization
  • Desktop App -- Tauri v2 Windows executable, no separate install of frontend tooling required

Tech Stack

Layer Technology Notes
Core Library Python 3.10+ Zero external dependencies
CLI Python standalone python run.py -- no pip install required
Backend API FastAPI + Uvicorn REST API with Swagger UI at /docs
Frontend Vue 3 + Vite + TypeScript PrimeVue Aura Dark, vue-i18n (ja/en/id), D3.js
Desktop Tauri v2 (Rust) Windows .exe via GitHub Releases

Getting Started

Prerequisites

  • Python 3.10 or later (required for all modes including the desktop app)

Desktop App

Download the latest Windows .exe installer from GitHub Releases. Python 3.10+ must be installed on your machine -- the app spawns the Python backend automatically.

CLI Usage

git clone https://github.com/yuuka-dev/KSPDeltaVForMods.git
cd KSPDeltaVForMods
python run.py --scan /path/to/KSP/GameData
python run.py --interactive

You can also calculate delta-v for a single config file:

python run.py sample_configs/Sanctar.cfg

Frontend Development

# Start the backend API
pip install -e ".[api,dev]"
uvicorn api:app --reload --port 8000

# Start the frontend dev server
cd frontend && pnpm install && pnpm dev

KSP2 Note

This tool targets KSP1 + Kopernicus only. KSP2 is not supported and there are no plans to support it.

License

MIT

About

Delta-V calculator for Kerbal Space Program 1 planet pack mods — parses Kopernicus configs and computes orbital mechanics with atmospheric modeling

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages