# Operating

2016-07-17

Let’s face it, space is a risky business. I always considered every launch a barely controlled explosion. – Aaron Cohen, Deputy Administrator of NASA

# Gravity assist

Consider a spacecraft $P$ and a celestial body $O$. When getting close to $O$, the gravity will get important enough to significantly change the trajectory of the spacecraft. The goal is to get it to turn without using any fuel and while keeping the same velocity (in a different direction). The speed of the mobile will increase as it heads towards the periapsis X, trading its gravitational potential for kinetic energy; it will then decrease when moving away from X. Overall, the total energy will be conserved and it will move as fast when leaving O as when getting there.

Now, this velocity change is done relatively to $O$. If we note vP the velocity of P relatively to O and vO the velocity of O around its primary, the velocity of P around O’s primary is vP before encountering O and vP + vO after (note that the red trajectory moves with O along the blue trajectory). Voyager 2 flew by Jupiter, Saturn, Uranus and Neptune, but the swingby of Neptune actually slowed down the vessel as it turned slightly out of the trajectory (out of the plane in the image). The Cassini-Huygens spacecraft left the Earth for the green solar orbit (1997); it then flew twice by Venus to increase its orbit to the red one (1998) and then to the blue one (1999). The blue trajectory was further improved by gravity assists by the Earth (1999) and by Jupiter (2000). 

# Rendez-vous

The goal of rendez-vous is to make the position and velocity of a spacecraft $P1$ roughly matching those of $P2$. Once the spacecrafts have performed a rendez-vous, they can do useful action such as docking or crew transfer.

After rendez-vous, two vessels would be moving along a very similar orbit. On short durations (compared to the orbital periods), the pull of gravity can simply be ignored like if the vessels were subject to no force at all (making docking simple).

Same position and same velocity means a similar orbit. Once both satellites are revolving around the same body, the first correction is that of inclination: one will perform an inclination change (either (anti-)normal burn, straight burn, or bi-elliptical). When they are orbiting in the same plane, they will have to consort their orbits, and synchronize on the final orbit.

A simple way to do this is to have the orbits joining in one point (say, the periapsis) while their period is significantly different. After a few revolutions, the two spacecraft will get in the common point at the same time and will be able to join their orbit. It is handy to correct the orbits before the last revolution to get a more accurate rendez-vous. P2 will reach X ahead of P1; however, the red orbit has a higher apoapsis and thus a longer period: after some time, P1 will catch up with P2

# Satellite coverage

Assume we want to set up a satellite network around a body $O$. The coverage is done with satellites in circular orbits. It is handy to have several satellites around the same orbit; to cover a band on the surface at all time. The fist thing to ensure is that the satellites stays connected.

## Connectivity

We are interested in two values: the closest approach of the lines-of-sight to $O$, notated $h$, that must be greater than the radius of the body $R$ and the distance between the satellites, notated $s$ that must be lower than the range of the satellites antennas ${r}_{a}$. There are 5 satellites on the red orbit around O. The surface is shown in blue and the lines-of-sight of the satellites in green.

What we have to choose is the number of satellites $n$ and their distance from $O$, $r$. With, $\mathit{\alpha }=\frac{2\mathit{\pi }}{n}$ and simple trigonometry, we get that:

$h=r\mathrm{cos}\frac{\mathit{\alpha }}{2}=r\mathrm{cos}\frac{\mathit{\pi }}{n}$

and

$s=2r\mathrm{sin}\frac{\mathit{\alpha }}{2}=2r\mathrm{sin}\frac{\mathit{\pi }}{n}$

Thus, with the requirement that $h>R$ and $s>{r}_{a}$, we need:

$\frac{R}{\mathrm{cos}\frac{\mathit{\pi }}{n}}

Conversely, if we want to know the the necessary value of $n$ for a given altitude $r$, we have to ensure that:

Functions $\mathrm{arccos}$ and $\mathrm{arcsin}$ are only defined from $-1$ to $1$ meaning that we need that $r>R$; this makes sense. Moreover, when $2r<{r}_{a}$, the second conditions should be ignored, since it means the whole orbit stays in range.

Similar information is available on the KSP wiki .

## Coverage

The curvature of Kerbin makes that a satellite sees less than half the surface; the closer it is the surface, the less it can see. X1 and X2 are the farthest point that P can see from this distance; the line (PX1) is said to be tangent to the circle, and there is a right angle in X1
This property is used on the surface: the crow’s nest is an observation spot located high in the masts of a ship to see significantly farther away. The distance you can see from altitude $a$ is $R\mathrm{arccos}\frac{R}{R+a}$.

We quickly see that $\mathrm{sin}\mathit{\alpha }=\mathrm{cos}\mathit{\beta }=\frac{R}{r}$.

# Light exposition The light rays are shown in orange. When P is in the blue part of the orbit, it does not receive light from the primary star.

Consider the typical case of a satellite running on photovoltaic cells. Most of the time, it can relies on the sunlight emitted by the local star. However, for some time during each orbit, it will pass behind its primary (unless it is orbiting the star itself). During that duration, it will thus have to run on batteries. To know the needed electrical capacity, we will need to know how long an episode lasts. A schematic representing the situation with some points, lines and angles that will turn useful.

As shown in the schematic above, we can see that $\mathrm{sin}\mathit{\theta }=\frac{{N}_{e}H}{{N}_{e}O}$. Since ${N}_{e}H=R$ (the radius of the primary) and ${N}_{e}O=b\mathrm{cos}\mathit{\theta }$ (the radius of the orbit), we get:

$\mathrm{sin}\mathit{\theta }=\frac{R}{b}$

From this, we can determine that the dark time start with eccentric anomaly $E={E}_{s}=\mathit{\pi }-\mathit{\theta }$ and ends at eccentric anomaly $E={E}_{e}=\mathit{\pi }+\mathit{\theta }$. Then:

t_dark = t(E=E_e) - t(E=E_s)
= 1 (M(E= + ) - M(E= - ))
= 1 ( ( + - e ( + )) - ( - - e ( - ) )
= 2 ( + e )
= 2 (^-1(R) + e R)

TODO