An Integrated Method for Coding Trees, Measuring Tree Diameter, and Estimating Tree Positions

Accurately measuring tree diameter at breast height (DBH) and estimating tree positions in a sample plot are important in tree mensuration. The main aims of this paper include (1) developing a new, integrated device that can identify trees using the quick response (QR) code technique to record tree identifications, measure DBH, and estimate tree positions concurrently; (2) designing an innovative algorithm to measure DBH using only two angle sensors, which is simple and can reduce the impact of eccentric stems on DBH measures; and (3) designing an algorithm to estimate the position of the tree by combining ultra-wide band (UWB) technology and altitude sensors, which is based on the received signal strength indication (RSSI) algorithm and quadrilateral localization algorithm. This novel device was applied to measure ten 10 × 10 m square plots of diversified environments and various tree species to test its accuracy. Before measuring a plot, a coded sticker was fixed at a height of 1.3 m on each individual tree stem, and four UWB module anchors were set up at the four corners of the plot. All individual trees’ DBHs and positions within the plot were then measured. Tree DBH, measured using a tree caliper, and the values of tree positions, measured using tape, angle ruler, and inclinometer, were used as the respective reference values for comparison. Across the plots, the decode rate of QR codes was 100%, with an average response time less than two seconds. The DBH values had a bias of 1.89 mm (1.88% in relative terms) and a root mean square error (RMSE) of 5.38 mm (4.53% in relative terms). The tree positions were accurately estimated; the biases on the x-axis and the y-axis of the tree position were −8.55–14.88 cm and −12.07–24.49 cm, respectively, and the corresponding RMSEs were 12.94–33.96 cm and 17.78–28.43 cm. The average error between the estimated and reference distances was 30.06 cm, with a standard deviation of 13.53 cm. The device is cheap and friendly to use in addition to its high accuracy. Although further studies are needed, our method provides a great alternative to conventional tools for improving the efficiency and accuracy of tree mensuration.


Introduction
Diameter at breast height (DBH), measured at a height of 1.3 m on the bole of a tree, is the most commonly measured tree attribute [1][2][3], whether for inventory, management, or research purposes, since many tree and forest attributes [4,5], such as basal area, volume [6], and stand density [7], are derived from DBH measurements [8]. Therefore, developing tools that can measure tree DBH accurately, efficiently, and conveniently is always desirable. The main device and its components: 1, the left arm; 2, the middle beam; 3, the right arm; 4, the vertex; 5, the keys; 6, the display panel; 7, the flange; 8, the first angle sensor; 9, the battery; 10, the printed circuit board (PCB); and 11, the second angle sensor.  The main device and its components: 1, the left arm; 2, the middle beam; 3, the right arm; 4, the vertex; 5, the keys; 6, the display panel; 7, the flange; 8, the first angle sensor; 9, the battery; 10, the printed circuit board (PCB); and 11, the second angle sensor.

Technology of Coding Trees
A QR scanner (Figure 2a) is used to decode the QR code (encoded by NiceLabel 2017 Barcode software [19]), which is printed on a sticker (Figure 2b). Other information, such as the identification (ID) numbers of the plot and the tree and the reference point, can also be found on the sticker. For example, for the QR code of "TN0002 | YN0001" (Figure 2b); "TN0002" is the tree ID, and "YN0001" is the sample plot ID. Note that, if stickers are not used, the tree-codes will be generated automatically in the process of measuring trees' DBH and positions.

Technology of Coding Trees
A QR scanner (Figure 2a) is used to decode the QR code (encoded by NiceLabel 2017 Barcode software [19]), which is printed on a sticker (Figure 2b). Other information, such as the identification (ID) numbers of the plot and the tree and the reference point, can also be found on the sticker. For example, for the QR code of "TN0002 | YN0001" (Figure 2b); "TN0002" is the tree ID, and "YN0001" is the sample plot ID. Note that, if stickers are not used, the tree-codes will be generated automatically in the process of measuring trees' DBH and positions.

