Engineering Calculators

Two-Body Orbit Parameter Calculator — State Vectors to Keplerian Elements

Free two-body orbit parameter calculator. Convert satellite position and velocity state vectors to all six classical Keplerian orbital elements: a, e, i, Ω, ω, ν. Supports Earth, Moon, Mars, Sun.

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

m³/s²

Position Vector r (m)

Velocity Vector v (m/s)

a — Semi-Major Axis (km)
e — Eccentricity
i — Inclination (°)
Ω — RAAN (°)
ω — Arg. Periapsis (°)
ν — True Anomaly (°)
rₚ — Periapsis (km)
rₐ — Apoapsis (km)

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.

✦ Newton's Law of Universal Gravitation
\[\vec{F} = -\frac{G M m}{r^2}\hat{r} = -\frac{\mu m}{r^2}\hat{r}\]
F = gravitational force vector (N)  |  G = 6.674 × 10⁻¹¹ N m²/kg² (universal gravitational constant)  |  M = mass of central body (kg)  |  m = mass of satellite (kg)  |  r = distance between bodies (m)  |  μ = GM = standard gravitational parameter (m³/s²)

Dividing by satellite mass m and applying Newton's second law yields the equation of motion for the relative position vector r:

✦ Two-Body Equation of Motion
\[\ddot{\vec{r}} = -\frac{\mu}{r^3}\,\vec{r}\]
This second-order nonlinear ODE has six constants of integration — corresponding exactly to the six Keplerian orbital elements. Its solution describes motion along a conic section (per Kepler's First Law). The equation assumes only gravitational interaction — no atmospheric drag, solar radiation pressure, or third-body perturbations.

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.

Why "specific"? In astrodynamics, quantities described as "specific" are per unit mass of the satellite. This is useful because the satellite's own mass m cancels out of the equations — a 1 kg cubesat and a 10,000 kg communications satellite follow the same orbit if given the same initial state vectors (in the two-body approximation).

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.

✦ Orbit Equation in Polar Form (Conic Section)
\[r = \frac{p}{1 + e\cos\nu} \qquad \text{where} \quad p = \frac{h^2}{\mu}\]
r = radial distance from focus (central body) at any point  |  p = semi-latus rectum (m)  |  e = eccentricity (dimensionless)  |  ν = true anomaly (angle from periapsis)  |  h = specific angular momentum magnitude (m²/s)
Eccentricity eOrbit TypeEnergy εShapeExample
e = 0Circularε = −μ/(2a) < 0Perfect circleISS, GPS sats
0 < e < 1Ellipticalε < 0Ellipse (bound)Most satellites, Moon
e = 1Parabolicε = 0Parabola (escape)Theoretical escape, comets
e > 1Hyperbolicε > 0Hyperbola (unbound)Interplanetary probes, Oumuamua
🔵 Circular Orbit (e = 0)

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.

🔴 Elliptical Orbit (0 < e < 1)

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.

🟡 Hyperbolic Trajectory (e > 1)

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.

SymbolNameRangeWhat It Describes
aSemi-Major Axis0 to ∞ (m or km)Size of the orbit; half the longest diameter of the ellipse
eEccentricity0 to ∞Shape of the orbit conic section
iInclination0° to 180°Tilt of the orbital plane relative to Earth's equatorial plane
ΩRAAN0° to 360°Swivel of the orbital plane around Earth's polar axis
ωArgument of Periapsis0° to 360°Rotation of the ellipse within its plane
νTrue Anomaly0° to 360°Satellite's current angle from periapsis within its orbit
📏 Semi-Major Axis a

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)\).

🥚 Eccentricity e

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)\).

📐 Inclination i

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°.

🧭 RAAN Ω

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.

🎯 Argument of Periapsis ω

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.

🕐 True Anomaly ν

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

✦ Specific Angular Momentum Vector
\[\vec{h} = \vec{r} \times \vec{v}\] \[h = |\vec{h}| = \sqrt{h_x^2 + h_y^2 + h_z^2}\]
h is conserved (constant) throughout the orbit — a direct consequence of the central-force nature of gravity. Its direction is always perpendicular to the orbital plane. Units: m²/s.

Step 2: Node Vector (Reference for RAAN)

✦ Node Vector
\[\vec{n} = \hat{K} \times \vec{h} = \begin{pmatrix}0\\0\\1\end{pmatrix} \times \vec{h}\]
points in the direction of the ascending node — where the orbit crosses the equatorial plane heading northward. It is used as the reference vector for computing RAAN and the argument of periapsis.

