David Franklin
Philip Massey

Included in this file is an explanation of our controllers and their
respective proofs. This information is likely to also be present in our
final writeups, but is included here in a briefer format for your
convenience.

Descent
-------
Our descent controller was developed to simply land the rocket. Assuming
that the rocket has some initial height and velocity, we can use the
main engines / thrusters of the rocket to decelerate the rocket to land
with at most some downwards speed V_safe. The control decisions have some
efficiency in mind. The first choice looks that if the rocket is not at a
safe speed, it will decelerate until it is. It then decides if the rocket
can simply free fall to it's destination and still be safe. As this is the
most efficient solution, it takes it if possible. Otherwise, the rocket
will coast with the minimum necessary deceleration to land (therefore
using as little of it's main engines as possible).

Balance
-------
Our balance controller is rather basic, due to reasons we'll discuss later.
The controller's main assumption is that the rocket does not start with any
rotational velocity or acceleration. Therefore, in order to keep the rocket
safe, all it needs to do is keep the rotational acceleration 0. Because the
rocket must start in a safe state, this will keep it in a safe state for all
time. As our equations of motion use sinx, we approximate it as x. First
because it is reasonable to assume that the rocket should not be safe
outside a tilt of 30 degrees, which is where the sine approximation holds.
Besides that, we work in polar coordinates. This means that the sine
approximation is not used in the evolution of the system, but just to
describe the amount of force being applied on the rocket. Because our goal
is to cancel out this acceleration, assuming that sinx = x does not change
the logic behind our code.

Our reasons for keeping the initial rotational velocity and acceleration at 0
are throughly discussed in our writeup, but the gist of it is that the
equations that describe the motion of our system are second order nonlinear
equations, even with the simplifying assumption that sinx = x. It is
impossible to analytically solve these equations. We attempted to bound the
solutions by using upper bounds such as applying the maximum possible
acceleration over any given time period. However, because the acceleration
is directly dependent on position this assumption of making acceleration
a constant for the bounds means that we will accidentally treat all
positions equally, when really we should not. This means we either have too
much acceleration when the rotation is close to 0 or too little acceleration
when the rotation is close to theta_max. Either way we quickly enter unsafe
conditions.

Combined
--------
Our combined controller simply combines the two above controllers and their
similar logic. We first pick a vertical acceleration to land with, and then
the balance controller (as it was very general by design) can adapt to pick
the correct rotational acceleration to balance it. Unfortunately we were not
able to prove this controller (possibly due to a bug in KeyMaera's ODE solve?).
