Predict Model Rocket Altitude from Motor Data with Python
Use real thrust curves and simple physics to predict how high your rocket will fly
Last reviewed: March 2026Overview
Every model rocketeer wants to know the answer to one question: how high will it go? The answer depends on the motor's thrust profile, the rocket's mass, its aerodynamic drag, and the local air density. You can calculate this with physics equations, but what if you could also train a machine learning model to predict altitude from those same inputs — and then use it to instantly explore hundreds of motor-and-rocket combinations?
In this project you will download real motor thrust curves from Thrustcurve.org, the definitive database of model rocket motor performance data. You will combine these with basic rocket parameters (mass, diameter, drag coefficient) to simulate flights using a simple Euler integration of the equations of motion, generating a dataset of motor-rocket combinations paired with their peak altitudes.
Then comes the ML: you will train a scikit-learn regression model to predict peak altitude directly from the input parameters — total impulse, average thrust, burn time, rocket mass, and drag area. The result is a fast, reusable prediction tool and a genuine understanding of what drives rocket performance.
What You'll Learn
- ✓ Read and interpret model rocket motor thrust curves from Thrustcurve.org
- ✓ Implement a simple 1D rocket flight simulator using Euler integration in Python
- ✓ Understand the physical factors that determine peak altitude: impulse, mass ratio, and drag
- ✓ Train a regression model with scikit-learn and evaluate its accuracy
- ✓ Use the trained model to explore "what-if" scenarios for motor and rocket selection
Step-by-Step Guide
Download Thrust Curve Data
Visit Thrustcurve.org and download thrust curve files (in RASP .eng format) for 15–25 different motors spanning classes A through E. Each file contains time-thrust pairs that define the motor's burn profile. Parse these files in Python — each line after the header has a time (seconds) and a thrust (newtons).
For each motor, compute: total impulse (area under the thrust-time curve, using the trapezoidal rule), average thrust (total impulse / burn time), peak thrust, and burn time. Store these in a pandas DataFrame. These are your motor features.
Define Rocket Configurations
Create 3–5 representative rocket configurations with different masses and drag characteristics. A light rocket might weigh 40 g with a 25 mm diameter body tube; a heavy one might be 120 g with a 41 mm tube. Assign each a drag coefficient of about 0.5 (typical for a model rocket) and compute the drag reference area (π × d² / 4).
Pair every motor with every rocket configuration to create your full dataset — with 20 motors and 4 rockets, you get 80 data points. This is a classic design-of-experiments approach.
Simulate Flights
Write a simple 1D flight simulator. At each time step (dt = 0.01 s): calculate thrust from the motor curve (interpolated), subtract weight (m × g) and drag (½ × ρ × v² × Cd × A), compute net acceleration, update velocity and altitude. Continue until the rocket returns to the ground.
Record the peak altitude for each simulation. This is your target variable. Spot-check a few results against OpenRocket (free rocket simulation software) to make sure your simulator is in the right ballpark — within 10–20% is fine for this purpose.
Explore the Dataset
Plot peak altitude against each feature: total impulse, average thrust, burn time, rocket mass, and drag area. You should see that total impulse and rocket mass are the strongest predictors. Create a correlation heatmap using seaborn to visualize relationships between all variables.
Check for outliers — sometimes a very heavy rocket on a very small motor barely leaves the launch rod, producing near-zero altitudes that could skew the model. Decide whether to keep or remove these edge cases.
Train and Evaluate the Model
Split the data 80/20. Train a linear regression model first as a baseline, then try a Random Forest regressor for comparison. Evaluate both with R² score and mean absolute error (MAE).
The Random Forest should capture the non-linear relationship between mass ratio and altitude that linear regression misses. Print the feature importances — total impulse and mass should dominate, matching the Tsiolkovsky rocket equation intuition that performance depends on impulse and mass ratio.
Explore What-If Scenarios
Use your trained model as a rapid prediction tool. What altitude would a 60-gram rocket reach on a C6 motor? What if you shaved 10 grams off the airframe? What motor gives the highest altitude for a given rocket? Generate a table of predictions and identify the optimal motor-rocket pairing from your design space.
This is exactly how engineers use ML surrogate models — training on a limited set of simulations, then using the model to explore the design space far faster than running individual simulations.
Career Connection
See how this project connects to real aerospace careers.
Aerospace Engineer →
Propulsion system selection and performance prediction are fundamental aerospace engineering tasks — trade studies like this one happen on every launch vehicle program.
Pilot →
Understanding the relationship between thrust, weight, and drag builds the physical intuition that helps pilots manage performance during takeoff and climb.
Space Operations →
Mission planners evaluate launch vehicle performance for different payload masses and trajectories — the same parameter-sweep approach used here.
Go Further
- Add wind effects to your simulator and include wind speed as a feature in the ML model to predict altitude under real conditions.
- Collect actual flight data from your own launches (using an altimeter like the Jolly Logic AltimeterTwo) and compare measured altitudes to your model's predictions.
- Extend the simulator to 2D (include horizontal distance and wind drift) and predict landing distance as an additional target.
- Try a neural network (MLPRegressor in scikit-learn) and compare its accuracy to the Random Forest on this dataset.