Skip to main content
Sandbox Physics

Gravity-Assist Mission Designer

How can a flyby change speed without an engine burn? A moving planet bends the spacecraft’s path. Far before and after the encounter, the speed relative to the planet tends to the same value, but the direction has changed. Add the planet’s orbital velocity to each vector and the speeds relative to the Sun can differ. A gain or loss in orbital energy comes from exchange with the planet.

Aim a hyperbolic flyby past Earth or Jupiter. Drag the periapsis, reverse the turn and switch reference frames, and see how the actual trajectory relates to the asymptotic speeds, the energy exchanged and a safe target for the outgoing speed.

Interactive modelGravity-Assist Mission Designer
Time from periapsis−95.2 min-95.2\,\mathrm{min}
Body referenceEarth\text{Earth}
Asymptotic turn angle69.8 ∘69.8\,\mathrm{{}^\circ}
Hyperbolic eccentricity1.751.75
Planned periapsis altitude1910 km1910\,\mathrm{km}
Impact parameter / body radius2.49 Rp2.49\,\mathrm{R_p}
Incoming inertial speed30.4 km/s30.4\,\mathrm{km/s}
Outgoing inertial speed35.5 km/s35.5\,\mathrm{km/s}
Signed inertial speed change5.09 km/s5.09\,\mathrm{km/s}
Asymptotic energy exchange168 km2/s2168\,\mathrm{km^2/s^2}
Current planet-frame speed7.31 km/s7.31\,\mathrm{km/s}
Periapsis speed11.5 km/s11.5\,\mathrm{km/s}
Chosen-margin checkWithin\text{Within}
Signed outgoing speed error−0.53 km/s-0.53\,\mathrm{km/s}
Speed target checkMissed\text{Missed}
Sampled energy-defect bound≤10−12\leq 10^{-12}
Sampled momentum-defect bound≤10−12\leq 10^{-12}
Sampled propagation-residual bound≤10−8 s\leq 10^{-8}\,\mathrm{s}

Two frames reveal the energy exchange

BackgroundIn the local two-body model, the spacecraft speeds up as it approaches the planet and slows as it recedes. Its kinetic plus gravitational energy is constant in the planet frame.

Why it mattersThe unpowered hyperbolic turn and the patched-conic construction at the asymptotes follow NASA trajectory-design references. The teaching model here is limited to a finite local path, a planet moving at constant speed and a safety margin you choose.

Focus question
Can one unpowered encounter gain or lose speed depending on which side it passes?
One-sentence intuition
The flyby only rotates the velocity relative to the planet, so the asymptotic speed in the planet frame stays the same. Adding the planet’s velocity to the incoming and outgoing vectors, which point in different directions, gives two different inertial speeds, and the difference is orbital energy exchanged with the planet.

Core mathematical model

The same velocity in two frames

Vin=Vp+v∞,in,Vout=Vp+v∞,out\mathbf V_{\rm in}=\mathbf V_p+\mathbf v_{\infty,\rm in},\qquad\mathbf V_{\rm out}=\mathbf V_p+\mathbf v_{\infty,\rm out}

Capital letters are velocities in inertial coordinates; the excess vectors are the asymptotic velocities relative to the planet. The planet’s velocity is held constant throughout this local encounter. Approach angle is measured counterclockwise from the planet’s motion; a positive turn is also counterclockwise.

A hyperbola fixes the turn

eh=1+rpv∞2μp,δ=2arcsin⁡1ehe_h=1+\frac{r_pv_\infty^2}{\mu_p},\qquad\delta=2\arcsin\frac{1}{e_h}

At a fixed incoming excess speed, a closer periapsis bends the path more. The sign of the turn decides which side of the planet the spacecraft passes.

Aim with an impact parameter

b=rp1+2μprpv∞2,vp=v∞2+2μprpb=r_p\sqrt{1+\frac{2\mu_p}{r_pv_\infty^2}},\qquad v_p=\sqrt{v_\infty^2+\frac{2\mu_p}{r_p}}

