# Use of Total Least Squares Adjustment in Geodetic Applications
## 3 Practical Examples  
### The Regression Line  
We fit the regression line to ten points, which do not lie on a straight line. The mathematical equation connecting measurements and unknowns is represented by the equation of a straight line: \(y=kx+r\). The unknowns are the coefficients \(k\) and \(r\). In the classical adjustment approach (LS with or without weights), the \(x\)-coordinates represent a \"constant\" value, and the \(y\)-coordinates are treated as a \"measured\" value (Table 1). A numerical example of coordinates and associated weights in Table 1 is taken from [13; 14] and is also presented in [7]. The rank of \(\mathbf{A}\) is 2 and 3 of the extended matrix \([\mathbf{A}|\mathbf{b}]\). This is the result of points that do not lie on the same straight line. We are looking for a solution for \(k\) and \(r\) by different adjustment approaches (Table 2):  
* Least squares adjustment without weights (LS),
* Using SVD without weights as an alternative approach to LS (LS_SVD),
* Total least squares without weights using SVD (TLS_SVD),
* Least squares adjustment with weights (WLS),
* Total least squares with weights (WTLS), and
* Generalized LS (GLS) when both \(x\)- and \(y\)-coordinates are measurements. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **“Constant”** & **“Measured”** & **Weights** & & \([\mathbf{A}|\,\mathbf{b}]\) & \\ \hline
**Point** & \(x\) & \(y\) & \(p_{x}\) & \(p_{y}\) & **A** & **b** \\ \hline T1 & 0.0 & 5.9 & 1000 & 1 & 0.0 & 1 & 5.9 \\ \hline T2 & 0.9 & 5.4 & 1000 & 2 & 0.9 & 1 & 5.4 \\ \hline T3 & 1.8 & 4.4 & 500 & 4 & 1.8 & 1 & 4.4 \\ \hline T4 & 2.6 & 4.6 & 800 & 8 & 2.6 & 1 & 4.6 \\ \hline T5 & 3.3 & 3.5 & 200 & 20 & 3.3 & 1 & 3.5 \\ \hline T6 & 4.4 & 3.7 & 80 & 20 & 4.4 & 1 & 3.7 \\ \hline T7 & 5.2 & 2.8 & 60 & 70 & 5.2 & 1 & 2.8 \\ \hline T8 & 6.1 & 2.8 & 20 & 70 & 6.1 & 1 & 2.8 \\ \hline T9 & 6.5 & 2.4 & 1.8 & 100 & 6.5 & 1 & 2.4 \\ \hline T10 & 7.4 & 1.5 & 1 & 500 & 7.4 & 1 & 1.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: “Measured” points with weights and elements of extended matrix \([\mathbf{A}|\mathbf{b}]\). The criterion for stopping the iterations for WTLS is \(\delta=10^{-12}\). In this case, we obtain eight iterations. In Figure 2, it can be seen that when adjustment is performed according to the WLS (purple line), the solution is completely fitted to the points with larger weights for the \(y\)-coordinate. The solution by the WTLS method (green line) considers all weights equally, for both \(y\) and \(x\). The solution in this case is much more reasonable. The solution of the generalized least squares model is numerically close to the WTLS solution. The geometric meaning of adjustment by taking into account the errors in the unknowns (EIV) in the regression line can be explained as follows [11; 15]: If we search for a solution by treating the coordinate \(y\) as a measured value and \(x\) as a constant, we obtain a solution under the condition of the minimum sum of the squares of the measured values. That is, the minimum sum of the squares of the corrections to the \(y\)-coordinates after adjustment (dashed line in Figure 3). If we also treat the \(x\)-coordinates as measured values, we are looking for the minimum of the sum of the squares of the corrections of the measured \(x\)- and \(y\)-coordinates simultaneously. Therefore, we minimize the sum of the squares of the perpendicular distances of the \"measured\" points from the regression line (dashed-dotted line in Figure 3).