<p>If you know the apoapsis and periapsis, you can find the eccentricity, using $r_a = a (1+e), r_p = a (1-e)$ (<a href="https://en.wikipedia.org/wiki/Apsis#Mathematical_formulae" rel="nofollow">https://en.wikipedia.org/wiki/Apsis#Mathematical_formulae</a>).</p>

<p>Using the eccentricity, you can find the radius at any angle $\theta$ from the periapsis (this angle is also called the true anomaly).</p>

<p>$r(\theta) = \frac{a(1-e^2)}{1+e.\cos \theta}$(<a href="https://en.wikipedia.org/wiki/Kepler_orbit#Johannes_Kepler" rel="nofollow">https://en.wikipedia.org/wiki/Kepler_orbit#Johannes_Kepler</a>)</p>

<p>With time, it is little more difficult. The mean anomaly (M) is defined as</p>

<p>$M = \frac{2\pi t}{T}$ where t is the time since last periapsis, and T is the time period.</p>

<p>This mean anomaly relates to true anomaly through a variable called eccentric anomaly (E). From mean anomaly (which you get from the time), you can get eccentric anomaly using</p>

<p>$M=E-e.\sin E$</p>

<p>Now this equation isn't analytically solvable, but you can solve it graphically or numerically, or using a simple iteration which I would demonstrate here (technically included in the numerical methods, but it's easy enough to show here). It is easy enough to be done on a simple scientific calculator.</p>

<p>$E_{n+1}=M+e.\sin E_{n}$ where $E_0=M$</p>

<p>Using this E, you can find the true anomaly $\theta$ using</p>

<p>$\theta=2 \tan^{-1}[ \sqrt{\frac{1+e}{1-e}} \tan \frac {E}{2}]$</p>

<p>Then you can find the radius as described above.</p>

CC BY-SA 3.0
2014-07-07T03:46:50.530Z
This is much more complicated than I thought, so how would I calculate the eccentric anomaly with a single function? How do other programs do it? There are lots of programs that can plot the position of objects.
FaceySmile
CC BY-SA 3.0
2014-07-07T08:17:17.563Z
With time that is, should have mentioned that. I have a graph with a point orbiting around a nother and it's position should depend on the value of time t
FaceySmile
CC BY-SA 3.0
2014-07-07T10:02:16.133Z
As I mentioned, $E_{n+1}=M+e.\sin{E_n}$ is the iteration which you start with $E_0=M$. M you get directly from t. Input the M and $E_0$ and start iterating with each new value of E on the LHS that is input again into the RHS of the equation. You keep doing this till $E_{n+1}=E_{n}$. On a scientific calculator, for example, you evaluate $M+e.\sin{M}$ first, and then keep evaluating $M+e.\sin{Ans}$ (where 'Ans' is the previous answer) till you keep getting the same Ans (usually happens in 4-5 iterations). This Ans is then the value of E corresponding to the value of M. Is this clear enough?
Takku
CC BY-SA 3.0
2014-07-07T10:05:38.400Z
So you can go $t\rightarrow M \rightarrow E \rightarrow \theta \rightarrow r$. This looks complicated, but it's not too difficult if you can write a code/program/script.
Takku
CC BY-SA 3.0
2014-07-07T10:14:57.813Z
I think I get it now, (sorry this is a huge leap from Kerbal Space Program) so I simply find $M+e\sin{E_n}$, then substitute that result into $E_n$ and do it again. Thanks!
FaceySmile
CC BY-SA 3.0
2014-07-07T10:16:54.713Z
Yes, that is correct. (y) :)
Takku
CC BY-SA 3.0
2014-07-07T10:19:01.330Z
I now see that was what you were trying to tell me, so with my graph I could just use $E=M+e\sin{(M+e\sin{(M+e\sin{(M+e\sin{(M+e\sin{(\frac{2 \pi t}{T})})})})})}$

for example
FaceySmile
CC BY-SA 3.0
2014-07-07T10:22:22.607Z
where $M=\frac{2\pi t}{T} $ throughout the equation
FaceySmile
CC BY-SA 3.0
2014-07-07T10:26:10.837Z
Is the exact result an asymptote? Does it reach the exact answer and not change or does it just get really close.
FaceySmile
CC BY-SA 3.0
2014-07-07T10:29:48.600Z
That should work for small values of e (much less than 1). For larger values of e (say 0.9), you may need many more iterations, but if your e isn't more than, say 0.5, you should be fine with the above equation (which is 5 iterations), I would guess. And yes, it is an asymptote. It gets really close (and quite fast, especially for small values of e, where you can say it is pretty much exact). This will always be the case for this equation, irrespective of your method, since it is not analytically solvable. (Most numerical solutions converge asymptotically.)
Takku
CC BY-SA 3.0
2014-07-07T10:37:24.610Z
That's what I thought, that method of solving doesn't look like one that gives an exact result. I tried it and it works perfectly! Thanks for that, the internet served minimal use trying to get information, which is why I love this site. Thanks!
FaceySmile
CC BY-SA 3.0
2014-07-05T12:41:56.420Z
2014-07-05T12:41:56.420Z
Takku
<p>Knowing the apoapsis, periapsis and therefore period of an orbit, how can I find the radius of an object in an orbit at a given angle or time, whichever is needed. </p>

