HPR Sim

An open-source flight simulator for hobby and high-power rockets. I designed and released it. I set its accuracy targets and check it against another simulator and against real flights.

Version 0.1.0 came out in October 2026. It’s written in Rust, and you can use it as a Rust library, from Python or from the command line. It’s licensed MIT or Apache-2.0. See the documentation, the source code or a live flight on my home page.

What it does

HPR Sim flies a rocket from the launch rail to the ground, in six degrees of freedom until the parachute opens. It reads OpenRocket designs and flies in measured weather. It also runs repeatable Monte Carlo dispersions. Packages are on crates.io, PyPI, Homebrew and Scoop.

I decide what goes into it and how it’s organized. Every model in it cites its source and has tests, and all 363 design decisions are written down with the reasons for them.

How it’s put together

The core does no input or output, so the same code runs in a browser. HPR Sim’s crates, Rust’s name for packages, at commit 201814d. Each uses only crates in its own layer or below, except that the library can use hpr-net for online data. Every change builds the core for WebAssembly, and the simulator on my home page is that build.

Outside the core

  • hpr-cli the command line
  • hpr-py Python
  • hpr-ffi a C interface, planned
  • hpr-net online weather, terrain and motor data
  • hpr-validate the validation harness

The core

  1. Library

    • hpr one place to set up rockets, motors and flights, using everything below
  2. Analysis

    • hpr-analysis Monte Carlo dispersion, sensitivity, optimization
    • hpr-forensics compares a flight with its simulation
    • hpr-flightdata flight logs: import, filtering, alignment
  3. Formats

    • hpr-io OpenRocket, RockSim and RASAero designs and weather files, read from memory
    • hpr-format HPR Sim’s own open design format
  4. Flight engine

    • hpr-sim six degrees of freedom: rail, integrators, events, recovery, staging
  5. Models

    • hpr-aero aerodynamics: normal force, center of pressure, drag
    • hpr-design the rocket: parts, materials, mass properties, stages
    • hpr-motor solid motors: thrust, mass and inertia over time
    • hpr-atmos atmosphere and wind
  6. Foundation

    • hpr-core math, units, frames, the Earth and its gravity

How I check it

HPR Sim matches RocketPy, another open-source simulator, on all 172 values held to a tolerance. It misses its 5% target on real flights. Verification asks whether HPR Sim computes what its models say it should. For that, it flies the same cases as RocketPy from the same inputs. Validation asks whether the models match the real world, and only flight logs can answer that.

Every change to the code flies the RocketPy comparisons again. If any of their numbers moves, better or worse, the build fails until the change is accepted with a written reason. The OpenRocket and real-flight comparisons need files the build machines don’t have. Their numbers stay as last committed until they’re flown again on a machine that has the files.

The rows run from other simulators to real flights, and the last row is a diagnosis. Each bar counts the values within their tolerance or target, or the apogees within 5%.
  1. Verification
    the build fails if any is out of tolerance

    RocketPy 1.13 plus two of its later fixes, on the same inputsWhole flights of 6 rockets (3 of them again in calm air) and 5 parachute descents

    172 of 172 values within tolerance

  2. Code to code
    a target that doesn’t fail the build

    RocketPy again, each simulator with its own dragWhole flights of 6 rockets

    75 of 102 values within target

  3. Code to code
    each miss over 5% has a written reason

    OpenRocket 24.12, in calm air53 of its example designs and 35 private ones

    79 of 88 apogees within 5%

  4. Validation
    the target is a 5% average miss

    Public altimeter logs from real flightsAverage miss 8.9%, so the target isn’t met

    3 of 12 apogees within 5%

  5. Validation
    the same target

    A private collection of real flight logsAverage miss 12.1%, OpenRocket 11.3%

    12 of 60 apogees within 5%, OpenRocket 13

  6. Diagnosis
    what the misses point to

    7 of the public flights, with the drag from RocketPy’s examplesAverage miss 3.5%. With HPR Sim’s own drag, 2 of 7 were within 5%. The examples’ drag may have been tuned to these flights.

    5 of 7 apogees within 5%

Two of its four requirements are met. The two against real flights aren’t yet. The requirements come from HPR Sim’s roadmap and its build rules.
RequirementHow it’s checkedStatus
Match RocketPy within each value’s tolerance, given the same inputsCode to code, flown again on every change. The build fails if a value is out of tolerance.Met 172 of 172 values
Change no tracked number without a written reasonThe build tracks the numbers from every comparison except the private collectionMet The last change moved 52 numbers, 38 for the worse, and each was accepted in writing
Miss real flights’ apogees by 5% or less on averageValidation against public altimeter logsNot met 8.9% on 12 flights
Be at least as accurate as OpenRocket on the same real flightsValidation against a private collection’s logsNot met 12.1%, OpenRocket 11.3%

