# Lost understanding this formula

• Nov 20th 2011, 03:49 PM
ishtar
Lost understanding this formula
Hello Everyone

I am currently attempting to improve both my programming and mathematical skills by following a book which gives the required mathematical formulae to calculate the current position and distance to the Sun. So far I have managed to understand all the mathematics and am writing a Java program to effect this calculation.

Sadly, I have hit a brick wall (Headbang) with understanding the following formula. Yes, I know it's simple and I am being rather silly. (Crying)

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

I am pretty sure that the square brackets around $[\frac{1+ e}{1-e}]$ are Iverson brackets but I wouldn't bet my life on it. I have merely used the Latex syntax to display the formula as it is printed in my book.

Perhaps I am being stupid but alas mathematics is not my strongest subject compounded by the fact that it's been years since I did any formal mathematical studies.

If it's not asking to much would somebody be so kind as to explain this by way of pseudo code?

Many Thanks
Nikki
• Nov 20th 2011, 05:24 PM
skeeter
Re: Lost understanding this formula
the equation looks familiar ... one form of Kepler's equation I believe.

$\tan{\frac{\mu}{2}} = \sqrt{\frac{1+e}{1-e}} \cdot \tan{\frac{E}{2}}$

the lower case $e$ is orbital eccentricity, $0 < e < 1$ , if I remember right.

can't remember what $\mu$ or $E$ represent.

what are you trying to do with it?
• Nov 20th 2011, 07:16 PM
ishtar
Re: Lost understanding this formula
Hello and thank you for replying

Firstly, I will apologise and correct an error in my first post: I should have used $\nu$ instead of $\mu$. It was a simple typing error.

Yes, I am indeed trying to solve Kepler's Equation. More accurately, I am trying to solve Kepler's standard equation for Elliptic orbits. I have already solved:

$E - e sin E = M$

Where: $E$ is the Eccentric Anomaly, $M$ is the Mean Anomaly and $e$ is the Orbital Eccentricity.

I then use the following equation in order to find the true anomaly $\nu$

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

where $E$ is the Eccentric Anomaly, $\nu$ is the true Anomaly and $e$ is the Orbital Eccentricity.

Unfortunately, this is where I am having a problem. I don't really understand the equation and therefore unable to translate it into Java code.

I'm really stuck on this one (Surprised)
Regards Nikki
• Nov 20th 2011, 07:46 PM
takatok
Re: Lost understanding this formula
Quick Note on the following. Whenever you see the word anomaly think angle. This term is often used by astronomers because the actual data on planet/star positions often showed small deviations from predicted values.

This equation is solving for the angle between the perihelion of a planet and its position at some time T. Assume the following:
A planet's orbit is an ellipse around the sun, with the perihelion (closest approach to the sun) and aphelion(farthest distance form the sun) lying at some points on the x axis (a,0) and (-a,0). The 2 foci of the ellipse are: (f,0) and (-f,0). With the sun lying at the point (f,0).

Some definitions:
ph = perihelion. Location at (a,0).
ap = aphelion Location at (-a,0)
** Both of these values will need to be looked up in some table.
f = distance of the foci from the center of the ellipse. The sun lies at (f,0)
P = Period of the planet in years.
a = semi major radius (also known as the semi-major axes) of the ellipse. This is in units of AU (Astronomical Unit)
e = eccentricity of ellipse. $0\leq e \leq 1$
** e=0 is a circle, e=1 is a line.
M(t) = mean anomaly of the planet (This is the angle between the Perihelion and the planet's position if it were a circular orbit).
E(t) = Eccentric anomaly of the planet. A term to be solved for to help find the True Anomaly
$\varphi (t)$ = True anomaly of the planet. The actual angle between the perihelion and the planet's position.
t= time. Time is assumed that at t=0 the planet is at perihelion. Measured in years.

$a = \frac{ph+ap}{2}$
$f = a-ph$
$P^2 = a^3$
** For earth this is $P=\sqrt{1^3} = 1\ year$
$e=f/a$
$M(t) = \frac{2\pi t}{P}$

$E(t)-e \sin(E(t))=M(t)$

E(t) is a transcendental equation and thus not solvable algebraically. We must use some numerical method to solve it. For example solve is using newton's method by finding the roots of the equation:

$F(E) = E-e\sin(E)-M(t)$
Remember this will give you an answer in radians so convert to degrees if you are using that. How to solve an equation using newton's method is beyond the scope of this answer and easily found/looked up elsewhere.

Now that you have E(t).

$\varphi(t)=2\arctan(\sqrt {\frac{1+e}{1-e}}\tan(\frac{E(t)}{2}))$
The above equation is the same as your original one, just solved for $\varphi(t)$
$\varphi(t)$ is $\mu$ in your original post.

At this point you can solve for the radial distance, r:
$r = \frac{a (1-e^2)}{1+e\cos(\varphi(t))}$

Now you have the polar co-ordinates of your planet at time T.
(r, $\varphi(t)$)

These however are not the heliocentric co-ordinates. All planets elliptical orbits are not on the same plane, and thus heliocentric co-ordinates are used to absolutely define a position within the solar system. Thats a bit more complicated from this point but this should get you going.
• Nov 23rd 2011, 08:33 AM
ishtar
Re: Lost understanding this formula
A big thank you takatok for such splendid help (Happy) I now have a good understanding of this equation.

I have been working away so couldn't log in sooner to thank you.

Once again, many thanks.

Nikki