Two-Body Orbit Parameter Calculator — State Vectors to Keplerian Elements
Orbital Mechanics Astrodynamics Spacecraft Engineering Keplerian Elements Two-Body Problem
When a spacecraft transmits its position and velocity to a ground station, engineers receive a state vector — six numbers (x, y, z, vₓ, v_y, v_z) that describe where the satellite is and where it's going at that exact moment. But to plan manoeuvres, predict ground tracks, or design coverage patterns, what scientists actually need are the six classical Keplerian orbital elements: semi-major axis, eccentricity, inclination, RAAN, argument of periapsis, and true anomaly.
The HeLovesMath Two-Body Orbit Parameter Calculator performs this conversion instantly and rigorously using the vector formulation of the two-body problem — the same mathematics used by NASA's GMAT, STK, and JPL's SPICE toolkit. This guide explains every equation with properly rendered mathematical expressions, covers all six orbital elements in depth, and provides four fully worked numerical examples.
Two-Body Orbit Parameter Calculator
🛰️ Two-Body Orbit Calculator — State Vectors → Keplerian Elements
Enter position r (m) and velocity v (m/s) in ECI coordinates. Results update automatically.
Central Body
Position Vector r (m)
Velocity Vector v (m/s)
The Two-Body Problem — Physics & Newton's Law of Gravitation
The two-body problem asks: given two point masses interacting only through their mutual gravity, describe the motion of each relative to the other. Isaac Newton solved this in his Principia Mathematica (1687) using his newly invented calculus, deriving Kepler's three empirical laws as mathematical theorems from the inverse-square law of gravity.
Dividing by satellite mass m and applying Newton's second law yields the equation of motion for the relative position vector r:
Two powerful conserved quantities emerge from this equation: specific angular momentum \(\vec{h} = \vec{r} \times \dot{\vec{r}}\) and specific orbital energy \(\varepsilon = v^2/2 - \mu/r\). Their conservation is what makes the two-body problem exactly solvable.
Conic Sections & Orbit Types — Ellipses, Parabolas, Hyperbolas
The geometric solution to the two-body equation of motion is always a conic section — the curve produced by intersecting a cone with a plane at various angles. The specific type depends entirely on the orbital eccentricity e, which is determined by the satellite's energy.
| Eccentricity e | Orbit Type | Energy ε | Shape | Example |
|---|---|---|---|---|
| e = 0 | Circular | ε = −μ/(2a) < 0 | Perfect circle | ISS, GPS sats |
| 0 < e < 1 | Elliptical | ε < 0 | Ellipse (bound) | Most satellites, Moon |
| e = 1 | Parabolic | ε = 0 | Parabola (escape) | Theoretical escape, comets |
| e > 1 | Hyperbolic | ε > 0 | Hyperbola (unbound) | Interplanetary probes, Oumuamua |
All points equidistant from Earth's centre. Velocity is constant: \(v_c = \sqrt{\mu/r}\). The ISS orbits at approximately 408 km altitude with v ≈ 7.66 km/s, with period ≈ 92.6 minutes.
Most common satellite orbit. Body moves faster at periapsis (closest point) and slower at apoapsis (farthest point). Geostationary transfer orbit has e ≈ 0.73, reaching GEO altitude at apogee.
Object has more than escape velocity. Interplanetary probes use gravity assists to achieve hyperbolic departure trajectories. Voyager 1 is on a hyperbolic trajectory and has left the solar system.
The Six Classical Keplerian Orbital Elements
Six scalar quantities are needed to completely specify a satellite's orbit and its current position in that orbit. Together they are called the classical Keplerian elements and are the standard output of this calculator.
| Symbol | Name | Range | What It Describes |
|---|---|---|---|
| a | Semi-Major Axis | 0 to ∞ (m or km) | Size of the orbit; half the longest diameter of the ellipse |
| e | Eccentricity | 0 to ∞ | Shape of the orbit conic section |
| i | Inclination | 0° to 180° | Tilt of the orbital plane relative to Earth's equatorial plane |
| Ω | RAAN | 0° to 360° | Swivel of the orbital plane around Earth's polar axis |
| ω | Argument of Periapsis | 0° to 360° | Rotation of the ellipse within its plane |
| ν | True Anomaly | 0° to 360° | Satellite's current angle from periapsis within its orbit |
For an ellipse, the semi-major axis is exactly half the longest dimension. It determines the orbit's period via Kepler's Third Law: \(T = 2\pi\sqrt{a^3/\mu}\). For bound orbits, \(a = -\mu/(2\varepsilon)\).
Describes how stretched the ellipse is. \(e = 0\): perfect circle. \(e = 0.206\): Mercury's orbit. \(e = 0.967\): Halley's Comet. The formula: \(r_p = a(1-e)\), \(r_a = a(1+e)\).
The angle between the orbital angular momentum vector h and Earth's north polar axis. \(i = 0°\): equatorial. \(i = 90°\): polar. \(i = 98.7°\): sun-synchronous. Retrograde if i > 90°.
Measured eastward from the vernal equinox direction to where the orbit crosses the equator heading northward. Drifts over time due to Earth's oblateness. Sun-synchronous orbits are designed so RAAN drifts ≈ 0.9856°/day to track the Sun.
The angle from the ascending node (intersection of orbit and equator going north) to periapsis, measured in the orbital plane. Together with Ω, it fully specifies the orientation of the ellipse in 3D space.
The satellite's angular position measured from periapsis. It changes continuously and non-uniformly — fastest at periapsis, slowest at apoapsis (Kepler's Second Law). At ν = 0°: periapsis. At ν = 180°: apoapsis.
Deriving Orbital Elements from State Vectors — The Vector Algorithm
Given state vectors \(\vec{r}\) and \(\vec{v}\) and gravitational parameter μ, the Keplerian elements are computed through a well-defined sequence of vector calculations. This is exactly the algorithm implemented in this calculator.
Step 1: Specific Angular Momentum
Step 2: Node Vector (Reference for RAAN)
Step 3: Eccentricity Vector
Step 4: Specific Orbital Energy → Semi-Major Axis
Steps 5–7: Angles from Dot Products
Specific Orbital Energy & the Vis-Viva Equation
The vis-viva equation (Latin: "living force") relates the orbital speed of a body at any point in its trajectory to its distance from the focus and the semi-major axis. It is derived by combining conservation of energy with the orbit equation and is one of the most useful single equations in orbital mechanics.
Kepler's Three Laws — Derived Theorems of the Two-Body Problem
Johannes Kepler published his three laws of planetary motion between 1609 and 1619, based purely on observational data from Tycho Brahe. Newton later proved all three as mathematical consequences of the inverse-square law of gravity.
"Each planet moves in an ellipse with the Sun at one focus."
Derived from the two-body equation of motion: the solution is always a conic section \(r = p/(1+e\cos\nu)\). The central body occupies one focus, not the centre.
"A line joining a planet to the Sun sweeps equal areas in equal times."
A consequence of conservation of angular momentum (\(\vec{h} = \vec{r}\times\vec{v} = \text{const}\)). The areal sweep rate is \(dA/dt = h/2 = \text{const}\).
"The square of the period is proportional to the cube of the semi-major axis."
Gravitational Parameters of Solar System Bodies
| Body | μ (m³/s²) | Equatorial Radius (km) | Surface Escape Vel. (km/s) |
|---|---|---|---|
| Earth | 3.986004418 × 10¹⁴ | 6,371 | 11.19 |
| Moon | 4.9048695 × 10¹² | 1,737 | 2.38 |
| Mars | 4.282837 × 10¹³ | 3,390 | 5.03 |
| Sun | 1.32712440018 × 10²⁰ | 695,700 | 617.5 |
| Jupiter | 1.26686534 × 10¹⁷ | 71,492 | 59.5 |
| Saturn | 3.7931187 × 10¹⁶ | 60,268 | 35.5 |
| Venus | 3.24859 × 10¹⁴ | 6,052 | 10.36 |
| Mercury | 2.2032 × 10¹³ | 2,440 | 4.25 |
Real-World Applications of Two-Body Orbital Mechanics
Every satellite mission begins with two-body orbital analysis. Engineers specify the target orbital elements, compute the required launch vehicle state vectors, then design burn sequences (manoeuvres) to achieve and maintain the target orbit.
GPS satellites broadcast their orbital elements (ephemeris data) to receivers on the ground. The receiver uses the two-body equations to predict each satellite's current position and compute its own location via trilateration — happening millions of times per second worldwide.
Planetary defence agencies compute Keplerian elements for every tracked near-Earth object. Two-body propagation quickly estimates future close approaches. More accurate multi-body models (including planetary perturbations) are then used to refine impact probability estimates.
Satellite imagery operators use orbital elements to predict when and where their satellite will pass over a target region. Inclination, RAAN, and true anomaly together determine the ground track — which latitudes are imaged and at what local time.
The US Space Surveillance Network tracks over 27,000 objects in Earth orbit. Each is catalogued with a two-line element set (TLE) — a compact encoding of Keplerian elements. These are used with SGP4 orbit propagators to predict debris positions and conjunction warnings.
The Hohmann transfer is a two-impulse manoeuvre between two circular orbits, designed using the vis-viva equation. All interplanetary missions — Mars rovers, Jupiter orbiters, New Horizons at Pluto — use two-body analysis as the starting point before adding multi-body perturbative corrections.
Worked Examples — State Vectors to Orbital Elements
Example 1 — Computing Specific Angular Momentum for a LEO Satellite
✅ Specific angular momentum h ≈ 5.46 × 10¹⁰ m²/s
Example 2 — Computing Specific Orbital Energy and Semi-Major Axis
✅ Semi-major axis a ≈ 7,552 km (altitude above Earth ≈ 1,181 km)
Example 3 — Inclination from Angular Momentum Vector
✅ Orbital inclination i ≈ 17.4° (use calculator above for full precision)
Example 4 — Orbital Period from Semi-Major Axis (Kepler's Third Law)
✅ Orbital period T ≈ 108.8 minutes. (Compare: ISS at ~408 km altitude has T ≈ 92.6 min)