The impact parameter is how far the incoming asymptote is offset, not the closest distance. At periapsis the spacecraft moves faster than its asymptotic speed.

Without thrust, the excess speed is unchanged

∣v∞,out∣=∣v∞,in∣,εp=v22−μpr=v∞22|\mathbf v_{\infty,\rm out}|=|\mathbf v_{\infty,\rm in}|,\qquad\varepsilon_p=\frac{v^2}{2}-\frac{\mu_p}{r}=\frac{v_\infty^2}{2}

Relative to the planet, the speed rises and then falls along the finite path. Only the two asymptotic speeds are equal.

Where the exchanged energy comes from

Δεinertial=Vout2−Vin22=Vp⋅(v∞,out−v∞,in)\Delta\varepsilon_{\rm inertial}=\frac{V_{\rm out}^2-V_{\rm in}^2}{2}=\mathbf V_p\cdot(\mathbf v_{\infty,\rm out}-\mathbf v_{\infty,\rm in})

The moving planet gives orbital energy to the spacecraft or takes it away. The planet’s recoil can be ignored only because the spacecraft’s mass is neglected. The turn can also lower the inertial speed.

Hit a speed target safely

rp>Rp,rp≥rsafe≥Rp,∣Vout−Vtarget∣<0.25 km/sr_p>R_p,\quad r_p\ge r_{\rm safe}\ge R_p,\qquad |V_{\rm out}-V_{\rm target}|<0.25\,\mathrm{km/s}

This teaching design checks one speed and a safety margin you choose. It does not plan a transfer to a destination. If the path touches or enters the body’s surface, the analytic propagation stops there.

Common difficulties

Faster relative to what?

Typical misconceptionGravity increases incoming and outgoing planet-relative speed.

Better mental modelThe planet-frame speed falls back to its incoming value far after the encounter. Compare the same far-field velocities in the inertial frame to see the net speed change.

Closer is not always better

Typical misconceptionThe lowest allowable altitude always maximizes speed gain.

Better mental modelThe energy exchange depends on a dot product of vectors. Turning too far can swing the outgoing velocity past the direction that gives the most speed.

The ends of the plot are not at infinity

Typical misconceptionThe first plotted speed equals the excess speed.

Better mental modelGravity still acts at both ends of the plotted path. The endpoint readouts use asymptotic values, while the speed history shows local speeds.

A crash has no outgoing flyby

Typical misconceptionA mathematical hyperbola can pass through the planet and still count as success.

Better mental modelThe record stops where the path first meets the surface, and no outgoing result is given. A safety margin you choose can also reject a path that does not hit the planet.

Run the experiment

  1. 01

    Compare frames

    Choose Gain inertial speed. Switch to inertial coordinates without changing the orbit and compare the far-field readouts.

    What to observe: The incoming and outgoing excess speeds are each 6 kilometres per second. In the inertial frame the speed changes from about 30.4 to 35.5 kilometres per second.
  2. 02

    Reverse the exchange

    Compare Gain inertial speed and Lose inertial speed. Both use the same approach and periapsis radius. The target speed also changes between presets, so compare the inertial speed readouts themselves.

    What to observe: The outgoing inertial speed is about 35.5 kilometres per second on the accelerating side and 24.2 on the decelerating side. Both retain the same excess speed.
  3. 03

    Design safely

    Drag periapsis and adjust the outgoing scalar speed target; inspect the trade chart.

    What to observe: Only encounters that miss the planet and stay outside the safety margin can pass the speed target. The trade curve can peak somewhere in the middle of the range.
  4. 04

    Stop an impossible mission

    Compare the unsafe-margin and surface-interception presets.

    What to observe: One path comes closer than the chosen margin. The other hits the surface, stops there and has no outgoing result.
Something broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy