A ballistic capsule entering the atmosphere: altitude-versus-range path coloured by heat flux, deceleration and stagnation heating along the way.
The science
The capsule is a point mass without lift falling through an exponential atmosphere rho = rho0 exp(-h/H) with rho0 = 1.225 kg/m3 and scale height H = 7200 m. The equations of motion are dV/dt = -rho V^2 / (2 beta) + g sin(gamma), dgamma/dt = (g - V^2/(R+h)) cos(gamma)/V, dh/dt = -V sin(gamma), where gamma is the path angle below the horizon and beta = m/(Cd A) the ballistic coefficient. Integration is RK4 with a 0.05 s step.
Stagnation-point convective heating follows Sutton-Graves: q = 1.74e-4 sqrt(rho/Rn) V^3 in W/m2 for a nose radius Rn. A heat shield radiates, so the wall settles near T = (q / (eps sigma))^(1/4) with emissivity 0.85. Allen and Eggers showed that for a straight shallow entry the peak deceleration is a = V0^2 sin(gamma) / (2 e H), independent of the ballistic coefficient, and that heating peaks where rho = beta sin(gamma) / (3 H): heavy capsules go deeper before they slow down and so heat harder.
Simplifications: no lift, no shock-layer radiation (it matters above about 10 km/s), no real-gas effects, an ablator is not modelled, a single exponential atmosphere. Checks below: a straight-line, no-gravity run against the Allen-Eggers peak deceleration and peak heating. Educational physics of spacecraft recovery only.