Skip to content

sksat/trochia

Repository files navigation

Trochia

Build Status on GitHub Actions release issues license

trochia: trajectory of rocket and ground-hit-point calculator

Trochia is a rocket flight simulator written by modern C++.

Install

There are pre-built binaries of latest release for some platform.

Please see Release Page for details.

Build from Source

$ git clone https://github.com/sksat/trochia && cd trochia
$ mkdir build && cd build
$ cmake ..
$ make

Usage

Trochia is run from the command line. Please open your terminal and go to your project directory.

$ vim config.toml # write configuration by TOML
$ trochia

Examples

Runnable use cases live in examples/ (one directory each, with config, a plotting script and a committed result plot). For example, the landing-dispersion example sweeps wind speed × direction and plots the ground-hit points — here overlaid on the launch site (Izu Oshima), with the launcher tilted downrange so the whole dispersion falls offshore, clear of land:

landing dispersion on a map

The validation-estes-viking example checks trochia against a real measured flight: its predicted apogee lands within ~1 % of the altimeter reading (39.1 m vs 39 m). The psas-launch12 example scales that up to a real ~5 km high-power flight (validated apogee) and computes the contingency landing zones — nominal recovery vs parachute failure vs CATO.

Python tooling (uv)

The simulator is C++, but a few helper scripts are written in Python. Their dependencies are managed with uv (pinned in pyproject.toml / uv.lock).

$ uv sync                                  # create .venv from the lockfile
$ uv run convert-ghp.py output/85/ghp.csv  # ground-hit-point -> lat/lon for view-ghp.html

convert-ghp.py converts the simulator's ghp.csv output into geographic coordinates (writing ghp-output.js) so the landing dispersion can be overlaid on the map in view-ghp.html.

Author

GitHub: sksat

Twitter: @sksat_tty

License

See LICENSE

About

trajectory of rocket and ground-hit-point calculator

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors