## 4 Digital Model of the Area of Interest
### Digital Terrain Model
Points of the set \(S^{\prime}\), \(M_{S^{\prime}}\), \(V_{S^{\prime}}\), are created based on relation (4). 5. The digital model of the terrain is going to be an \(A=(a_{ij})\) matrix of type \(mx\times my\). The significant points \(\left[x^{\prime}_{l},y^{\prime}_{l},z^{\prime}_{l}\right]\in S^{\prime}\) are going to be elements \(a_{x^{\prime}_{l}y^{\prime}_{l}}\) of the matrix \(A\) and their values are going to be the height of the terrain \[a_{x^{\prime}_{l}y^{\prime}_{l}}=z^{\prime}_{l}\] (6) ```
**Algorithm 1**Creating a digital model of the terrain around the area of interest. A digital image of the terrain (matrix \(A\) of type \(mx\times my\) in units of \(d\)) can be created by using the point \(O^{\prime}=[0,0,h_{0}]\), with dimensions \(mx\times my\times mz\). It is necessary to find point \(O^{\prime}\) in the field too (it is a point with GPS coordinates [min \(x\), min \(y\), \(h_{0}\)]. It is necessary to digitally scan the terrain so the point \(O^{\prime}\) will be located in the lower-left corner of the  
Figure 1: Digital terrain model and the origin O.  
digital model. The \(x\)-axis is defined by a straight line between point \(O\) and point \(O_{x}\) (this point has GPS coordinates [min \(x\), \(y_{0}\)] and points \(O,O^{\prime},O_{x}\) form one plane) and \(y\)--axis is placed between point \(O\) and point \(O_{y}\) (this point has GPS coordinates [\(x_{0}\), min \(y\)] and the points \(O,O^{\prime},O_{y}\) form one plane). The scanned area will be a rectangle of size \(mx\times my\) in \(d\) units. The digital terrain model described here can be seen in the Figure 1 image. The \(O,O_{x}\) points define the \(x\)-axis, the \(O,O_{y}\) points define the \(y\)-axis. A Matrix \(A\) can be assigned to this coordinate system (see (6)), which defines the height of the terrain points. Different heights in our image are displayed in different colors. The coordinates [\(x_{0}\), min \(y\)] are the coordinates of a significant point, if there are several such points \(x_{0}\), we choose \(x_{0}\) arbitrarily. The value of min \(y\) determines the location of the \(x\)-axis. The situation is similar with the \(y\)-axis and the point [min \(x\), \(y_{0}\)]. The resulting two-dimensional coordinate system is necessary for modeling the observed area and the sensor network. Considering the size of the area, we can use a two-dimensional coordinate system. A digital image of the terrain must be created to obtain a matrix \(A\). In the matrix \(A\) it is necessary to mark significant points \(S^{\prime}\) according to the assignment (5) and significant points that must be included in the area of interests \(M_{S^{\prime}}\) and internal significant points \(V_{S^{\prime}}\). Conversion of GPS coordinates to the Cartesian system (4) is possible, e.g., in MATLAB using the command:  
\[[X,Y,Z]=geodetic2 cef(spheroid,lat,lon,h) \tag{7}\]  
This command is used to convert geodetic coordinates to the Earth-centred, Earth-fixed coordinate system (ECEF). In this case, the height \(h\) is the ellipsoidal height of the point, \((lat,lon)\) are the GPS coordinates of the point and the parameter _spheroid_ is a parameter of the MATLAB system, which stands for the fact that we are examining in our considerations globe. When we have available the ellipsoid heights of the points, we can apply the command (7). Then assignment  
\[a_{xy}=Z \tag{8}\]  
Defines the elements of the matrix \(A=(a_{xy})\) of type \(mx\times my\) in \(d\) units. Matrix \(A\) represents the digital model of the terrain. This model using raster data structures. When the altitude or orthometric height \(H\) is available, we need to calculate the ellipsoidal height \(h\). The relation ships between heights are shown in Figure 2. Methods for calculating altitude (orthometric height) can be found in publications such as [9]. Another option is to apply newer versions of the program MATLAB (newer than R2022b), where theoretical calculations are already implemented and there are functions for this calculation [12].