Angle Calculation
As shown in Figure 1, tree DBH is measured by measuring αi (i = 1, 2) values. When the central axis of the angle sensor rotates, the change in the angle has a linear relationship with the change in the output voltage signal. Therefore, the voltage signals from ADS modules can be converted to αi (i = 1, 2) using the following equation:

) Vr
Un Vz (Uc Un where Un is the ADS value of the current input voltage of the two angle sensors, Uci is the ADS value of the output voltage of the i th angle sensor, Vzi is the reference value of the output voltage of the i th angle sensor at initialization when αi equals 0°, and Vr is the reference value of the input voltage of the two angle sensors at initialization.

Double-Sided Two-Way Ranging
The basic ranging principle of the UWB modules used in this method is double-sided two-way ranging (DS-TWR) [46][47][48][49][50]. Clock drift correction and signal power error may affect the accuracy of the position. The DS-TWR is an additional round of communication based on single-sided two-way ranging (SS-TWR) [46][47][48][49][50][51]. The time of the two types of communication can compensate each other for the errors caused by the clock offset [46][47][48][49][50][51][52] and signal power error [51,52] to improve the accuracy of the DS-TWR. Figure 3 presents an example of calculating the distance (Dis) between two nodes (A and B). The distance between node A and node B can be calculated as follows:

Angle Calculation
As shown in Figure 1, tree DBH is measured by measuring α i (i = 1, 2) values. When the central axis of the angle sensor rotates, the change in the angle has a linear relationship with the change in the output voltage signal. Therefore, the voltage signals from ADS modules can be converted to α i (i = 1, 2) using the following equation: where U n is the ADS value of the current input voltage of the two angle sensors, U ci is the ADS value of the output voltage of the i th angle sensor, V zi is the reference value of the output voltage of the i th angle sensor at initialization when α i equals 0 • , and V r is the reference value of the input voltage of the two angle sensors at initialization.

Double-Sided Two-Way Ranging
The basic ranging principle of the UWB modules used in this method is double-sided two-way ranging (DS-TWR) [46][47][48][49][50]. Clock drift correction and signal power error may affect the accuracy of the position. The DS-TWR is an additional round of communication based on single-sided two-way ranging (SS-TWR) [46][47][48][49][50][51]. The time of the two types of communication can compensate each other for the errors caused by the clock offset [46][47][48][49][50][51][52] and signal power error [51,52] to improve the accuracy of the DS-TWR. Figure 3 presents an example of calculating the distance (Dis) between two nodes (A and B). The distance between node A and node B can be calculated as follows: where node A and node B are two communication UWB nodes; Dis is the distance between node A and node B; t p is the time of the wireless signal propagation in the air; c is the speed of light in the air; time is the time axis; T 1 is the time when node A sends the first pulse; T 2 is the time when node B receives the first pulse; T 3 is the time when node B sends the first pulse; T 4 is the time when node A receives the first pulse; T 5 is the time when node A sends the second pulse; T 6 is the time when node  where node A and node B are two communication UWB nodes; Dis is the distance between node A and node B; tp is the time of the wireless signal propagation in the air; c is the speed of light in the air; time is the time axis; T1 is the time when node A sends the first pulse; T2 is the time when node B receives the first pulse; T3 is the time when node B sends the first pulse; T4 is the time when node A receives the first pulse; T5 is the time when node A sends the second pulse; T6 is the time when node B receives the second pulse; tround1 is the total time of node A sending and receiving pulses in the first round of communication; treply1 is the reply time for node B in the first round of communication; tround2 is the total time of node B sending and receiving pulses in the second round of communication; treply2 is the reply time for node A in the second round of communication.

Study Area
This study was carried out in Lin'an (N30°15′, E119°43'), China. We selected 10 square plots with a size of 10 × 10 m. These plots varied greatly in average tree DBH, environment, and tree species composition (Table 2). Plots 1-5 were located at the Botanical Garden of Zhejiang A&F University, dominated by artificial forest and turf. Plots 6-10 were located in the suburb of Lin'an, dominated by natural forest, dense weeds, and shrubs.

Study Area
This study was carried out in Lin'an (N30 • 15 , E119 • 43 ), China. We selected 10 square plots with a size of 10 × 10 m. These plots varied greatly in average tree DBH, environment, and tree species composition ( Table 2). Plots 1-5 were located at the Botanical Garden of Zhejiang A&F University, dominated by artificial forest and turf. Plots 6-10 were located in the suburb of Lin'an, dominated by natural forest, dense weeds, and shrubs.

