running...
How to use
Choose a preset or set the entry speed, angle, ballistic coefficient and lift. The capsule flies the integrated trajectory; the glow and the trail colour show the stagnation-point heat flux. Try a steep angle (high g, short heating pulse), a shallow angle with lift (the vehicle skips back out into space), and a heavy blunt vehicle (high beta) that dives deeper before slowing. Keep peak deceleration under about 4 g for a crew.
The science
Equations of motion (point mass, spherical non-rotating Earth, flight-path angle gamma below horizontal, radius r = R + h):
dh/dt = -v sin(gamma)
dv/dt = -rho v^2 / (2 beta) + g sin(gamma)
v dgamma/dt = (g - v^2 / r) cos(gamma) - (L/D) rho v^2 / (2 beta)
with beta = m / (Cd A) the ballistic coefficient, an exponential atmosphere rho = 1.225 exp(-h / H) with H = 7.2 km, and g = mu / r^2.
Heating. The stagnation-point convective heat flux follows the Sutton-Graves correlation
q = 1.74e-4 sqrt(rho / Rn) v^3 (W/m2, SI units)
so a blunt nose (large Rn) is cooler. Allen and Eggers showed that for a steep ballistic entry without gravity the peak deceleration is independent of beta:
a_max = v_e^2 sin(gamma) / (2 e H)
which the checks below reproduce numerically.
Honest simplifications. No radiative heating (important above about 10 km/s), no real-gas effects, a constant L/D that always points up, a single exponential atmosphere, no rotation or winds and no guidance. Real capsules roll the lift vector to steer. Numbers are illustrative for a generic blunt vehicle, not for any specific spacecraft. This is the 2D trajectory companion to the 3D reentry visualiser, whose control values it reuses (speed, angle, ballistic coefficient and lift) with real equations behind them.