High Powered Rocketry Modeling library
Project description
High Powered Rocket Modeling (HPRM)
HPRM is a Python library built on a very fast Rust backend designed for the quick, lightweight modeling and analysis of rocket trajectories. Its primary purpose is to be integrated directly into rocket flight computers to continuously run predictive simulations mid-flight (for example, we use it for the control logic in our AirbrakesV2 project).
Quick Start: Predicting Apogee
Running a prediction is as simple as defining your rocket's physical parameters and passing your initial launch conditions:
from hprm import Rocket, OdeMethod
# Define your rocket's physical characteristics
rocket = Rocket(
mass=17.0,
cd=0.39,
area_drag=0.0182,
area_lift=0.0182,
moment_of_inertia=11.5,
stab_margin_dimensional=0.5,
cl_a=0.2,
)
# Very fast apogee prediction using a 1DOF model
apogee = rocket.predict_apogee_1dof(
initial_height=0.0,
initial_velocity=150.0,
integration_method=OdeMethod.RK45
)
Examples Roadmap
To get familiar with the library, we recommend checking out the provided example scripts (located in the examples/ directory) in this specific order:
predict_apogee.py: The absolute basics—defining a rocket and getting a single peak altitude number.simulate_flight.py: Running a full simulation, extracting the state arrays, and plotting the 1DOF/3DOF trajectories.compare_methods.py: A visual look at how different ODE solvers (RK45, RK3, Euler) impact the simulation path.compare_rocket_params.py: Co-plotting the effects of changing mass, drag, stability margins, MOI, and lift.adaptive_timestep_demo.py: Showing library execution speeds by tweaking the adaptive solver's error tolerances.
Developing for the Library
The long-term vision of this project is to be a toolbox for testing out different rocket models with data-fitted and uncertainty-estimated parameters. While currently supporting 1D-1DoF and 2D-3DoF formats (with a 3D-6DoF format planned), future functionality will allow training the model directly to flight data.
Install Rust
Follow this guide to get Rust setup in VS Code, or figure out how to set it up in your dev environment of choice.
Install uv
We use uv to handle the Python side of this project. It's like pip but much faster. Install it here.
Once you've installed uv, run uv sync --all-extras in the project root to install all the Python dependencies.
Python Bindings (PyPI)
To publish this on PyPi, you need to first build wheels for each platform. Right now the workflow is to do this locally and then upload to PyPI. At a minimum, we build for Linux x86_64 and aarch64 for Python versions 3.10+, including free threaded wheels.
- Always bump the version in
firm_python/Cargo.tomlbefore publishing. - Build the wheels using the provided scripts:
# If you're on Linux
./compile.sh
# If you're on Windows
.\compile.ps1
This will create wheels in the target/wheels directory for Python versions 3.10 to 3.14, for both x86_64 and aarch64.
- Make sure you also generate a source distribution:
uv run maturin sdist
- Use
uvto publish these wheels to PyPI. Make sure you are part of the HPRC organization on PyPI so you have access to the project and can publish new versions.
uv publish target/wheels/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hprm-0.2.0.tar.gz.
File metadata
- Download URL: hprm-0.2.0.tar.gz
- Upload date:
- Size: 195.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
542485e903f33a57892af5169a0446e2a1ba651c22f3312e5a743570692bb462
|
|
| MD5 |
85f411851a1491ab84d5810f96b2db8f
|
|
| BLAKE2b-256 |
ba5661f26a815e9181e943fdaf43edc36ad84d30eb0902a393652197622312bb
|
File details
Details for the file hprm-0.2.0-cp314-cp314t-win_amd64.whl.
File metadata
- Download URL: hprm-0.2.0-cp314-cp314t-win_amd64.whl
- Upload date:
- Size: 182.8 kB
- Tags: CPython 3.14t, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cded711cfee7cc3349282781e8407b773fe8b9f3c887a7cd59b2d37b8e51d52
|
|
| MD5 |
16edf69121aee8ef207f172ec2abb920
|
|
| BLAKE2b-256 |
92407323ba1dd67ff30119e3d93ad646816b33d1099edaa63f0486f4bf7b3275
|
File details
Details for the file hprm-0.2.0-cp314-cp314t-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: hprm-0.2.0-cp314-cp314t-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 298.9 kB
- Tags: CPython 3.14t, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
505e738938a032eb2ab62f58678ad2c18cee70da9a7378cbb5db9a2ef63b8ee9
|
|
| MD5 |
dc22e9d647428a0ac7c5ba00cc0355c6
|
|
| BLAKE2b-256 |
dd19505bd99560e3d2133486a93f059c8808de6e8e0464e1031942f4f2a97498
|
File details
Details for the file hprm-0.2.0-cp314-cp314t-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: hprm-0.2.0-cp314-cp314t-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 289.4 kB
- Tags: CPython 3.14t, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae270d6681c785fec8e186ef4de464fa5c3947ed425ec00f37f24d9bddde94ea
|
|
| MD5 |
40ebdb3f24ec94f52564432548754ed9
|
|
| BLAKE2b-256 |
1ff5ce8712d0fd813d22e3cbc94738dd3caa4c07430b0c84676589de38e63f6c
|
File details
Details for the file hprm-0.2.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: hprm-0.2.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 182.5 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45ddcc80638548e51648f66008f5cd9c1fbed84620cb2abb6ce287f8716f28d8
|
|
| MD5 |
3ee2032a5b8f3bb3829ea1f9f2ab7df2
|
|
| BLAKE2b-256 |
1ca012993dc97137506d62f851fb3a1613b5a95745eb8611beeca4ec58d8ae26
|
File details
Details for the file hprm-0.2.0-cp314-cp314-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: hprm-0.2.0-cp314-cp314-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 298.5 kB
- Tags: CPython 3.14, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2b7e7d6a10d1224eb10681f9a679fa4547bddbad876fb307a99c59c09800542
|
|
| MD5 |
102dfc68e8b4fd4d797cfbe95fe4ac7f
|
|
| BLAKE2b-256 |
a2483826175eaf5843a566b5ecadb7e62526e7c1209e2816e0755e4e6003a1d6
|
File details
Details for the file hprm-0.2.0-cp314-cp314-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: hprm-0.2.0-cp314-cp314-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 290.2 kB
- Tags: CPython 3.14, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cfd29145791d65e1c0b8ae1f90ab4dc78cb67cec83bf0f65f2b470ac0c7a6c6
|
|
| MD5 |
0f1e37610ea70d86865487379ec0fff6
|
|
| BLAKE2b-256 |
7e4e2a1cc23e40f3d688f7e7ea3e2c2dec7c7937218ebe44149677ccc9294c00
|
File details
Details for the file hprm-0.2.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: hprm-0.2.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 182.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2109e8c82959a835f9dec137935882591acb21fc3ac8fe10ff9ec33d2b3c8451
|
|
| MD5 |
1fc1b3a19f22a86ed341a5a91956edf6
|
|
| BLAKE2b-256 |
50d63116b00e991ed8d91e22d367dd2325e18287193aef5fde18349187a7e4d7
|
File details
Details for the file hprm-0.2.0-cp313-cp313-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: hprm-0.2.0-cp313-cp313-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 299.3 kB
- Tags: CPython 3.13, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7fea33185085f00713d43af5249d2b791be388017f0281d635f4063d0bfcd09
|
|
| MD5 |
62df4f60c03cc3dae44da7877d64363a
|
|
| BLAKE2b-256 |
f8d1c6b4b8cc32ed50517d473fae987512831d04144d29bce95b1b10b3c4c0ba
|
File details
Details for the file hprm-0.2.0-cp313-cp313-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: hprm-0.2.0-cp313-cp313-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 290.8 kB
- Tags: CPython 3.13, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cad200810bf3e73e96020f848de81843cc3993b9ab45fd2995ae04035b55eca
|
|
| MD5 |
a174ecb4d016c8c19df139c85441ef4f
|
|
| BLAKE2b-256 |
6e8c336ef1658e7f1df4fe4ae35f4ba2cfd598956ada228a21440ab63b411c41
|
File details
Details for the file hprm-0.2.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: hprm-0.2.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 183.4 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9585c228c00d60a465d644bd4f6365d583e41041c02de3b41901e5c77cf7d614
|
|
| MD5 |
2f5f8d8312ebeb3a77f94ba6d79ba631
|
|
| BLAKE2b-256 |
7306a677d942fd5c0b2f98744760346aea14ede319099f625f92eeb7ea6a6247
|
File details
Details for the file hprm-0.2.0-cp312-cp312-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: hprm-0.2.0-cp312-cp312-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 299.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92f07f1664a1b3738ff73e9bb10005a8793ce3872f354a570dcdc3f06f0a68f3
|
|
| MD5 |
92452b2e0b7451b67cf8f30798e71671
|
|
| BLAKE2b-256 |
86ca752457b83f8f16253a7a073cfdaf9c7cc503d5989320fc5634ac95c2aee5
|
File details
Details for the file hprm-0.2.0-cp312-cp312-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: hprm-0.2.0-cp312-cp312-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 291.6 kB
- Tags: CPython 3.12, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce8c08caa678efb47b5523586d175340a7e76e9fb5e6e5f10fb831afe48f9fdd
|
|
| MD5 |
4f7147e6c50268a6a731b889dd754948
|
|
| BLAKE2b-256 |
ce6a7d68e6ef808eabdbba66d6f887875c223b75dd7881dcd21e479b457b9989
|
File details
Details for the file hprm-0.2.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: hprm-0.2.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 184.7 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
012ba654c19ed0d77eb60ad7612e3bb7fe019f8f2d696a22b04c4d1b70068e95
|
|
| MD5 |
0363b786248634f81c59d2f003dd6a00
|
|
| BLAKE2b-256 |
0833be89e2539090a2acbb174e584ccad2e4a10eb0b8d826b64643260a2e29cb
|
File details
Details for the file hprm-0.2.0-cp311-cp311-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: hprm-0.2.0-cp311-cp311-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 302.2 kB
- Tags: CPython 3.11, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8884e78c36f2785fae84a88790a707d426f0cf9aff30b727efa53f95c2199baa
|
|
| MD5 |
c3aa4389bceb915de79cb8c4ccef6a56
|
|
| BLAKE2b-256 |
2e929e512d7af6e16f1de88163d265856bd68997df8417b8f682fe6934ec7496
|
File details
Details for the file hprm-0.2.0-cp311-cp311-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: hprm-0.2.0-cp311-cp311-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 292.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2230863236e7907ae373adc6f2188bfefa0afbe6d13b3e66a955bfaf1bb245f
|
|
| MD5 |
3ffeaf6fcf05d21f8e875196f7a89218
|
|
| BLAKE2b-256 |
bcbfec6259320636a694306cbd4e687ee9b77b966036dff51e28568abfbef6e9
|
File details
Details for the file hprm-0.2.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: hprm-0.2.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 185.2 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcf3a9435ce257c45df7de9ac603847b3a0140d8e8d9a4951fb01a525f8efcad
|
|
| MD5 |
df0708bc47f718815cc6fc099fbc9aec
|
|
| BLAKE2b-256 |
467ee29b20f37da9d22abe994b785802b2d92bbb4ca96a6d099454549bb1b07f
|
File details
Details for the file hprm-0.2.0-cp310-cp310-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: hprm-0.2.0-cp310-cp310-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 302.6 kB
- Tags: CPython 3.10, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c85bee7fe9be009b355bb9e538c4b61b2323d204a7277e4e1d73661b2e1911a4
|
|
| MD5 |
d481818f382a67303a58eb26da9f1d47
|
|
| BLAKE2b-256 |
7879a6fd4e4043f4e97a6be1f0656bd0a97904a585dc743b86c1779ec95c85a0
|
File details
Details for the file hprm-0.2.0-cp310-cp310-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: hprm-0.2.0-cp310-cp310-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 292.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd0825ef500380838f5258678cdbb773f47ea0850d696f4d15a08e7f54de081f
|
|
| MD5 |
710fc5e7eeab720be58ebda96fd707a0
|
|
| BLAKE2b-256 |
89b4651117e8e2c741882958ef86adb75053ca7257b2404bc199cf3af9b9a7c5
|