The System Workflow
As shown in Figure 4, the system flow, from top to bottom, consisted of the software layer, data layer, hardware layer, physical layer, and object layer. A few subprograms, including a human-computer interaction program, which is used for keyboard input and display control, a sampling program, which is used for reading tree codes and DBH values and tree position data extraction, and a data management program, which is used for encoding data storage and data communication, were incorporated into Sensors 2020, 20, 144 6 of 19 the software layer. After completing an individual tree's measurement (see Section 3.2.2), the tree ID, its DBH value, and position were automatically saved to the system. Figure 4, the system flow, from top to bottom, consisted of the software layer, data layer, hardware layer, physical layer, and object layer. A few subprograms, including a human-computer interaction program, which is used for keyboard input and display control, a sampling program, which is used for reading tree codes and DBH values and tree position data extraction, and a data management program, which is used for encoding data storage and data communication, were incorporated into the software layer. After completing an individual tree's measurement (see Section 3.2.2), the tree ID, its DBH value, and position were automatically saved to the system.

The Operation Workflow
To complete the measurement of a plot, the following tools and instruments are needed: the device, coded stickers, a nail gun, short nails, and four UWB modules (referred to as anchors A, B, C, and D). The coded stickers were fixed at a height of 1.3 m on individual trees in the plot. The anchors (Figures 5 and 6) were set up at plot corners as follows: first, anchor A was set up in one corner of the plot, and then the device was used to measure the altitude of corner A (HA). Second, anchor B was set up in a neighboring plot corner of A, and the altitude of the corner was measured (HB) as well as the distance between anchors A and B (DisAB). The same step was repeated to set up anchors C and D in the remaining plot corners, and their altitudes (HC and HD) were measured as well as the distances between corners (DisAC, DisBC, DisAD, DisBD, and DisCD).
A tree was measured as follows ( Figure 7): first, the investigator scanned the tree QR code, followed by measurement of the tree DBH twice at two different directions (mainly followed the major and minor DBH directions). For each measure, values of α1 and α2 were automatically used to calculate the tree DBH (see Section 3.2.3). The average of the two measurements was used as the tree DBH. Finally, the device was placed at the bottom of the tree to obtain Hn, An, Bn, Cn, and Dn. Here, Hn is the altitude of the device, An, Bn, Cn, or Dn is the distance between anchors A, B, C, or D and the device, respectively, and n refers to the nth tree in the plot. The above steps were repeated to finish measuring all the trees in the plot. Similar to the DBH value, each tree's position was estimated twice, and the average was used as the tree position value. The measurement data were then uploaded to a person computer (PC) for further analysis.

The Operation Workflow
To complete the measurement of a plot, the following tools and instruments are needed: the device, coded stickers, a nail gun, short nails, and four UWB modules (referred to as anchors A, B, C, and D). The coded stickers were fixed at a height of 1.3 m on individual trees in the plot. The anchors (Figures 5 and 6) were set up at plot corners as follows: first, anchor A was set up in one corner of the plot, and then the device was used to measure the altitude of corner A (H A ). Second, anchor B was set up in a neighboring plot corner of A, and the altitude of the corner was measured (H B ) as well as the distance between anchors A and B (Dis AB ). The same step was repeated to set up anchors C and D in the remaining plot corners, and their altitudes (H C and H D ) were measured as well as the distances between corners (Dis AC , Dis BC , Dis AD , Dis BD , and Dis CD ).     Figure 8 provides an example of measuring tree DBH using the device, with A, B, and C being the contact points of the device's arms and beam against the tree trunk, which results in two arcs, arc BA and arc BC. Since the cross-section surface may be eccentric, arcs BA and BC have different A tree was measured as follows ( Figure 7): first, the investigator scanned the tree QR code, followed by measurement of the tree DBH twice at two different directions (mainly followed the major and minor DBH directions). For each measure, values of α 1 and α 2 were automatically used to calculate the tree DBH (see Section 3.2.3). The average of the two measurements was used as the tree DBH. Finally, the device was placed at the bottom of the tree to obtain H n , A n , B n , C n , and D n . Here, H n is the altitude of the device, A n , B n , C n , or D n is the distance between anchors A, B, C, or D and the device, respectively, and n refers to the nth tree in the plot. The above steps were repeated to finish measuring all the trees in the plot. Similar to the DBH value, each tree's position was estimated twice, and the average was used as the tree position value. The measurement data were then uploaded to a person computer (PC) for further analysis.     Here, w equals the half width of the arms or beam; h equals w plus the maximum width of the vertex; and s equals the half distance between the axes of two angle sensors.

