From vertical launch to orbital insertion
A two-stage rocket lifts off vertically, performs a brief programmed pitch-over after clearing the lower atmosphere, and then uses nearly velocity-aligned thrust to turn under gravity. Your task is to identify a pitch-over altitude and kick angle that balance downrange acceleration, aerodynamic loading, and orbital insertion.
Thrust accelerates the rocket upward; drag and gravity oppose motion.
A finite steering maneuver establishes a horizontal velocity component.
Thrust follows the velocity direction; gravity curves the flight path.
Stage 1 is discarded, stage 2 burns, and the vehicle coasts after cutoff.
Planar inertial Cartesian equations avoid the launch singularity
Let \(\mathbf r=(x,y)\) be position in an Earth-centered plane, \(\mathbf v=(v_x,v_y)\) inertial velocity, and \(m\) total instantaneous mass. The launch point is \((0,R_E)\). A nonrotating atmosphere is assumed, so atmospheric-relative velocity equals inertial velocity in this simplified model.
Here \(h=\|\mathbf r\|-R_E\), \(q=\tfrac12\rho\|\mathbf v\|^2\), and \(\hat{\mathbf u}\) is thrust direction. During vertical ascent, thrust points along the local radial direction. During the kick it rotates gradually toward the downrange tangent. Afterwards it is aligned with the instantaneous velocity. The drag direction opposes velocity.
After the pitch-over and for nonzero speed, velocity-aligned thrust yields the familiar ideal gravity-turn equation:
Understand pitch deflection before running the full ascent
This deliberately simplified experiment uses constant net acceleration and a fixed direction after an instantaneous pitch change. It omits gravity variation, mass loss, and drag; it is not the rocket ascent solver.
Run the numerical rocket model
Set vehicle parameters, then run a time-stepped fourth-order Runge–Kutta simulation. Mass decreases continuously during burns, and dry stage 1 is dropped at staging. The pitch-over command is a finite-duration steering maneuver, not an instantaneous rotation of the velocity vector.
Where is Max-Q and why does it matter?
Dynamic pressure \(q=\frac12\rho v^2\) increases as the rocket accelerates but decreases as the atmosphere thins. The maximum is an important load indicator, though a complete structural assessment also needs bending, angle of attack, and vehicle-specific limits.
Early, nominal, and late pitch-over
Use identical vehicle and atmosphere parameters for all three trajectories; only the kick altitude changes. Compare peak pressure, altitude, downrange motion, and orbital residuals.
| Strategy | Peak Q (kPa) | Peak altitude (km) | End radial v (m/s) | End tangential v (m/s) |
|---|---|---|---|---|
| Run comparison to populate. | ||||
Search pitch-over altitude and kick angle
A bounded grid search evaluates candidate trajectories. It ranks them by a normalized circular-orbit insertion residual and penalizes violations of the user-selected Max-Q and acceleration limits. This is a parameter sweep, not a globally optimal guidance solution.
Try to meet measurable mission requirements
Keep peak dynamic pressure below the selected Max-Q limit and proper acceleration below its limit.
Compare early and late pitch-over using identical vehicle parameters, and identify the lower peak-Q case.
At the stage-2 cutoff state, target altitude within 10 km, radial speed within 50 m/s, and tangential speed within 100 m/s of circular speed.
Translate the dynamics into engineering software
These are minimal reference implementations of the core continuous dynamics, not complete event-driven staging or optimization scripts. The browser page uses a fixed-step RK4 solver with event handling.
import numpy as np
from scipy.integrate import solve_ivp
mu, Re, g0 = 3.986004418e14, 6371000.0, 9.80665
rho0, H, Cd, A = 1.225, 8500.0, 0.35, 10.0
T, Isp = 7.6e6, 300.0
def ascent_rhs(t, s):
x, y, vx, vy, m = s
r = np.hypot(x, y)
v = np.hypot(vx, vy)
h = max(0.0, r - Re)
rho = rho0*np.exp(-h/H)
drag = 0.5*rho*v*v*Cd*A
radial = np.array([x, y])/r
direction = np.array([vx, vy])/v if v > 1e-6 else radial
acc = (T*direction - drag*direction)/m - mu*radial/r**2
return [vx, vy, acc[0], acc[1], -T/(Isp*g0)]
# Example only: start after vertical liftoff with nonzero speed.
# A full solver must handle pitch-over, propellant exhaustion,
# dry-mass separation, and cutoff as explicit events.% MATLAB core equations for a powered, velocity-aligned segment
mu = 3.986004418e14; Re = 6371000; g0 = 9.80665;
rho0 = 1.225; H = 8500; Cd = 0.35; A = 10;
T = 7.6e6; Isp = 300;
f = @(t,s) ascentRHS(s,mu,Re,rho0,H,Cd,A,T,Isp,g0);
% Start with a nonzero speed; use Events for staging and burnout.
[t,s] = ode45(f,[0 100],[0;Re;0;1;490000]);
function ds = ascentRHS(s,mu,Re,rho0,H,Cd,A,T,Isp,g0)
rvec = s(1:2); vvec = s(3:4); m = s(5);
r = norm(rvec); v = norm(vvec); radial = rvec/r;
if v > 1e-6, direction = vvec/v;
else, direction = radial; end
rho = rho0*exp(-max(0,r-Re)/H);
D = 0.5*rho*v^2*Cd*A;
a = (T-D)*direction/m - mu*rvec/r^3;
ds = [vvec; a; -T/(Isp*g0)];
endode45 and SciPy solve_ivp(method='RK45') are adaptive solvers. The browser model uses fixed-step RK4; vary the timestep and compare outputs to assess numerical convergence.A smooth trajectory is not proof of successful insertion
Verify thrust-to-weight at liftoff, propellant consumption, dry-mass drop, gravity direction, and atmospheric drag.
Repeat with smaller RK4 timesteps; compare peak-Q, cutoff altitude, and final velocity. Event timing introduces additional discretization error.
For a circular orbit, radial velocity must be near zero and tangential velocity near \(\sqrt{\mu/r}\). Altitude alone is insufficient.