Stabilization: force random perturbations during relay attitude
Stabilization: also perturbations work for relay rate mode

In relay rate mode random perturbations are now added to the
output like in relay attitue mode.
Stabilization: delete unused relay tuning

The old relay controller is no longer used, although the
flight mode for it is now used by the system identification
code.
Simulation: use actuator desired
Autotune: check in new algorithm

This now makes small controlled twitches on all axes
and then fits the parameters of the transfer function

                beta
             ---------
            s (1 + s * tau)

to the gyros and control outputs, which captures the
delay of the ESC in tau and the strength of the motors
in beta.  It also captures the bias in the output, but
that is not used in tuning.
Autotune: track the noise in the residuals

Knowing the gyro variance allows us to predict the noise
sensitivity and appropriately restrict the Kd value.
Autotune: parameters for faster convergence
Autotune: tweaks on the timing

Store the time step between updates for checking there
are no drops.
Ground: updated autotune equations

This uses the tau, beta, and noise values measured from the system
identification and computes the Kp, Ki, and Kd parameters for the
rate loop.

There are a number of constrains that went into the derivation of
these equations. It allows setting the pole (a) of the single
order root and the undamped frequenchy and damping coefficient
of the second order component.

That least one free component which is determined by limiting the
amount of noise of the transform at high frequencies.
Ground: improve autotune UI

Now it tells you the frequency you are tuning for.
matlab: code to generate the system ident code
matlab: system ident only use non-zero covariance terms

Store the covariance matrix in a linear array and generate
C code that has the indexes into the full array replaced with
those mapping into the spare array of non-zero elements. This
also allows only working with the elements in the upper
triangular component.

This reduces the covariance storage from 169 floats to 43, which
is twice those savings since the array must be duplicated.
matlab: system identification testing code

This is a C implementation with a mex wrapper and matlab code to
feed a log through the filter.
Autotune: use compacted covariance matrix

By only working with the non-zero elements of the upper triangular
components of the covariance matrix we can greatly reduce the
storage used by the covariance matrix from 169 elements to 43.

This saves 968 bytes of storage (since a duplicate is cached).
Autotune: change initial conditions

Start with fast strong response so it backs off. This initial
condition should converge better than assuming a small response.

It is also more ammenable to an adaptive output based on the
state estimate, so it would start with smaller outputs to get
equal resopnse.
Autotune: bigger output value
SystemIdent: adapt the step size based on beta estimate

This makes it start with small pulses and increase them as
it thinks the axis is smaller. This should make it work
across a variety of frame sizes.
Ground: optimize the Ki rate terms too

Uses new equations that calculates the integral component
in a more principled manner. This creates a fourth order
characteristic equation and tries to place all the poles
at the same location to get the fastest response.

The main limit on speed is what the derivative term can
be, which influences the high frequency noise sensitivity.
Ground: autotune parameters are now damping and noise
Ground: Autotune noise sensitivity more precise

Allow adjusting by 0.1% steps. Since typically there is a large
difference between 1 and 2% and for my mini quads something
like 0.8% is the max they can handle. The default is set to
0.5% which seems fine for all my frames.