Measurement Algorithm of a Tree's DBH
In order to obtain the value of the tree DBH, the si (i = 1,2) values are needed, which can be calculated using Taylor's expansion in the following equations: where θi = αi × 3.141592/180 and I = 1, 2.
The calculated si can then be used to calculate the radius, ri, using Taylor's expansion, in the following equations: The tree DBH is then calculated as the total of r1 and r2: Since r1 and r2 are calculated based on different arcs, the impacts of eccentric tree cross-sections on measuring DBH would be accounted for, resulting in a more accurate estimate than that obtained using conventional dendrometers.

Estimation Algorithm of a Tree Position
In order to obtain a tree's position in a plot, the spatial coordinate system of four anchors is first transformed into a plane rectangular coordinate system OXY (Figure 9). Here, w equals the half width of the arms or beam; h equals w plus the maximum width of the vertex; and s equals the half distance between the axes of two angle sensors.
In order to obtain the value of the tree DBH, the s i (i = 1,2) values are needed, which can be calculated using Taylor's expansion in the following equations: where θ i = α i × 3.141592/180 and I = 1, 2.
The calculated s i can then be used to calculate the radius, r i , using Taylor's expansion, in the following equations: The tree DBH is then calculated as the total of r 1 and r 2 : Since r 1 and r 2 are calculated based on different arcs, the impacts of eccentric tree cross-sections on measuring DBH would be accounted for, resulting in a more accurate estimate than that obtained using conventional dendrometers.

Estimation Algorithm of a Tree Position
In order to obtain a tree's position in a plot, the spatial coordinate system of four anchors is first transformed into a plane rectangular coordinate system OXY (Figure 9). The plane OXY is perpendicular to the gravity direction, the origin O is the location of anchor A, and the x-axis is the projection direction from anchor A to anchor B. The three-dimensional scalars HA, HB, HC, HD, DisAB, DisBC, DisAC, DisAD, and DisBD are then transformed into two-dimensional scalars in the OXY plane.
The coordinates of anchors A, B, C, and D can then be obtained.
Similarly, the projection distances an, bn, cn, and dn can be calculated as follows: Here, an, bn, cn, and dn represent the projection distances between anchors A, B, C, and D, respectively, and the device in the OXY plane. n refers to the nth tree in the plot.
Although UWB wireless signals have very strong penetration ability, in reality, the random ranging error may be caused by humans and/or the tree body [48][49][50][51][52][53], resulting in a prolonged communication time between the UWB nodes. Therefore, the values of an, bn, cn, and dn may be slightly higher than the respective actual values, and consequently, the four circles may not intersect at one common point (Figure 10a). The received signal strength indication (RSSI) algorithm [50][51][52][53][54][55][56], such as quadrilateral localization (Figure 10a), provides an alternative to solve this problem and to improve the accuracy and precision. The plane OXY is perpendicular to the gravity direction, the origin O is the location of anchor A, and the x-axis is the projection direction from anchor A to anchor B. The three-dimensional scalars H A , H B , H C , H D , Dis AB , Dis BC , Dis AC , Dis AD , and Dis BD are then transformed into two-dimensional scalars in the OXY plane.
The coordinates of anchors A, B, C, and D can then be obtained.
Similarly, the projection distances a n , b n , c n , and d n can be calculated as follows: Here, a n , b n , c n , and d n represent the projection distances between anchors A, B, C, and D, respectively, and the device in the OXY plane. n refers to the nth tree in the plot. Although UWB wireless signals have very strong penetration ability, in reality, the random ranging error may be caused by humans and/or the tree body [48][49][50][51][52][53], resulting in a prolonged communication time between the UWB nodes. Therefore, the values of a n , b n , c n , and d n may be slightly higher than the respective actual values, and consequently, the four circles may not intersect at one common point (Figure 10a). The received signal strength indication (RSSI) algorithm [50][51][52][53][54][55][56], such as quadrilateral localization (Figure 10a), provides an alternative to solve this problem and to improve the accuracy and precision. From Figure 10a, we can develop four trilateration localizations with each of three circles (ABC, ABD, ACD, and BCD). Taking ABC (Figure 10b) as an example, where three circles, A, B, and C are intersected, three lines, L1, L2, and L3, are formed by linking the intersections of any two circles. According to the trilateration localization algorithm [53][54][55][56][57][58], the following equations can be developed: The coordinates of Q1 (X1, Y1) can be obtained from Equation (9). By the same token, the coordinates of the three other connecting points of the three other trilateration localizations can be obtained-Q2 (X2,Y2), Q3 (X3,Y3), and Q4 (X4,Y4). Then, according to the RSSI algorithm and quadrilateral localization algorithm [59], the above equations can be used to calculate the coordinates of Xn and Yn as follows:

