<p>The vis-viva equation doesn't care about eccentricity, so no, you can't get it from just the semimajor axis.</p>
<p>However, given the radial distance and the velocity vector, and the gravitational parameter, this is how I would go about calculating orbital eccentricity:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: center;">Orbital Elements</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;"><a href="https://i.sstatic.net/RhrGP.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RhrGP.gif" alt="Orbital Elements" /></a></td>
</tr>
</tbody>
</table>
</div>
<p>Givens:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Parameter</th>
<th style="text-align: center;">Symbol</th>
</tr>
</thead>
<tbody>
<tr>
<td>gravitational parameter</td>
<td style="text-align: center;"><span class="math-container">$\mu$</span></td>
</tr>
<tr>
<td>radial distance vector</td>
<td style="text-align: center;"><span class="math-container">$\vec{r}$</span></td>
</tr>
<tr>
<td>velocity vector</td>
<td style="text-align: center;"><span class="math-container">$\vec{v}$</span></td>
</tr>
</tbody>
</table>
</div>
<p><strong>1. Calculate the <a href="https://en.wikipedia.org/wiki/Specific_orbital_energy" rel="nofollow noreferrer">specific orbital energy</a>, <span class="math-container">$\epsilon$</span></strong></p>
<p>Specific orbital energy is the sum of the kinetic and gravitational potential energy of the orbiting satellite, divided by its mass. Since Energy is conserved in keplerian orbits,  it is one of the two parameters that determines the type of the orbit. If it is less than zero, the orbit is elliptical. If it is greater than zero, the trajectory is hyperbolic. If it is equal to zero, it is parabolic.</p>
<p><span class="math-container">$$\epsilon =\frac{|\vec{v}|^2}{2} -\frac{\mu}{|\vec{r}|}$$</span></p>
<p><strong>2. Calculate the <a href="https://en.wikipedia.org/wiki/Semi-major_and_semi-minor_axes" rel="nofollow noreferrer">semi-major axis</a>, <span class="math-container">$a$</span></strong></p>
<p>The semimajor axis can now be calculated once you have the specific orbital energy, and characterizes the distance of the extremes of the orbit; For an elliptical orbit, the semi-major axis is half the distance between the periapsis and the apoapsis, and for a hyperbolic trajectory, it is half the minimum distance between the two lobes.</p>
<p><span class="math-container">$$a = -\frac{\mu}{2 \epsilon}$$</span></p>
<p><strong>3. Calculate <a href="https://en.wikipedia.org/wiki/Specific_angular_momentum" rel="nofollow noreferrer">specific angular momentum</a>, <span class="math-container">$\vec{h}$</span>:</strong></p>
<p>The specific angular momentum vector has units of the angular momentum of the satellite, divided by the mass of the satellite. Like orbital energy, angular momentum is conserved in keplerian orbits, and specific angular momentum  is the other major parameter useful in finding the orbit's shape, as well as determining the orbit's orientation, and the satellite's direction of travel.</p>
<p>The specific angular momentum vector points perpendicular to the orbital plane. If it points above the reference plane, the orbit is a prograde orbit, and if it points below the reference plane, it is a retrograde orbit.</p>
<p>As a result, the specific angular momentum vector can be used to find other orbital parameters, including the <a href="https://en.wikipedia.org/wiki/Longitude_of_the_ascending_node" rel="nofollow noreferrer">longitude of the ascending node</a> and the <a href="https://en.wikipedia.org/wiki/Orbital_inclination" rel="nofollow noreferrer">orbital inclination</a>.</p>
<p><span class="math-container">$$\vec{h} = \vec{r} \times \vec{v}$$</span></p>
<p><strong>4. Calculate the <a href="https://en.wikipedia.org/wiki/Eccentricity_vector" rel="nofollow noreferrer">eccentricity vector</a>, <span class="math-container">$\vec{e}$</span>:</strong></p>
<p>The magnitude of the eccentricity vector is the orbital eccentricity, and its direction points towards the periapsis, making it useful in calculating <a href="https://en.wikipedia.org/wiki/Argument_of_periapsis" rel="nofollow noreferrer">argument of periapsis</a>.</p>
<p><span class="math-container">$$\vec{e}=\frac{\vec{v} \times \vec{h}}{\mu}-\frac{\vec{r}}{|r|}$$</span></p>
<p><span class="math-container">$$e = |\vec{e}|$$</span>
And with the magnitude of the eccentricity vector, you now can calculate periapsis (<span class="math-container">$q$</span>) and apoapsis distances (<span class="math-container">$Q$</span>).
<span class="math-container">$$q = a(1-e)$$</span>
<span class="math-container">$$Q = a(1 +e)$$</span></p>

