## 3 Methodology  
### Circle Center Fitting Method Based on Equal Weight Midperpendicular  
As shown in Figure 1, points \(A\), \(B\), \(C\) and \(D\) are on the space circle. \(L_{1}\), \(L_{2}\) and \(L_{3}\) are the midperpendicular of lines \(AB\), \(BC\) and \(CD\), respectively. Points \(T_{1}\), \(T_{2}\) and \(T_{3}\) are vertical feet. Due to errors in the spatial coordinates of points \(A\), \(B\), \(C\) and \(D\) obtained by photogrammetry, lines \(L_{1}\), \(L_{2}\) and \(L_{3}\) cannot strictly intersect at one point. Point \(G\) is the center of the circle obtained by fitting lines \(L_{1}\), \(L_{2}\) and \(L_{3}\). The distances between point \(G\) and lines \(L_{1}\), \(L_{2}\) and \(L_{3}\) are \(D_{1}\), \(D_{2}\) and \(D_{3}\), respectively. All the points used in the fitting are space points. First, the plane where the center of the circle is located is fitted according to space points \(A\), \(B\), \(C\) and \(D\). The equation of the space plane is as follows. \[A_{0}X+B_{0}Y+C_{0}Z+D_{0}=0 \tag{1}\]  
where \(A_{0}\), \(B_{0}\), \(C_{0}\) and \(D_{0}\) are coefficients of the plane equation. \(X\), \(Y\) and \(Z\) are the coordinates of the point in space. Then, the least square method is used to fit the plane, and the formula is as follows. \[\left[ \begin{array}{ccc}X_{1}&Y_{1}&Z_{1}\\ \dots&\dots&\dots\\ X_{n}&Y_{n}&Z_{n}\end{array} \right]\left[ \begin{array}{c}A_{0}/D_{0}\\ B_{0}/D_{0}\\ C_{0}/D_{0}\end{array} \right]=\left[ \begin{array}{c}-1\\ -1\\ -1\end{array} \right] \tag{2}\]  
where \(X_{n}\), \(Y_{n}\) and \(Z_{n}\) are the coordinates of the space point. Figure 1: Diagram of center fitting. In space, the formula for midperpendicular is as follows. \[\frac{X-X_{0}}{m}=\frac{Y-Y_{0}}{n}=\frac{Z-Z_{0}}{p}=t \tag{3}\]  
where (\(X_{0}\), \(Y_{0}\), \(Z_{0}\)) is a point in the space line, and \(m\), \(n\), \(p\) and \(t\) are the coefficients of the space line equation. The points \(T_{1}\), \(T_{2}\) and \(T_{3}\) which are the feet of the midperpendicular are theoretically close to the space plane, so it can be approximately considered that points \(T_{1}\), \(T_{2}\) and \(T_{3}\) are on this plane. According to the constraint conditions that the direction vector of the midperpendicular is perpendicular to the normal vector of the plane, the solution equation of parameters \(m\), \(n\) and \(p\) is as follows. \[\left[ \begin{array}{cc}m&n&p\end{array} \right]=\left[ \begin{array}{cc}X_{ B}-X_{A}&Y_{B}-Y_{A}&Z_{B}-Z_{A}\end{array} \right]\times\left[ \begin{array}{ cc}A&B&C\end{array} \right] \tag{4}\]  
After obtaining the equation parameters of midperpendicular, the point \(G\) can be fitted according to the principle of the minimum sum of the distances (\(D_{1}+D_{2}+D_{3}\)) between the point \(G\) and the midperpendicular. To facilitate calculation, the solution of the minimum sum of their distances (\(D_{1}+D_{2}+D_{3}\)) is converted to the solution of the minimum sum of the squares of their distances (\(D_{1}{}^{2}+D_{2}{}^{2}+D_{3}{}^{2}\)), and the expression is as follows. \[W(X_{G},Y_{G},Z_{G})=D_{1}{}^{2}+D_{2}{}^{2}+D_{3}{}^{2} \tag{5}\]  
where  
\[D_{1}{}^{2}=\frac{\left|\left( \begin{array}{cc}X_{G}-X_{T_{1}}&Y_{G}-Y_{T_{ 1}}&Z_{G}-Z_{T_{1}}\end{array} \right)\times\left( \begin{array}{cc}m_{1}&n_{1 }&p_{1}\end{array} \right)\right|^{2}}{m_{1}{}^{2}+n_{1}{}^{2}+p_{1}{}^{2}} \tag{6}\]  
\[D_{2}{}^{2}=\frac{\left|\left( \begin{array}{cc}X_{G}-X_{T_{2}}&Y_{G}-Y_{T_{ 2}}&Z_{G}-Z_{T_{2}}\end{array} \right)\times\left( \begin{array}{cc}m_{2}&n_{2 }&p_{2}\end{array} \right)\right|^{2}}{m_{2}{}^{2}+n_{2}{}^{2}+p_{2}{}^{2}} \tag{7}\]  
\[D_{3}{}^{2}=\frac{\left|\left( \begin{array}{cc}X_{G}-X_{T_{3}}&Y_{G}-Y_{T_{ 3}}&Z_{G}-Z_{T_{3}}\end{array} \right)\times\left( \begin{array}{cc}m_{3}&n_{3 }&p_{3}\end{array} \right)\right|^{2}}{m_{3}{}^{2}+n_{3}{}^{2}+p_{3}{}^{2}} \tag{8}\]  
\(W\) is the function value, and the coordinates of point \(G^{\prime}\) are obtained by minimizing the function value \(W\) where the nonlinear optimization function Fmincon is used.