Evaluation of the Accuracy of the DBH and Tree Position
The major and minor DBHs of each tree were measured using a caliper in the 10 plots, and their average was used as the reference DBH value for comparison. The accuracy of using the device to measure tree DBH was evaluated by comparison with the reference DBH values and by calculating the error, bias, relative bias, root mean square error (RMSE), relative RMSE, and mean absolute percent error (MAPE), as defined in the following equations: From Figure 10a, we can develop four trilateration localizations with each of three circles (ABC, ABD, ACD, and BCD). Taking ABC (Figure 10b) as an example, where three circles, A, B, and C are intersected, three lines, L 1 , L 2, and L 3 , are formed by linking the intersections of any two circles. According to the trilateration localization algorithm [53][54][55][56][57][58], the following equations can be developed: The coordinates of Q 1 (X 1 , Y 1 ) can be obtained from Equation (9). By the same token, the coordinates of the three other connecting points of the three other trilateration localizations can be obtained-Q 2 (X 2 ,Y 2 ), Q 3 (X 3 ,Y 3 ), and Q 4 (X 4 ,Y 4 ). Then, according to the RSSI algorithm and quadrilateral localization algorithm [59], the above equations can be used to calculate the coordinates of X n and Y n as follows: (10)

Evaluation of the Accuracy of the DBH and Tree Position
The major and minor DBHs of each tree were measured using a caliper in the 10 plots, and their average was used as the reference DBH value for comparison. The accuracy of using the device to measure tree DBH was evaluated by comparison with the reference DBH values and by calculating the error, bias, relative bias, root mean square error (RMSE), relative RMSE, and mean absolute percent error (MAPE), as defined in the following equations: Sensors 2020, 20, 144 where d j is the jth tree DBH measured using the device, d jr is the jth tree reference DBH measured using the caliper, and n is the number of measured trees. The reference value of the tree position was also measured and converted into the OXY plane coordinate system. First, the plane coordinate of the tree bottom position nearest to the x-axis or y-axis was determined by the measured values of a tape scale, an angle ruler, and an inclinometer. Then, half of the tree DBH value was added to or subtracted from the reference position value of the plane coordinate in the y-axis or x-axis direction. The BIAS and RMSE were calculated to reflect the accuracy of the tree position in the x-axis and y-axis directions, respectively. The errors of the distance (Ed) between the estimated and the reference position values were calculated as follows: Here, x j and y j are the jth tree position estimators in the x-and y-axis directions, respectively; x jr and y jr are the jth position reference values in the x-and y-axis directions, respectively, of the OXY plane coordinate system.

Tree Identification
The decoding rate of QR codes from the coded stickers on trees was 100%, and the decoding response time was short, less than two seconds.

