## 2 Materials and Methods
### General Assumptions  
Three-dimensional models of terrestrial objects are built based on a set of points with coordinates (\(X\), \(Y\), \(Z\)) obtained using direct (total station measurements, 3D laser scanning) and indirect methods (close-range photogrammetry, remote sensing). The accuracy of the constructed model depends on the quality of the coordinates obtained. In the case of direct methods, the accuracy of a measured point \(Q\) (Figure 1) depends on sound knowledge of six total station or laser scanner external orientation parameters:  
* \(X_{s},Y_{s},Z_{s}\), the geocentric GRS80 coordinates of the origin \(P\) of the total stationtotal station or a terrestrial laser scanner (TLS) measuring frame \((x,y,z)\);
* \(\Sigma,\xi,\eta\), the orientation angles of the \((x,y,z)\) measuring frame with respect to the external reference frame \((X,Y,Z)\). The \(\xi\), and \(\eta\) orientation angles are the components of the total station or TLS vertical axis deflection from the normal to the GRS80 ellipsoid. The directional horizontal angle S is called the instrument orientation constant. The coordinates \(x,y,z\) of the point Q measured by the total station can be expressed using the known form [23; 24]:  
\[\mathrm{x}=\mathrm{d}\cdot\!\cos\alpha\cdot\!\sin\beta \tag{1}\]  
\[\mathrm{y}=\mathrm{d}\cdot\!\sin\alpha\cdot\!\sin\beta \tag{2}\]  
\[\mathrm{z}=\mathrm{d}\cdot\!\cos\beta+\mathrm{i}-\mathrm{j} \tag{3}\]where d-spatial distance, \(\alpha\)-horizontal direction, \(\beta\)-vertical angle (corrected due to refraction), i-the height of the total station above ground point P; and j-the reflector (surveying prism)'s height above ground point Q. The coordinates \((x,y,z)\) are converted to the \((X,Y,Z)\) external reference system of the point Q, according to the well-known formula [25]:  
\[ \begin{pmatrix}X\\ Y\\ Z\end{pmatrix} = \begin{pmatrix}X_{s}\\ Y_{s}\\ Z_{s}\end{pmatrix} +\left(\mathbf{R}(\Sigma)\mathbf{Q}(\xi,\eta,\varphi) \mathbf{P}(\varphi,\lambda)\right)^{T}\cdot \begin{pmatrix}x\\ y\\ z\end{pmatrix}  \tag{4}\]  
where  
\[\mathbf{P}(\varphi,\lambda)= \begin{pmatrix}-\sin\varphi\cos\lambda&-\sin \varphi\sin\lambda&\cos\varphi\\ -\sin\lambda&\cos\lambda&0\\ \cos\varphi\cos\lambda&\cos\varphi\sin\lambda&\sin\varphi\end{pmatrix}  \tag{5}\]  
\[\mathbf{Q}(\xi,\eta,\phi)= \begin{pmatrix}1&-\eta\tan\phi&-\xi\\ \eta\tan\phi&1&-\eta\\ \xi&\eta&1\end{pmatrix}  \tag{6}\]  
\[\mathbf{R}(\Sigma)= \begin{pmatrix}\cos\Sigma&\sin\Sigma&0\\ -\sin\Sigma&\cos\Sigma&0\\ 0&0&1\end{pmatrix}  \tag{7}\]  
The five external total station orientation parameters \((X_{s},Y_{s},Z_{s},\xi,\eta)\) can be obtained from GNSS measurements \((X_{s},Y_{s},Z_{s})\) and computed from the EGM gravity model [26]. The sixth parameter \(S\) can be determined by the solution of Equation (4) for the given total station measurements \((d,\alpha,\beta,i,j)\) and the coordinates from GNSS measurements at the total station point \(\mathrm{P}(X_{s},Y_{s},Z_{s})\) and the target point \(Q(X,Y,Z)\) using, e.g., the Levenberg-Marquardt method of conjugate gradients [27]. The integrated total station/GNSS/EGM geocentric points' positioning method can be applied to measurements on a single total station position, as well as on a few merged total station positions along a spatial traverse (Figure 2). Figure 1: Geocentric vs. topocentric (instrumental) reference system: \(X_{s},Y_{s},Z_{s},\Sigma,\xi,\eta\) are six parameters of the total station external orientation; \(\varphi\), \(\lambda\) are geodetic latitude and longitude; \(\alpha\), \(\beta\) are measured horizontal and vertical angles to the point \(Q(X,Y,Z)\); \(d\) is the measured distance to the surveyed point \(Q\); and \(i,j\) are the instrument and reflector heights. The offline adjustment algorithm and the significance of the deflection of the vertical components \((\xi,\eta)\) for the ultimate adjustment results are widely discussed in prior papers [28; 29; 30]. In the current work, we focus on the online procedures of adjusting the total station spatial traverse in real time.