## 3 Measurement Constraints for BIW Inspection
### Position Constraints of Station Planning
\[\mathrm{r}_{i,1}=\frac{\mathrm{l}_{i}\mathrm{sin}\ \alpha_{i}}{1-\mathrm{sin}\ \alpha_{i}} \tag{6}\]  
For the last spherical region, \(\mathrm{c}_{i,m}\) and \(\mathrm{r}_{i,m}\) are expressed as follows:  
Figure 4:0  
Figure 4:1  
For the n-th middle spherical regions, \(\mathrm{n}=1,2,\cdots\mathrm{m}-2\), and \(\mathrm{c}_{i,n}\) and \(\mathrm{r}_{i,n}\) are expressed as follows:  
Figure 4:2  
Figure 4:3  
2. In the supplementary spherical regions, \(\mathrm{c}_{i,n}\) and \(\mathrm{r}_{i,n}\) yield the following equations:  
\[\left\{ \begin{array}{ccc}\big{(}\mathrm{r}_{ij}+\mathrm{r}_{i,n}\big{)}^{ 2}=\big{(}\mathrm{L}_{i}-\mathrm{r}_{ij}\big{)}^{2}+\big{(}\mathrm{L}_{i}- \mathrm{r}_{i,n}\big{)}-2\big{(}\mathrm{L}_{i}-\mathrm{r}_{i,j}\big{)}\big{(} \mathrm{L}_{i}-\mathrm{r}_{i,n}\big{)}\cdot\cos\mathrm{A}\\ \mathrm{A}=\alpha_{i}-\mathrm{arsen}\frac{\mathrm{r}_{i,n}}{\mathrm{L}_{i}- \mathrm{r}_{i,n}}\end{array} \right. \tag{11}\]  
\[\mathrm{c}_{i,n}= \begin{bmatrix}\cos\mathrm{A}&0&-\mathrm{sin}\ \mathrm{A}&0\\ 0&1&0&0\\ \sin\mathrm{A}&0&\mathrm{cos}\ \mathrm{A}&0\\ 0&0&0&1\end{bmatrix} \cdot \begin{bmatrix}\cos\mathrm{C}&-\mathrm{sin}\ \mathrm{C}&0&0\\ \sin\ \mathrm{C}&\cos\ \mathrm{C}&0&0\\ 0&0&1&0\\ 0&0&0&1\end{bmatrix} \cdot \begin{bmatrix}0\\ 0\\ \big{(}\mathrm{L}_{i}-\mathrm{r}_{i,n}\big{)}\cdot\cos\mathrm{A}\\ 1\end{bmatrix}  \tag{12}\]  
\[\mathrm{C}=\mathrm{n}\cdot 2\mathrm{arctg}\big{(}\frac{\mathrm{r}_{i,n}}{\mathrm{L}_{i }-\mathrm{r}_{i,n}\big{)}\cdot\sin\alpha_{i}},n=0,1,\cdots,2\pi/\mathrm{C} \tag{13}\]  
The intersection of the feasible regions are determined by the intersection of the spherical regions. The shared-feasible-region searching steps are as follows:  
1. Two feasible regions (\(\mathrm{A}_{i}\) and \(\mathrm{A}_{m}\)) are discretized into two groups of spherical regions. They are sorted into the sets below, corresponding to \(\mathrm{A}_{i}\) and \(\mathrm{A}_{m}\): \[\mathrm{B}_{i,j}=\big{(}\mathrm{c}_{i,j},\mathrm{r}_{ij}\big{)}\] (14) \[\mathrm{B}_{m,n}=\big{(}\mathrm{c}_{m,n},\mathrm{r}_{m,n}\big{)}\] (15)
2. The \(\mathrm{B}_{i,j}\) and \(\mathrm{B}_{m,n}\) are traversed, and each spherical region in set \(\mathrm{B}_{i,j}\) is combined with every spherical region in \(\mathrm{B}_{m,n}\). The combination group is denoted as \(\big{[}\mathrm{B}_{i,j},\mathrm{B}_{m,n}\big{]}\);
3. If any combination in \(\big{[}\mathrm{B}_{i,j},\mathrm{B}_{m,n}\big{]}\) yields to Equation (16), the feasible region (\(\mathrm{A}_{i}\)) intersects with \(\mathrm{A}_{m}\). If not, \(\big{[}\mathrm{B}_{i,j},\mathrm{B}_{m,n}\big{]}\) yields to Equation (16), and the feasible region (\(\mathrm{A}_{i}\)) does not intersect with \(\mathrm{A}_{mIn the AAGi, the maximal complete subgraphs are identified, which are denoted as MCSGij. The features to be measured in MCSGij have shared feasible regions;  
In Figure 6a,c, an AAG is constructed based on intersection checking. The maximal complete subgraphs are identified and presented in Figure 6b,d. The station of the Laser Radar is in the shared feasible region in the MCSGij. The feasible region (Ai) is scattered into Bij, as shown in Equation (16). The distance between the station (Sk) and Bij is dij,k and is expressed as follows:  
\[\mathrm{d}_{\mathrm{i,j,k}}=\left\|\mathrm{P}_{\mathrm{k}}-\mathrm{c}_{ \mathrm{i}j}\right\| \tag{17}\]  
If dij,k \(\leq\) rij, it means that the station (Sk) is in the feasible region (Ai). So, the position constraint is as follows:  
\[\mathrm{d}_{\mathrm{i,j,k}}-\mathrm{r}_{\mathrm{i,j}}\leq 0 \tag{18}\]  
where i is the number of feasible regions (Ai) in the MCSGij, j is the number of discrete spherical regions belonging to Ai, and k is the number of the station. The position constraint is established through the following steps:  
1. Clustering Features: the features to be measured are clustered into Gi using the clustering algorithm described previously;
2. Approximating Feasible Regions: the feasible region (Ai) of feature Fi is discretized into a set of spherical regions (Bij) through feasible region approximation;
3.