Evaluation of DBH
The DBHs measured by the device were similar to those measured by the caliper (Figure 11), resulting in an overall BIAS of 1.89 mm (1.88%) and an RMSE of 5.38 mm (4.53%) across all plots ( Table 3). The BIAS for an individual plot varied from −0.62 (Plot 10) to 5.13 mm (Plot 3), and on a relative term from −0.25 to 3.54%. The RMSE values by plot were small, ranging from 3.48 to 6.84 mm, and from 2.29 to 5.76% in a relative term. Variation in BIAS or RMSE was not strongly related to tree DBH size, tree species, and plot slope (Table 3). Also, the BIAS or RMSE between the plots in the botanical garden (plots 1-5) and those in the natural stands (plots 6-10) were comparable. The error for each tree size distributed normally (Figure 12). There was a trend, however, that as the DBH increased, more variation in error was observed. The smaller DBH groups tended to have larger MAPEs. For the largest DBH group (from 250 to 350 mm), the average error was larger than zero, suggesting that the device overestimated the tree DBH compared to the caliper.         Figure 13 presents the errors of the distance (Ed) between the estimated and corresponding reference position values by individual tree, ranging from 0 to 77 cm in the plane OXY. The bias ranged from approximately −8.55 to 14.88 cm on the x-axis and from −12.07 cm to 24.69 cm on the y-axis ( Table 4). The RMSEs in the x-axis (21.85 cm) and y-axis (24.53 cm) directions were similar (Table 4). No significant correlation (approximately −0.26 to 0.30) was found between the errors in the x-axis and y-axis directions. The mean value of Ed was 30.06 cm, with a standard deviation of 13.53 cm across plots and ranged from 23.44 to 38.08 cm by plot ( Table 5). The average Ed of plots 1 to 5 was relatively lower than that of plots 6 to 10. Additionally, if the plot had a larger slope or more trees, Ed was relatively larger. Across all plots, the correlation coefficients of the mean Ed were 0.78 with the slope and 0.24 with the stand density. Relatively, slope had relatively more influence on mean Ed than the stand density.  Figure 13 presents the errors of the distance (Ed) between the estimated and corresponding reference position values by individual tree, ranging from 0 to 77 cm in the plane OXY. The bias ranged from approximately −8.55 to 14.88 cm on the x-axis and from −12.07 cm to 24.69 cm on the y-axis ( Table 4). The RMSEs in the x-axis (21.85 cm) and y-axis (24.53 cm) directions were similar (Table 4). No significant correlation (approximately −0.26 to 0.30) was found between the errors in the x-axis and y-axis directions. The mean value of Ed was 30.06 cm, with a standard deviation of 13.53 cm across plots and ranged from 23.44 to 38.08 cm by plot ( Table 5). The average Ed of plots 1 to 5 was relatively lower than that of plots 6 to 10. Additionally, if the plot had a larger slope or more trees, Ed was relatively larger. Across all plots, the correlation coefficients of the mean Ed were 0.78 with the slope and 0.24 with the stand density. Relatively, slope had relatively more influence on mean Ed than the stand density.