Step 3: Eccentricity Vector

✦ Eccentricity Vector (Laplace-Runge-Lenz Vector)
\[\vec{e} = \frac{1}{\mu}\left[\left(v^2 - \frac{\mu}{r}\right)\vec{r} - (\vec{r}\cdot\vec{v})\,\vec{v}\right]\] \[e = |\vec{e}|\]
e is a conserved vector pointing from the focus to periapsis, with magnitude equal to the orbital eccentricity. It is one of the most important conserved quantities in the two-body problem.

Step 4: Specific Orbital Energy → Semi-Major Axis

✦ Specific Orbital Energy and Semi-Major Axis
\[\varepsilon = \frac{v^2}{2} - \frac{\mu}{r} = -\frac{\mu}{2a}\] \[\Rightarrow\quad a = -\frac{\mu}{2\varepsilon}\]

Steps 5–7: Angles from Dot Products

✦ Inclination, RAAN, Argument of Periapsis, True Anomaly
\[i = \arccos\!\left(\frac{h_z}{h}\right)\] \[\Omega = \arccos\!\left(\frac{n_x}{n}\right) \quad \text{(quadrant check: if } n_y < 0,\ \Omega = 360° - \Omega\text{)}\] \[\omega = \arccos\!\left(\frac{\vec{n}\cdot\vec{e}}{n\,e}\right) \quad \text{(quadrant check: if } e_z < 0,\ \omega = 360° - \omega\text{)}\] \[\nu = \arccos\!\left(\frac{\vec{e}\cdot\vec{r}}{e\,r}\right) \quad \text{(quadrant check: if } \dot{r} < 0,\ \nu = 360° - \nu\text{)}\]
where \(\dot{r} = \vec{r}\cdot\vec{v}/r\) is the radial velocity (positive = moving away from central body). The quadrant checks resolve the ambiguity of arccos (which only returns 0°–180°) into the full 0°–360° range.

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.

✦ Vis-Viva Equation
\[v^2 = \mu\!\left(\frac{2}{r} - \frac{1}{a}\right)\]
v = orbital speed at distance r (m/s)  |  r = current distance from central body (m)  |  a = semi-major axis (m)  |  μ = gravitational parameter (m³/s²)  |  For a circular orbit (r = a): \(v_c = \sqrt{\mu/r}\)
✦ Periapsis and Apoapsis Velocities
\[v_p = \sqrt{\frac{\mu}{a}\cdot\frac{1+e}{1-e}} \qquad v_a = \sqrt{\frac{\mu}{a}\cdot\frac{1-e}{1+e}}\]
Periapsis velocity v_p is the maximum orbital speed (orbit is tightest here) and apoapsis velocity v_a is the minimum (orbit is widest here). Their product satisfies: \(v_p \cdot r_p = v_a \cdot r_a = h\) (conservation of angular momentum).
✦ Escape Velocity
\[v_{\text{esc}} = \sqrt{\frac{2\mu}{r}} = \sqrt{2}\,v_c\]
Escape velocity is the minimum speed needed to escape to infinity (ε = 0, e = 1). From Earth's surface (r = 6,371 km): v_esc ≈ 11.19 km/s. From LEO (r = 6,771 km): v_esc ≈ 10.85 km/s.

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.

🔵 Kepler's First Law

"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.

🔴 Kepler's Second Law

"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}\).

🟡 Kepler's Third Law

"The square of the period is proportional to the cube of the semi-major axis."

\[T^2 = \frac{4\pi^2}{\mu}\,a^3 \quad\Rightarrow\quad T = 2\pi\sqrt{\frac{a^3}{\mu}}\]

Gravitational Parameters of Solar System Bodies

Bodyμ (m³/s²)Equatorial Radius (km)Surface Escape Vel. (km/s)
Earth3.986004418 × 10¹⁴6,37111.19
Moon4.9048695 × 10¹²1,7372.38
Mars4.282837 × 10¹³3,3905.03
Sun1.32712440018 × 10²⁰695,700617.5
Jupiter1.26686534 × 10¹⁷71,49259.5
Saturn3.7931187 × 10¹⁶60,26835.5
Venus3.24859 × 10¹⁴6,05210.36
Mercury2.2032 × 10¹³2,4404.25

Real-World Applications of Two-Body Orbital Mechanics

🚀 Spacecraft Mission Design

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 & Navigation Satellites

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.

☄️ Asteroid & Comet Tracking

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.

🌍 Remote Sensing & Earth Observation

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.

