### Table of Contents

# How do I Calculate Distance from Period?

I've been asked how Orbital Calculator can calculate the distance an object is from a gravitational mass, using just its period (the time it takes to complete an orbit). The technique is relatively simple, so I'll explain it.

### More than just a Period

First off, you'll note that you can only use gravitational masses that are in the database. If it doesn't exist, you can add it yourself. This means the program knows more than the orbital period - it also knows the mass of the object it orbits, and the radius of that mass. Now we know three things!

- The mass of the gravitational mass
- the radius of the gravitational mass
- the time it takes the satellite to complete one orbit (its period)

Let's use the Sun as our gravitational mass, and Mars as the satellite. It'll help with the explanations as we go along. Mars has an orbital period of 687 days.

### Newtonian Mechanics

Isaac Newton determined that a mass gives rise to a gravitational force, and that the force decreases exponentially with distance. Therefore, at distance **X** from the Sun, gravity exerts force ** f**. At twice the distance,

**2X**, the force of gravity is

**(square root of**

*√f***).**

*f*This gives rise to a problem. To calculate the distance, we need to know the force of gravity, but to know the force of gravity, we need to know the distance. Getting around this problem can be done by solving both sides of the equation at once, but that's a headache.

Let's look at another problem. Suppose we already have the distance between the two objects. We know the mass of the Sun, so we know the force of gravity at the centre of the Sun. Since we know the distance to the satellite, we can calculate how much the force of gravity has depreciated. That in turn allows us to calculate the orbital speed of the satellite (which must equal the force of gravity), and since we know the radius of the orbit, we can calculate the length of its circumference. Circumference divided by speed gives us the time it takes to complete the orbit - the period.

The calculation might sound horrendous, but it's not:

r = distance ( "r**3" means 'r cubed') GM = G (gravitational constant) times M (the mass of the Sun) t = 2PI * √( (r**3) / GM ) t is the period for the orbit with radius r.

### Taking the Easy Route

The solution to our original problem is to calculate an orbit with a known radius, and then find out what the orbital period is using the calculation above (the result is the period in seconds).

We now have two periods - one for our target orbit, and one for our known orbit. We divide the target period by the known orbit, and then calculate the square root of the result.

t = target period T = known period e = √(t / T)

Then we take the radius of the known orbit and multiply it by the result we just calculated:

x = r * e

This result * x*, we then use to calculate a new orbit, which is much closer to the target orbit. We then repeat the whole procedure, using this new orbit as the known orbit, and finessing our way up until we discover the target orbit.

How accurate is this? We can get within a kilometre of the target orbit, but often will find it exactly. Even doing this on paper is easier than using Newton's equations, and this sort of repetitive calculation is something that computers are very good at.

### Caveats

Of course, there's a catch. This method doesn't take into consideration the mass of the satellite. When calculating the orbit of artificial satellites and spacecraft, that's perfectly fine. When calculating the orbits of rocky planets around a star, this is pretty much fine as well, since their mass is insignificant compared to the star. Our Sun is 332,946 times the mass of the Earth, which is the largest of the rocky planets in the solar system.

However, Jupiter is massive, and its mass is anything but insignificant. The same is true of our moon, whose mass is 0.0123 Earth masses, and has the second largest mass ratio to its host in the solar system (Pluto/Charon have the largest mass ratio).

It's probably not a good idea to calculate the distance of a gas- or ice-giant from its star, since there will be large inaccuracies. You should avoid calculating orbits of moons which (in comparison to their host planet) are large.

There is a problem with Mercury too. Newtonian mechanics is completely unable to deal with Mercury with any accuracy, and it wasn't until Einstein came along with Relativity (his theory of gravity) that its orbit was finally calculated properly. The reason is that Mercury is so close to the Sun that you really need to understand how gravity distorts spacetime, which Newtonian mechanics doesn't deal with.

## Discussion