Robust least squares adjustment

The robust least squares adjustment used in GROOPS is based on a modified Huber estimator. It downweights observations with large otuliers iteratively.

The algorithm starts with a first solution with equal weights $\M P =\M I$ \[ \hat{\M x} = (\M A^T\M P\M A)^{-1}\M A^T\M P\M l. \]The solution is used to compute the residuals \[ \hat{e}_i = \left(\M l - \M A \hat{\M x}\right)_i \]and the redundancies of all observations \[ r_i = \left(\M I - \M A(\M A^T\M P\M A)^{-1}\M A^T\M P\right)_{ii}. \]For observations with large residuals a new standard deviation is assigned \[ \sigma_i = \begin{cases} 1 & \text{for } \left|\frac{\hat{e}_i}{r_i}\right| \le h\cdot\hat{\sigma} \\ \left|\frac{\hat{e}_i}{r_ih}\right|^p & \text{for } \left|\frac{\hat{e}_i}{r_i}\right| > h\cdot\hat{\sigma}, \end{cases} \]where $h$ is huber, $p$ is huberPower, and $\hat{\sigma}^2$ a robust overall variance factor computed from all residuals. The estimation is repeated huberMaxIteration times with a new weight matrix \[ \M P = \text{diag}\left(\frac{1}{\sigma_1^2}, \frac{1}{\sigma_2^2}, \ldots, \frac{1}{\sigma_n^2}\right) \] or until convergence is reached.