🔭 Space Debris Catalogue

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.

🌙 Interplanetary Trajectories

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

1
Given: r = [6.524 × 10⁶, 1.305 × 10⁶, 0] m; v = [−1530, 7650, 2500] m/s
2
h = r × v: \(h_x = r_y v_z - r_z v_y = (1.305\times10^6)(2500) - 0 = 3.2625\times10^9\)
3
\(h_y = r_z v_x - r_x v_z = 0 - (6.524\times10^6)(2500) = -1.631\times10^{10}\)
4
\(h_z = r_x v_y - r_y v_x = (6.524\times10^6)(7650) - (1.305\times10^6)(-1530) = 5.0109\times10^{10} + 1.9967\times10^9 = 5.2106\times10^{10}\)
5
\(h = |\vec{h}| = \sqrt{(3.26\times10^9)^2 + (-1.631\times10^{10})^2 + (5.21\times10^{10})^2} \approx 5.46\times10^{10}\ \text{m}^2/\text{s}\)

✅ Specific angular momentum h ≈ 5.46 × 10¹⁰ m²/s

Example 2 — Computing Specific Orbital Energy and Semi-Major Axis

1
r = |r| = \(\sqrt{(6.524\times10^6)^2 + (1.305\times10^6)^2} = \sqrt{4.256\times10^{13} + 1.703\times10^{12}} \approx 6.652\times10^6\) m
2
v = |v| = \(\sqrt{1530^2 + 7650^2 + 2500^2} = \sqrt{2.341\times10^6 + 5.852\times10^7 + 6.25\times10^6} = \sqrt{6.711\times10^7} \approx 8191\) m/s
3
\(\varepsilon = v^2/2 - \mu/r = 8191^2/2 - 3.986\times10^{14}/(6.652\times10^6)\)
4
\(= 33.56\times10^6 - 59.92\times10^6 = -26.36\times10^6\) J/kg (negative → bound orbit ✓)
5
\(a = -\mu/(2\varepsilon) = -3.986\times10^{14}/(2\times(-26.36\times10^6)) = 7.552\times10^6\) m = 7,552 km

✅ Semi-major axis a ≈ 7,552 km (altitude above Earth ≈ 1,181 km)

Example 3 — Inclination from Angular Momentum Vector

1
Using h_z ≈ 5.21 × 10¹⁰ m²/s and h ≈ 5.46 × 10¹⁰ m²/s from Example 1:
2
\(i = \arccos(h_z/h) = \arccos(5.21\times10^{10}/5.46\times10^{10}) = \arccos(0.9542)\)
3
\(i = \arccos(0.9542) \approx 17.4°\) (prograde, low inclination — good for geostationary transfer)

✅ Orbital inclination i ≈ 17.4° (use calculator above for full precision)