<p>For example, if I have an object m orbiting around object M with an apoapsis of 100m and a periapsis of 50m, what is the distance between m and M after t seconds, or at $\theta$ degrees. Which ever is needed. I say 'or' because I don't know what you would use to find the radius.</p>

<orbit><gravity><astrophysics>
Finding the radius of an eccentric orbit at any point
FaceySmile
# Finding the radius of an eccentric orbit at any point

(Asked by: username_0 on 2014-07-05)

Knowing the apoapsis, periapsis and therefore period of an orbit, how can I find the radius of an object in an orbit at a given angle or time, whichever is needed.

For example, if I have an object m orbiting around object M with an apoapsis of 100m and a periapsis of 50m, what is the distance between m and M after t seconds, or at $\theta$ degrees. Which ever is needed. I say 'or' because I don't know what you would use to find the radius.

**Tags:** orbit, gravity, astrophysics

---

## 1 answers

### Answer by username_1 on 2014-07-05. Score: 2 | Accepted answer

If you know the apoapsis and periapsis, you can find the eccentricity, using $r\_a = a (1+e), r\_p = a (1-e)$ (<https://en.wikipedia.org/wiki/Apsis#Mathematical_formulae>).

Using the eccentricity, you can find the radius at any angle $\theta$ from the periapsis (this angle is also called the true anomaly).

$r(\theta) = \frac{a(1-e^2)}{1+e.\cos \theta}$(<https://en.wikipedia.org/wiki/Kepler_orbit#Johannes_Kepler>)

With time, it is little more difficult. The mean anomaly (M) is defined as

$M = \frac{2\pi t}{T}$ where t is the time since last periapsis, and T is the time period.

This mean anomaly relates to true anomaly through a variable called eccentric anomaly (E). From mean anomaly (which you get from the time), you can get eccentric anomaly using

$M=E-e.\sin E$

Now this equation isn't analytically solvable, but you can solve it graphically or numerically, or using a simple iteration which I would demonstrate here (technically included in the numerical methods, but it's easy enough to show here). It is easy enough to be done on a simple scientific calculator.

$E\_{n+1}=M+e.\sin E\_{n}$ where $E\_0=M$

Using this E, you can find the true anomaly $\theta$ using

$\theta=2 \tan^{-1}[ \sqrt{\frac{1+e}{1-e}} \tan \frac {E}{2}]$

Then you can find the radius as described above.

> **Comments:**
> **username_0**: This is much more complicated than I thought, so how would I calculate the eccentric anomaly with a single function? How do other programs do it? There are lots of programs that can plot the position of objects.  
> **username_0**: With time that is, should have mentioned that. I have a graph with a point orbiting around a nother and it's position should depend on the value of time t  
> **username_1**: As I mentioned, $E_{n+1}=M+e.\sin{E_n}$ is the iteration which you start with $E_0=M$. M you get directly from t. Input the M and $E_0$ and start iterating with each new value of E on the LHS that is input again into the RHS of the equation. You keep doing this till $E_{n+1}=E_{n}$. On a scientific calculator, for example, you evaluate $M+e.\sin{M}$ first, and then keep evaluating $M+e.\sin{Ans}$ (where 'Ans' is the previous answer) till you keep getting the same Ans (usually happens in 4-5 iterations). This Ans is then the value of E corresponding to the value of M. Is this clear enough?  
> **username_1**: So you can go $t\rightarrow M \rightarrow E \rightarrow \theta \rightarrow r$. This looks complicated, but it's not too difficult if you can write a code/program/script.  
> **username_0**: I think I get it now, (sorry this is a huge leap from Kerbal Space Program) so I simply find $M+e\sin{E_n}$, then substitute that result into $E_n$ and do it again. Thanks!  
> **username_1**: Yes, that is correct. (y) :)  
> **username_0**: I now see that was what you were trying to tell me, so with my graph I could just use $E=M+e\sin{(M+e\sin{(M+e\sin{(M+e\sin{(M+e\sin{(\frac{2 \pi t}{T})})})})})}$  for example  
> **username_0**: where $M=\frac{2\pi t}{T} $ throughout the equation  
> **username_0**: Is the exact result an asymptote? Does it reach the exact answer and not change or does it just get really close.  
> **username_1**: That should work for small values of e (much less than 1). For larger values of e (say 0.9), you may need many more iterations, but if your e isn't more than, say 0.5, you should be fine with the above equation (which is 5 iterations), I would guess. And yes, it is an asymptote. It gets really close (and quite fast, especially for small values of e, where you can say it is pretty much exact). This will always be the case for this equation, irrespective of your method, since it is not analytically solvable. (Most numerical solutions converge asymptotically.)  
> **username_0**: That's what I thought, that method of solving doesn't look like one that gives an exact result. I tried it and it works perfectly! Thanks for that, the internet served minimal use trying to get information, which is why I love this site. Thanks!  

---

