A new feature in the Exoplanethunter android app is that the planets of our solar system and the Moon has been added to the star map. By using the phone's sensor (GPS sign) it is possible to pinpoint the objects on the night sky

So how is it possible to locate the planets and the moon in the sky. Here are a short mathematical explanation and a historical background to the theory.

Claudius Ptolemy was a Greek astronomer born around 90 and died around 170. He lived in the city of Alexandria in Egypt that was a Roman province at the time. He summarized and extended the ancient astronomical knowledge. He is known for the Ptolemaic system that was based on the ancient belief that the Earth was in the center of the universe and that the Sun, Moon, stars, and planets orbited Earth. A model that also was his predecessor Aristotle (384 BC-322 BC) position. A problem with the Geocentric model was to explain the weird movement of the planets. Ptolemy described the movements of the planets with epicycles. It means that the planet was moving in a circle and the center point on that circle was moved along the periphery on another circle with Earth near at center. Ptolemy introduced the concept of equant. It was the point from which the movement looked uniform. The equant was inside the circle and directly opposite to Earth from the center of the circle. The Ptolemaic system was the dominating astronomical system during antiquity and middle ages. The first astronomy book based on a heliocentric worldview was the Revolutions of the Heavenly Spheres. The book was written by the Polish astronomer Nicolaus Copernicus but was first published shortly before his death in 1543. In his model, Earth and the other planets were orbiting the Sun and that explained the weird movements of the planets. This theory was later supported by Galileo Galilei's work and the church banned the book.

The astronomer and mathematician Johannes Kepler studied the movement of the planet and made accurate calculations. He formulated three scientific laws that describe the motion of planets around the Sun. It was published between 1609 and 1619 and improved Copernicus heliocentric theory. These laws also laid the ground to Isaac Newton's laws of gravity.

Kepler's three laws are the following:

- The orbit of a planet is an ellipse with the Sun at one of the two foci.
- A radius vector joining any planet to the Sun sweeps out equal areas in equal lengths of time.
- The expression \(\frac {T ^ {2}} {r ^ {3}}\) gives the same constant value for all planets that orbit the Sun, where
*T*is the planet's orbit period and r is half the major axis of the ellipse.

To calculate the position of the planets on the sky seven steps are needed. A celestial object has coordinates right ascension and declination. These coordinates are fixed points with reference origo where the earth's celestial equator is crossed by the ecliptic line. How these coordinates could be calculated from a position on earth can be found here: How do locate stars

Step 1: Calculate the mean anomaly. The mean anomaly is the angular distance from the point where the planet was closest to the Sun (perihelion) which the planet would have moved if it had a circular orbit and with the same orbital period as the real planet moving on the ellipse. If we use a reference point in time where we know the value of the mean anomaly

$$M=M_{o}+\sqrt[]{\frac{\mu}{a^{3}}}(t-t_{0})$$

where a is the length of the semimajor axis of the orbit and \(\mu\) is the mean angular motion of the object

Step 2: calculate the true anomaly. The true anomaly is the real angle between the perihelion and the planet, seen from the sun and measured in the direction of movement of the planet. The true anomaly can be calculated from the mean anomaly by using a Fourier expansion

$$\nu =M+\left(2e-{\tfrac {1}{4}}e^{3}\right)\sin {M}+$$

$${\tfrac {5}{4}}e^{2}\sin {2M}+$$

$${\tfrac {13}{12}}e^{3}\sin {3M}+....$$

Step 3: calculate the distance from the sun. Eccentricity measure how an orbit deviates from circular by using the value of the planet eccentricity the distance from the sun could be calculated using this formula

$$r=\frac{a(1-e^{2})}{1+e\cos \nu }$$

Where *e *is the eccentricity

Step 4: calculate the rectangular heliocentric ecliptic coordinates these coordinates is

$$x= r(\cos\Omega\cos(\omega+\upsilon)-$$$$i\sin\Omega\sin(\omega+\upsilon))$$

$$y= r(\sin\Omega\cos(\omega+\upsilon)+$$$$\cos i\cos\Omega\sin(\omega+\upsilon))$$

$$z= r(\sin i\sin(\omega+\upsilon))$$

*i* is the inclination the angle between a plane of reference and the orbit of the planet. \(\omega\) is the angle between the periapsis (the closest distance from the sun) and its ascending node. \(\Omega\) is the ecliptic longitude. These four steps need to be done for both the Earth and the planet we are investigating

Step 5: calculate the coordinates of the planet relative to the Earth

$$x=x_{planet}-x_{earth}$$

$$y=y_{planet}-y_{earth}$$

$$z=z_{planet}-z_{earth}$$

Step 6 calculate the geocentric ecliptical longitude and latitude by using the coordinates in step 5.

$$\lambda = \arctan (y,x)$$

$$\beta =\arcsin\left (\frac{z}{\sqrt{x^{2}+{y^2}+z^{2}}}\right)$$

Step 6 Earth's tilt angle with respect to the ecliptic line (Earth's path around the sun) is called obliquity of the ecliptic \(\epsilon\). By using \(\lambda\) and \(\beta\) we can now calculate the right ascension \(\alpha\) and declination \(\delta\) of the planet with these formulas.

$$\delta = \arcsin(\sin\beta\cos\epsilon +$$$$ \cos\beta \sin\epsilon\sin\lambda)$$

$$\alpha = \arctan(\sin\lambda\cos\epsilon-$$$$\tan\beta\sin\epsilon\cos\lambda) $$

The moon's position need to be calculated in a different way as it revolves around Earth.

Geocentric ecliptical coordinates that were calculated in step 6 for planets could be calculated for the Moon using these formulas:

$$\lambda = L +6.289\sin M$$

$$\beta =5.128\sin F$$

Where* L *is the mean geocentric ecliptic longitude *M* mean anomaly and *F* mean distance

More details and example calculations can be found here aa.quae.nl

Hubble
51 Peg b
Andromeda
Ariel
Blackhole
Cheops
EPIC 201238110.02
GJ 1214 b
GJ 581 b
GJ 581 c
GJ 581 e
HD 40307 g
HD 85512 b
Kepler 22 b
Kepler-1090 b
Kepler-1606 b
Kepler-1625 b
Kepler-1638 b
Kepler-452 b
Kepler-62 e
Kepler-62 f
Mars
Plato
Proxima Cen b
Ross 128 b
Saturn
TRAPPIST-1 d
TRAPPIST-1 e
TRAPPIST-1 f
TRAPPIST-1 g
Teegarden b
Teegarden c
tau Cet e
tau Cet f