Discussion
In this study, we reported a device that can identify trees using QR code technology, measure tree DBHs using angle sensors, and estimate tree positions using UWB modules and altitude sensors. Use of the QR code is very common in modern daily life, due to its low cost and advanced technology, but it is rarely used in forestry, especially in inventory plot surveys. To our knowledge, this is the first study to integrate QR code technology into a tree dendrometer to identify trees. In forestry inventories, tree identification data are of high value for retrospective data and database management development.
Conventional dendrometers are only accurate for trees that are circular in cross-section. When a tree cross-section is eccentric, it is recommended to measure the major and minor diameters or two diameters perpendicular to each other, using a tree caliper, and to use their average as the tree DBH value [26]. Different from conventional tools, the device described here takes into account the fact that the cross-sections of trees are not always circular by calculating the radii of different arcs. We evaluated the accuracy of the device in measuring DBH by comparing it to the corresponding DBH values measured twice using a tree caliper. The resulting BIAS and RMSE were small (Table 3), suggesting the device is accurate in measuring tree DBH. Modern tools to measure DBH have been developed to improve accuracy. Liang et al. [8] used a multi-single-scan TLS method to estimate tree DBH. Those authors mapped five dense forest plots, compared the results with manual field measurements, and reported an RMSE range from 0.90 to 1.90 cm. Reference [4] estimated the tree DBH of nine square plots using simultaneous localization and mapping (SLAM) algorithms paired with a time-of-flight (TOF) camera. The DBH estimations had a 0.33 mm (1.78%) BIAS and a 1.26 cm (6.39%) RMSE. Reference [1] used unmanned aerial system-based photogrammetry and terrestrial photogrammetry to estimate tree DBH. The error of the diameter estimation was observed to be less than 1 cm in terms of RMSE. Reference [27] used 3D point clouds of individual trees collected using the CRP method to estimate the tree DBH of four species. The relative RMSE varied from 0.90% to 1.85%, strongly depending on tree species. While the accuracies of the above methods are high and time-efficient, their practical applications in forest inventories, particular in large and dense forests, are still limited since these methods involve complicated procedures in data processing and require specific tools. Even though our method is based on a simple trigonometric theorem, the obtained BIAS (0.19 cm and 1.88%) and RMSE (0.54 cm and 4.53%) ( Table 3) were either comparable to or even lower than those reported above. The DBH measurement accuracy of the methods based on TLS, CRP, or TOF may be affected by environmental conditions such as light intensity and stand density. The effects of environmental conditions on our device's accuracy may be small, which explains why the BIAS and RMSE (Table 3) did not vary substantially with plot slope, tree species, or stand type.
Our results also suggest that the device can estimate tree positions accurately, with the resulting BIAS (−8.55 to 14.88 cm on the x-axis and −12.07 to 24.49 cm on the y-axis), RMSE (12.94-33.96 cm and 17.78-28.43 cm on the x-axis and the y-axis, respectively), and Ed (30.06 cm) being small. Reference [4] estimated the tree position using the SLAM algorithms paired with a TOF camera and reported an RMSE of 0.12 m, regardless of the axis directions. Their results, however, were based on sample plots on a flat site with no weeds and small shrubs; therefore, the actual use of their method in dense forests needs further verification. While application of SLAM algorithms paired with a TOF seems promising in terms of precision, it is known to be affected by stand environments, such as stand density, abundance of shrubs and vegetation, etc., and involves complicated data processing procedures, limiting its application to forest inventory. Reference [37] reported a position error of less than 0.5 m, although with a systematic shift, and they used five cameras to realize their method, which is impractical for forest surveys. Reference [44] used an extended Kalman filter (EKF) method that integrated inertial navigation system (INS) and UWB data. They tested their method in an indoor area of 10 × 10 m and found that the positioning error of UWB was between 10 and 30 cm and INS-UWB was less than 15 cm. Clearly, our device can obtain similar or more accurate position estimates than the above cited methods, even our device only uses the trilateration localization algorithm, RSSI algorithm, and quadrilateral localization algorithm, which have a much lower complexity in both time and space. Note that the accuracy in estimating tree positions using our device may be affected by stand environments. The slope correlated more positively with Ed than the stand density did (Table 2 and Figure 14). Therefore, further studies are needed to improve accuracy in estimating positions in various environments and find how to reduce influence from slope. Our results also suggest that the device can estimate tree positions accurately, with the resulting BIAS (−8.55 to 14.88 cm on the x-axis and −12.07 to 24.49 cm on the y-axis), RMSE (12.94-33.96 cm and 17.78-28.43 cm on the x-axis and the y-axis, respectively), and Ed (30.06 cm) being small. Reference [4] estimated the tree position using the SLAM algorithms paired with a TOF camera and reported an RMSE of 0.12 m, regardless of the axis directions. Their results, however, were based on sample plots on a flat site with no weeds and small shrubs; therefore, the actual use of their method in dense forests needs further verification. While application of SLAM algorithms paired with a TOF seems promising in terms of precision, it is known to be affected by stand environments, such as stand density, abundance of shrubs and vegetation, etc., and involves complicated data processing procedures, limiting its application to forest inventory. Reference [37] reported a position error of less than 0.5 m, although with a systematic shift, and they used five cameras to realize their method, which is impractical for forest surveys. Reference [44] used an extended Kalman filter (EKF) method that integrated inertial navigation system (INS) and UWB data. They tested their method in an indoor area of 10 × 10 m and found that the positioning error of UWB was between 10 and 30 cm and INS-UWB was less than 15 cm. Clearly, our device can obtain similar or more accurate position estimates than the above cited methods, even our device only uses the trilateration localization algorithm, RSSI algorithm, and quadrilateral localization algorithm, which have a much lower complexity in both time and space. Note that the accuracy in estimating tree positions using our device may be affected by stand environments. The slope correlated more positively with Ed than the stand density did (Table 2 and Figure 14). Therefore, further studies are needed to improve accuracy in estimating positions in various environments and find how to reduce influence from slope. Note that the plot size adopted in this study is 100 m 2 , much smaller than the regular plot size often used in forestry inventory. This raises a concern of using the device to estimate positions in more realistic scenarios since the performance of four UWB sensors would probably degrade when the plot area is large. However, the range accuracy deteriorates only when the distance between two UWB nodes is over 100 m [59], which is much longer than the side length of a typical plot. In a plot of regular size, the line-of-sight (LOS) paths between nodes may be obstructed, resulting in None-Line-of-Sight (NLOS) situations, in particular when the plot is located within a natural, dense stand. Even the UWB technology offers the great potential of achieving high ranging accuracy through its ability to resolve multipath and penetrate obstacles in harsh environments [60], its localization performance may be reduced by NLOS propagation. Although UWB signal cannot penetrate metal media or thick wall, it does have capability of penetrating trees or weed, which was supported by measuring some of the plots in this study Note that the plot size adopted in this study is 100 m 2 , much smaller than the regular plot size often used in forestry inventory. This raises a concern of using the device to estimate positions in more realistic scenarios since the performance of four UWB sensors would probably degrade when the plot area is large. However, the range accuracy deteriorates only when the distance between two UWB nodes is over 100 m [59], which is much longer than the side length of a typical plot. In a plot of regular size, the line-of-sight (LOS) paths between nodes may be obstructed, resulting in None-Line-of-Sight (NLOS) situations, in particular when the plot is located within a natural, dense stand. Even the UWB technology offers the great potential of achieving high ranging accuracy through its ability to resolve multipath and penetrate obstacles in harsh environments [60], its localization performance may be reduced by NLOS propagation. Although UWB signal cannot penetrate metal media or thick wall, it does have capability of penetrating trees or weed, which was supported by measuring some of the plots in this study where NLOS were true. Furthermore, several techniques have been proposed to reduce the impact of NLOS range estimates on the estimated agent position [60]. Conventionally, the RSSI is not popularly used for UWB because it does not exploit fine space resolution of impulsive signals [61]. In our method, at least three points are required in order to calculate the position on the plane, which fitted well for RSSI algorithm and four UWB Anchors. In every calculation, we need to deal with four positions (Q 1 (X 1 , Y 1 ), Q 2 (X 2 , Y 2 ), Q 3 (X 3 , Y 3 ), and Q 4 (X 4 , Y 4 )) obtained from four tri-UWB Anchors combinations. If one position has a stronger signal, it will be given more weight (see Equation (10)). Overall, extension of the results to typical large plots, in particular when they are located in dense stands, should be taken with caution and further studies on this topic should be carried out to confirm our findings. Alternatively, measurements can be done based on four sensors for every 10 m × 10 m area. This seems feasible, at least economically, since each UWB sensor costs less than twenty dollars.
The SLAM algorithm, convex hull algorithm, and point cloud algorithm used in other studies [4,25,27,37] usually need mobile phones or computers with 32-or 64-bit capacity. The device reported in this paper only needs the STC15, an 8-bit microprocessor, with the price being less than one dollar. In terms of computation, our method only needs four operations to obtain the estimates of DBH and tree position, making it much simpler than the other algorithm-based methods.

Conclusions
The novelty of the dendrometer reported here is that the device can measure tree identification, position, and DBH concurrently. Specifically, we integrated several advanced technologies (UWB, QR code, altitude sensor, and so on) into the device to improve the measurement accuracy. The experimental results show that this device can be used to accurately estimate DBH and tree positions. Additionally, the device is cheap and easy to use. Nonetheless, we will continue to improve the device, in particular, improving the measurement accuracy of DBH for large trees (i.e., with DBH > 50 cm) and tree positions in complex environments.