i)= xy2(i, 0)/ 1000; xyf2(1, i)= xy2(i, 1)/ 1000; xyf2(2, i)= -f; } XYZ1 = R1*xyf1; XYZ2 = R2*xyf2; double N1; for (int j= 0;j< iRow; j++) { N1= (Bx*XYZ2(2, j)-Bz*XYZ2(0,j))/(XYZ1(0,j)*XYZ2(2,j)-XYZ2(0,j)*XYZ1(2,j)); XYZ(0, j)= XYZqwk(0, 0)+ N1*XYZ1(0, j); XYZ(1, j)= XYZqwk(0, 1)+ N1*XYZ1(1, j); XYZ(2, j)= XYZqwk(0, 2)+ N1*XYZ1(2, j); } return XYZ; } CMatrix CHomeWork4Dlg::inlineXYZ(CMatrix XYZqwk, CMatrix xy1, CMatrix xy2, double f)// 共线方程严密法函数{ int n= xy1.Row(); CMatrix A(4,3),L(4,1),X,XYZ(3,n); double PI= 3.141592654; double q[2], w[2], k[2]; double a1[2], a2[2], a3[2], b1[2], b2[2], b3[2], c1[2], c2[2], c3[2]; for (int i= 0;i< 2; i++) { q[i] = XYZqwk(i, 3)*PI / 180; w[i] = XYZqwk(i, 4)*PI / 180; k[i] = XYZqwk(i, 5)*PI / 180; a1[i] = cos(q[i])*cos(k[i]) - sin(q[i])*sin(w[i])*sin(k[i]);