CC BY-SA 4.0
2021-09-20T09:49:23.820Z
2021-09-21T11:34:05.720Z
2021-09-21T11:34:05.720Z
notovny
<p>I'm kinda confused on how to calculate either the apsides or the eccentricity without knowing one or the other. Let's say you have an object in orbit around another. If you know the current distance, mass of both objects, and the velocity (as a vector), would you be able to calculate the eccentricity of the orbit, like through the vis-viva equation?</p>
<p>Edit: I used Symbolab with the vis-viva equation to solve for a, would this work?</p>
<p><a href="https://www.symbolab.com/solver/step-by-step/solve%20for%20a%2C%20v%3D%5Csqrt%7Bu%5Cleft(%5Cfrac%7B2%7D%7Br%7D-%5Cfrac%7B1%7D%7Ba%7D%5Cright)%7D?or=input" rel="noreferrer">https://www.symbolab.com/solver/step-by-step/solve%20for%20a%2C%20v%3D%5Csqrt%7Bu%5Cleft(%5Cfrac%7B2%7D%7Br%7D-%5Cfrac%7B1%7D%7Ba%7D%5Cright)%7D?or=input</a></p>

CC BY-SA 4.0
2021-09-20T12:45:50.600Z
It is possible to find the eccentricity given the velocity and position vectors. Try searching google for "cartesian to kepler"
WarpPrime
<orbit><orbital-mechanics><orbital-elements>
Confused on how you are supposed to calculate eccentricity without apsides
pixelgaming579
# Confused on how you are supposed to calculate eccentricity without apsides

(Asked by: username_0 on 2021-09-20)

I'm kinda confused on how to calculate either the apsides or the eccentricity without knowing one or the other. Let's say you have an object in orbit around another. If you know the current distance, mass of both objects, and the velocity (as a vector), would you be able to calculate the eccentricity of the orbit, like through the vis-viva equation?

Edit: I used Symbolab with the vis-viva equation to solve for a, would this work?

<https://www.symbolab.com/solver/step-by-step/solve%20for%20a%2C%20v%3D%5Csqrt%7Bu%5Cleft(%5Cfrac%7B2%7D%7Br%7D-%5Cfrac%7B1%7D%7Ba%7D%5Cright)%7D?or=input>

**Tags:** orbit, orbital-mechanics, orbital-elements

> **Comments:**
> **username_1**: It is possible to find the eccentricity given the velocity and position vectors. Try searching google for "cartesian to kepler"  

---

## 1 answers

### Answer by username_2 on 2021-09-20. Score: 11 | Accepted answer

The vis-viva equation doesn't care about eccentricity, so no, you can't get it from just the semimajor axis.

However, given the radial distance and the velocity vector, and the gravitational parameter, this is how I would go about calculating orbital eccentricity:

| Orbital Elements |
| --- |
| [Orbital Elements](https://i.sstatic.net/RhrGP.gif) |

Givens:

| Parameter | Symbol |
| --- | --- |
| gravitational parameter | $\mu$ |
| radial distance vector | $\vec{r}$ |
| velocity vector | $\vec{v}$ |

**1. Calculate the [specific orbital energy](https://en.wikipedia.org/wiki/Specific_orbital_energy), $\epsilon$**

Specific orbital energy is the sum of the kinetic and gravitational potential energy of the orbiting satellite, divided by its mass. Since Energy is conserved in keplerian orbits, it is one of the two parameters that determines the type of the orbit. If it is less than zero, the orbit is elliptical. If it is greater than zero, the trajectory is hyperbolic. If it is equal to zero, it is parabolic.

$$\epsilon =\frac{|\vec{v}|^2}{2} -\frac{\mu}{|\vec{r}|}$$

**2. Calculate the [semi-major axis](https://en.wikipedia.org/wiki/Semi-major_and_semi-minor_axes), $a$**

The semimajor axis can now be calculated once you have the specific orbital energy, and characterizes the distance of the extremes of the orbit; For an elliptical orbit, the semi-major axis is half the distance between the periapsis and the apoapsis, and for a hyperbolic trajectory, it is half the minimum distance between the two lobes.

$$a = -\frac{\mu}{2 \epsilon}$$

**3. Calculate [specific angular momentum](https://en.wikipedia.org/wiki/Specific_angular_momentum), $\vec{h}$:**

The specific angular momentum vector has units of the angular momentum of the satellite, divided by the mass of the satellite. Like orbital energy, angular momentum is conserved in keplerian orbits, and specific angular momentum is the other major parameter useful in finding the orbit's shape, as well as determining the orbit's orientation, and the satellite's direction of travel.

The specific angular momentum vector points perpendicular to the orbital plane. If it points above the reference plane, the orbit is a prograde orbit, and if it points below the reference plane, it is a retrograde orbit.

As a result, the specific angular momentum vector can be used to find other orbital parameters, including the [longitude of the ascending node](https://en.wikipedia.org/wiki/Longitude_of_the_ascending_node) and the [orbital inclination](https://en.wikipedia.org/wiki/Orbital_inclination).

$$\vec{h} = \vec{r} \times \vec{v}$$

**4. Calculate the [eccentricity vector](https://en.wikipedia.org/wiki/Eccentricity_vector), $\vec{e}$:**

The magnitude of the eccentricity vector is the orbital eccentricity, and its direction points towards the periapsis, making it useful in calculating [argument of periapsis](https://en.wikipedia.org/wiki/Argument_of_periapsis).

$$\vec{e}=\frac{\vec{v} \times \vec{h}}{\mu}-\frac{\vec{r}}{|r|}$$

$$e = |\vec{e}|$$
And with the magnitude of the eccentricity vector, you now can calculate periapsis ($q$) and apoapsis distances ($Q$).
$$q = a(1-e)$$
$$Q = a(1 +e)$$


---

