## 4 Method
### Calibration of Installation Error of Triangular Plate
Besides, walls with windows should be avoided, because irregularly shaped curtains may interfere with the extraction of the planes; (**b**) the 3D point cloud of the conference room, from which we extracted the planes corresponding to 4 walls. We marked them with different colors to distinguish them. There are 6 vectors in (**b**), where the vectors \(\mathbf{n}_{1}\), \(\mathbf{n}_{2}\), \(\mathbf{n}_{3}\), \(\mathbf{n}_{4}\) are the unit normal vectors of the 4 planes, and the vectors \(\mathbf{i}\) and \(\mathbf{j}\) are the unit normal vectors of \(X\)-axis and \(Y\)-axis of coordinate frame \(O\). to the vector \(j\), as a result of which, \(E_{\text{atti}}=0\). While the angular deflection of the 3D point cloud \(\mathbf{C}_{O}\) is between \(-90^{\circ}\) and \(+90^{\circ}\), \(E_{\text{atti}}\) increases as the absolute value of the angular deflection increases. Obviously, in the actual situation, the angular deflection of the 3D point cloud \(\mathbf{C}_{O}\) cannot exceed the above range. We denote the skew angle of the point cloud \(\mathbf{C}_{O}\) as \(\varphi_{\text{error}}\), that is, the angular deviation of the point cloud \(\mathbf{C}_{O}\) relative to the correct attitude in the direction of \(Z\)-axis. If we rotate point cloud \(\mathbf{C}_{O}\) by angle \(\varphi_{\text{error}}\) to make it coincide with the correct attitude, then we can make \(E_{\text{atti}}=0\). Since the vectors \(\mathbf{n}_{1}\), \(\mathbf{n}_{2}\), \(\mathbf{n}_{3}\), \(\mathbf{n}_{4}\) are extracted from the point cloud \(\mathbf{C}_{O}\), while we rotate point cloud \(\mathbf{C}_{O}\), vectors \(\mathbf{n}_{1}\), \(\mathbf{n}_{2}\), \(\mathbf{n}_{3}\), \(\mathbf{n}_{4}\) are also be rotated. We substitute the rotated vectors into Formula (11), and we can get the following formula:  
\[f(\varphi_{\text{error}})=|\mathbf{R}_{\text{error}}\mathbf{n}_{1}\cdot\mathbf{i}|+|\mathbf{R} _{\text{error}}\mathbf{n}_{3}\cdot\mathbf{i}|+|\mathbf{R}_{\text{error}}\mathbf{n}_{2}\cdot \mathbf{j}|+|\mathbf{R}_{\text{error}}\mathbf{n}_{4}\cdot\mathbf{j}| \tag{12}\]  
where \(\mathbf{R}_{\text{error}}\) is a rotation matrix calculated according to angle \(\varphi_{\text{error}}\)  
\[\mathbf{R}_{\text{error}}=\left[ \begin{array}{ccc}c(\varphi_{\text{error}})&- s(\varphi_{\text{error}})&0\\ s(\varphi_{\text{error}})&c(\varphi_{\text{error}})&0\\ 0&0&1\end{array} \right] \tag{13}\]  
It is easy to find that, ideally:  
\[f(\varphi_{\text{error}})=0 \tag{14}\]  
The angle \(\varphi_{\text{error}}\) is numerically equal to the difference between the actual value and the expected value of angle \(\alpha\), that is:  
\[\varphi_{\text{error}}=\alpha-30^{\circ} \tag{15}\]  
where \(30^{\circ}\) is the expected value of the angle \(\alpha\). Combining Formulas (12), (13), (15), we can change the independent variable of the function \(f(\varphi_{\text{error}})\) from \(\varphi_{\text{error}}\) to \(\alpha\), that is, function \(f_{\text{cost}}(\alpha)\) can be constituted, as shown below:  
\[f_{\text{cost}}(\alpha)=|\mathbf{R}_{\text{error}}\mathbf{n}_{1}\cdot\mathbf{i}|+|\mathbf{R} _{\text{error}}\mathbf{n}_{3}\cdot\mathbf{i}|+|\mathbf{R}_{\text{error}}\mathbf{n}_{2}\cdot \mathbf{j}|+|\mathbf{R}_{\text{error}}\mathbf{n}_{4}\cdot\mathbf{j}| \tag{16}\]  
where \(\mathbf{R}_{\text{error}}\) has been changed to:  
\[\mathbf{R}_{\text{error}}=\left[ \begin{array}{ccc}c(\alpha-30^{\circ})&-s( \alpha-30^{\circ})&0\\ s(\alpha-30^{\circ})&c(\alpha-30^{\circ})&0\\ 0&0&1\end{array} \right] \tag{17}\]  
It is easy to find that, ideally:  
\[f_{\text{cost}}(\alpha)=0 \tag{18}\]  
Next, we need to find the actual value of angle \(\alpha\). This is an optimization problem, our goal is to find \(\alpha^{*}\) through:  
\[\alpha^{*}=argminF_{\text{cost}}(\alpha) \tag{19}\]  
where  
\[F_{\text{cost}}(\alpha)=\frac{1}{2}\sum_{m=1}^{\text{M}}\left(f_{\text{cost}}( \alpha_{m})^{2}\right) \tag{20}\]  
In Formula (20), M is the total number of measurements, and \(m\) is the serial number of a certain measurement.