A change that made 38 numbers worse

In November HPR Sim got a new model for the drag behind a boattail below Mach 0.8. It’s checked against NACA’s measurements of base drag on the Hermes A-3A. The change moved 52 of the numbers the build tracks, 38 of them for the worse. On the public flights, Erebus 11 and Juno III came closer to their logs, while Bella Lui and Lince got farther off. The private collection’s average miss went from 12.04% to 12.09%. The change was kept anyway, because the new model follows a measurement and isn’t tuned to the flights it’s judged on (decision record 362).

Predictions made before a change stay on record next to today’s numbers. Erebus 11’s committed prediction came in 9.6% low, and today HPR Sim comes in 8.0% low.

Where it misses

Across 12 public flights, HPR Sim misses the logged apogee by 8.9% on average. The target is 5% (Fig. 1). On 60 more flights from a private collection it misses by 12.1%, and OpenRocket by 11.3%. For the 23 of those kept out of any calibration, HPR Sim misses by 16.3% and OpenRocket by 15.0%. All 60 were seen before they were split, so neither group is a blind test.

HPR Sim works out drag from the rocket’s shape. For 7 of the public flights, RocketPy’s examples come with drag data: a team’s table, a constant or a curve from RASAero II or CFD. With the examples’ drag, HPR Sim misses those flights by 3.5% on average. Juno III and Lince still miss by more than 5% with that drag. So drag is the first place to look (Fig. 2). I don’t claim a cause yet for the other 5 public flights or the private collection.

Fig. 1 How far HPR Sim’s apogee is from the altimeter’s on each of the 12 public flights, in percent. Each line runs from the logged apogee, at 0, to where HPR Sim puts it today. The shaded band is the ±5% target. For the lower 5, a prediction was committed before they were compared. None is a blind test, since every logged apogee was already public.
  1. Compared directly: 7 flights, 6.1% average miss

  2. Prometheus, Western Engineering, Spaceport America Cup 2022 −8.9%

  3. Juno III, Projeto Jupiter, Spaceport America Cup 2023 −6.4%

  4. Genesis, EuRoC 2023 −5.9%

  5. Bella Lui, EPFL Rocket Team, 2020 +1.1%

  6. Lince, EuRoC 2023 +4.0%

  7. Cavour, Politecnico di Torino, EuRoC 2023 +5.8%

  8. NDRT 2020, Notre Dame Rocketry Team +10.4%

  9. Predicted first: 5 flights, 12.8% average miss

  10. Macie XL, flight 2 −29.2%

  11. Macie XL, flight 1 −16.2%

  12. Erebus 11, BME Suborbitals, EuRoC 2022 −8.0%

  13. Astra, Faraday Rocketry UPV, EuRoC 2022 −6.5%

  14. Andromeda, Aristotle Space and Aeronautics Team, EuRoC 2022 +4.1%

From HPR Sim’s real-flight, private-collection and validation reports, commit 201814d, November 20, 2026. Its accuracy page lists every check and every known gap.

Fig. 2 Two misses of about 6% shrink to 2.2% or less when only the drag changes. Three public flights, height above the pad over time, to just past apogee. With its own drag, HPR Sim misses Cavour’s apogee by +5.8% and Genesis’s by −5.9%. With the examples’ drag it misses them by −2.2% and −0.1%. For Lince, the example’s drag does worse, −12.2% against +4.0%. The examples’ drag may have been tuned to these flights.
Cavour Politecnico di Torino, EuRoC 2023. Apogee 2,785 m by the altimeter. HPR Sim flies 2,946 m with its own drag (+5.8%) and 2,725 m with the example’s drag (−2.2%).
Genesis EuRoC 2023. Apogee 2,917 m by the altimeter. HPR Sim flies 2,746 m with its own drag (−5.9%) and 2,914 m with the example’s drag (−0.1%).
Lince EuRoC 2023. Apogee 3,588 m by the altimeter. HPR Sim flies 3,733 m with its own drag (+4.0%) and 3,150 m with the example’s drag (−12.2%).

Flown by HPR Sim’s real-flight comparison at commit 201814d. The logs and the examples’ drag are from RocketPy. The curves are lined up where each first passes 30 m.

What’s next

The milestone I’m working on is done when HPR Sim meets the 5% target on real flights. It also has to be at least as accurate as OpenRocket on the same flights. Drag comes first. After that, the real-flight comparisons will cover more than apogee: descent rate, landing point, speed off the rail and drag while coasting.

Release 0.2 will add a flight analyzer. It will read an altimeter log, even without a design file, and put it next to a simulation of the same flight. The rest is on the roadmap, where each milestone names the test that says it’s done.