Example 4 — Orbital Period from Semi-Major Axis (Kepler's Third Law)

1
Using a = 7,552 km = 7.552 × 10⁶ m from Example 2, μ_Earth = 3.986 × 10¹⁴ m³/s²
2
\(T = 2\pi\sqrt{a^3/\mu} = 2\pi\sqrt{(7.552\times10^6)^3 / 3.986\times10^{14}}\)
3
\(a^3 = 4.306\times10^{20}\ \text{m}^3 \Rightarrow a^3/\mu = 1.080\times10^6\ \text{s}^2 \Rightarrow \sqrt{1.080\times10^6} = 1039\ \text{s}\)
4
\(T = 2\pi \times 1039 = 6{,}530\ \text{s} \approx 108.8\ \text{minutes}\)

✅ Orbital period T ≈ 108.8 minutes. (Compare: ISS at ~408 km altitude has T ≈ 92.6 min)

Frequently Asked Questions

The two-body problem describes the motion of two point masses interacting only through their mutual gravitational attraction. Governed by \(\ddot{\vec{r}} = -(\mu/r^3)\vec{r}\), it has an exact analytical solution showing the relative motion always follows a conic section (ellipse, parabola, or hyperbola). This forms the foundation of all spacecraft orbit analysis — from GPS constellation design to interplanetary trajectory planning.
The six elements are: (1) semi-major axis a (orbit size); (2) eccentricity e (orbit shape: 0 = circle, <1 = ellipse, 1 = parabola, >1 = hyperbola); (3) inclination i (tilt of orbital plane, 0°–180°); (4) RAAN Ω (rotation of ascending node, 0°–360°); (5) argument of periapsis ω (orientation of ellipse in plane, 0°–360°); (6) true anomaly ν (current position in orbit, 0°–360°). Together these six numbers completely determine a satellite's orbit and instantaneous position.
A state vector is the complete dynamical description of a satellite at a specific epoch: position r = (x, y, z) in metres and velocity v = (vx, vy, vz) in m/s, usually in Earth-Centred Inertial (ECI) coordinates. Six numbers (three position + three velocity). This calculator converts state vectors to Keplerian elements, and the reverse conversion (elements → state vectors) is equally important for mission planning and manoeuvre design.
μ = GM is the product of the universal gravitational constant G = 6.674 × 10⁻¹¹ N m²/kg² and the central body mass M. It appears in every orbital mechanics equation. Key values: Earth μ = 3.986 × 10¹⁴ m³/s², Sun μ = 1.327 × 10²⁰ m³/s². Using μ instead of G and M separately avoids precision loss — μ is measured to parts per billion from tracking spacecraft orbits, much more precisely than G or M individually.
Specific angular momentum is \(\vec{h} = \vec{r} \times \vec{v}\) — the cross product of position and velocity vectors, representing angular momentum per unit mass. Its magnitude h is conserved throughout the orbit (Kepler's Second Law), and its direction defines the orbital plane normal. The semi-latus rectum \(p = h^2/\mu\) and, for elliptical orbits, \(h = \sqrt{\mu a(1-e^2)}\).
The eccentricity vector (Laplace-Runge-Lenz vector): \(\vec{e} = (1/\mu)[(v^2 - \mu/r)\vec{r} - (\vec{r}\cdot\vec{v})\vec{v}]\). It is a conserved vector pointing from the central body toward the orbit's periapsis, with magnitude e equal to the orbital eccentricity. This vector encodes both the orbit shape (|e|) and periapsis direction (ê) simultaneously.
The vis-viva equation \(v^2 = \mu(2/r - 1/a)\) gives the orbital speed at any point in an orbit as a function of current distance r and semi-major axis a. It directly follows from energy conservation. Applications: computing manoeuvre Δv requirements, finding escape velocity (\(a \to \infty: v_{esc} = \sqrt{2\mu/r}\)), and designing optimal Hohmann transfers between orbits.
Inclination \(i = \arccos(h_z/h)\) is the angle between the orbital plane and Earth's equatorial plane. i = 0°: equatorial orbit (highest coverage efficiency for GEO). i = 90°: polar orbit (eventually covers all latitudes). i = 98.7°: sun-synchronous (passes every point at the same local solar time — ideal for consistent-illumination remote sensing). Inclination directly determines launch cost: launching to 90° from a 28°N site (Cape Canaveral) requires much more fuel than launching to 28°.
Kepler's Third Law: \(T = 2\pi\sqrt{a^3/\mu}\). Given semi-major axis a, you can immediately compute orbital period T, and vice versa. Practical uses: GEO = 42,164 km from Earth's centre → T = 86,164 s = 1 sidereal day. ISS at 6,779 km → T ≈ 92.6 min. GPS at 26,560 km → T ≈ 720 min = 12 hours (2 orbits per day, synchronized with ground stations).
RAAN (Ω) is measured east from the vernal equinox (First Point of Aries, ♈) to the ascending node in the equatorial plane. Argument of periapsis (ω) is measured from the ascending node to periapsis in the orbital plane. Together Ω and ω fully specify the 3D orientation of the orbital ellipse. RAAN drifts over time due to Earth's oblateness (J₂ perturbation): \(\dot{\Omega} \approx -9.964 \times (R_E/a)^{7/2} \cos i\) degrees/day for LEO.
True anomaly ν is the instantaneous angular position measured from periapsis. Converting true anomaly to time requires intermediate variables: eccentric anomaly E (related to ν by \(\tan(E/2) = \sqrt{(1-e)/(1+e)}\tan(\nu/2)\)) and then mean anomaly M via Kepler's equation M = E − e·sin(E). Mean anomaly increases linearly with time: M = n(t − T₀), where n = 2π/T is the mean motion. Solving Kepler's equation (iteratively) for E given M is the classical "Kepler's problem."
The two-body model assumes: (1) point masses with no other forces; (2) no atmospheric drag; (3) no solar radiation pressure; (4) no third-body perturbations (Moon, Sun); (5) a perfectly spherical uniform central body. Real satellite orbits are affected by all of these, causing the orbital elements to drift over time. For precision work, numerical integration with perturbation models (J₂, J₃, atmospheric density, SRP) is used. The two-body solution remains the starting point for all perturbation analyses.
Shares:

Related Posts