# Real-Time DTM Generation with Sequential Estimation and OptD Method
## 2 Materials and Methods
### Sequential Estimation in the Context of DTM Generation
The needed parameter estimators \(\hat{\mathbf{X}}\) can be obtained from the following relationships:  
\[\hat{\mathbf{X}}=-\left(\mathbf{A}^{T}\mathbf{P}\mathbf{A}\right)^{-1}\mathbf{A}^{T}\mathbf{P}\mathbf{L} \tag{3}\]  
\(\hat{\mathbf{v}}=\mathbf{A}\hat{\mathbf{X}}+\mathbf{L}\)  
The accuracy of the obtained quantities is assessed by determining, inter alia, the coefficient of variance:  
\[m_{0}^{2}=\frac{\hat{\mathbf{v}}^{T}\mathbf{P}\hat{\mathbf{v}}}{n-m} \tag{4}\]where \(m\) is the number of model parameters and \(\mathbf{P}\) is the weight matrix (where: n > m). Stage 3 of the calculations is loading the \(X_{i}\), \(Y_{i}\), and \(Z_{i}\) coordinates and a new dataset (new fragment of the point cloud) and performing surface prediction using the parameters \(\hat{\mathbf{X}}=[\hat{a}_{0}\ \hat{a}_{1}\ \hat{a}_{2}]^{T}\) obtained from sequence I. Predicting the \(Z_{i}\) values with dependence (1) results in the following formula:  
\[\hat{Z}_{i}=\hat{a}_{0}+\hat{a}_{1}X_{i}+\hat{a}_{2}Y_{i} \tag{5}\]  
The heights \(\hat{Z}_{i}\) obtained from the prediction should be verified with the values obtained from direct measurements with LiDAR technology. Verification entails determining the correction to the prediction resulting from the following dependence:  
\[\hat{Z}_{i}-Z_{i}=\hat{v}_{i} \tag{6}\]  
For the values \(\hat{v}_{i}\) determined in Equation (6), an acceptable tolerance should be created, for example, the following formula (or another criterion adopted by the operator):  
\[|\hat{v}_{i}|\leq km_{0} \tag{7}\]  
where \(k\) is a positive coefficient. The given probabilities \(\widetilde{p}\) originate from the Gaussian distribution and correspond to confidence intervals defined by the number of standard deviations \(k\) from the mean, e.g., \(k\) = 1 for probability \(\widetilde{p}\) = 0.68, \(k\) = 1.5 for \(\widetilde{p}\) = 0.87, and \(k\) = 3 for \(\widetilde{p}\) = 0.997. The final value of \(k\) depends on the operator performing the calculations. If all \(V_{i}\) values fall within the acceptable tolerance and condition (7) is fulfilled, the same polynomial model approximating the DTM is adopted as in sequence I. The failure to meet condition (7) (exceeding the tolerance) causes the polynomial model approximating the DTM adopted in sequence I to be changed to a new one. Further calculations are performed according to the following procedure:  
\[\mathbf{v}^{II}=\mathbf{A}_{P}^{II}\mathbf{X}_{P}^{II}+\mathbf{A}_{n}\mathbf{X}_{n}-\mathbf{L}^{II} \tag{8}\]  
where:  
\(\mathbf{v}^{II}\)--the vector of corrections to the intercepts of sequence II;  
\(\mathbf{X}_{P}^{II}\)--the vector of parameters obtained from sequence I included in the calculations of sequence II;  
\(\mathbf{A}_{P}^{II}\)--a known matrix of coefficients determined for the parameters of sequence I;  
\(\mathbf{X}_{n}\)--the vector of the new parameters determined in sequence II;  
\(\mathbf{A}_{n}\)--a known matrix of coefficients determined for the new parameters \(\mathbf{X}_{n}\);  
\(\mathbf{L}^{II}\)--the vector of intercepts of sequence II;  
\(\mathbf{\bar{X}}_{P}=\mathbf{\hat{X}}\)--the vector of parameters (pseudo-observations) obtained from sequence I;  
\(\mathbf{\Delta}_{\mathbf{X}}\)--the vector of pseudo-observation corrections \(\mathbf{X}_{P}=\mathbf{\hat{X}}\). The first equation from dependence (8) concerns the dataset obtained from the second sequence (new observations). The second dependence (\(\mathbf{\Delta}_{\mathbf{X}}=\mathbf{X}_{P}^{II}-\mathbf{X}_{P}\)) concerns corrections to the pseudo-observations \(\mathbf{\Delta}_{\mathbf{X}}\) obtained from stage I. Dependence (8) can also be written in the form of a block matrix:  
\[ \begin{bmatrix}\mathbf{v}^{II}\\ \mathbf{\Delta}_{\mathbf{X}}\end{bmatrix} = \begin{bmatrix}\mathbf{A}_{P}^{II}\mathbf{A}_{n}\\ \mathbf{E}\ 0\end{bmatrix}\begin{bmatrix}\mathbf{X}_{P}^{II}\\ \mathbf{X}_{n}\end{bmatrix} + \begin{bmatrix}-\mathbf{L}^{II}\\ -\mathbf{\bar{X}}_{P}\end{bmatrix}