资源描述:
《摄影测量实习空间后方交会.doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、摄影测量实习空间后方交会—.后方交会解算程序。(1)原程序:D=input('请输入地面点坐标:')Y=input('请输入影像坐标点:')/1000f=input('请输入主距:')/1000C=input('请输入像主点坐标初始值:')J=input('请输入外方位角初始值:')i=size(Y,1);Y=[Y;Y(1,:)];D=[D;D(1,:)];Xs=0;Ys=0;forj=1:im=sqrt(((D(j,1)-D(j+1,1)).^2+(D(j,2)-D(j+1,2)).^2)/((Y(j,1)-Y(j+1,1)).^2+(Y(j,2)-Y(,2)).^2))/(i-1);Xs=
2、Xs+D(j,1)/i;Ys=Ys+D(j,2)/i;endZs=m*f;forj=1:1000R(1,1)=cos(J(1))*cos(J(3))-sin(J(1))*sin(J(2))*sin(J(3));R(1,2)=-cos(J(1))*sin(J(3))-sin(J(1))*sin(J(2))*cos(J(3));R(1,3)=-sin(J(1))*cos(J(2));R(2,1)=cos(J(2))*sin(J(3));R(2,2)=cos(J(2))*cos(J(3));R(2,3)=-sin(J(2));R(3,1)=sin(J(1))*cos(J(3))+cos(J(1))*
3、sin(J(2))*sin(J(3));R(3,2)=-sin(J(1))*sin(J(3))+cos(J(1))*sin(J(2))*cos(J(3));R(3,3)=cos(J(1))*cos(J(2));forn=1:iXp(n)=R(1,1)*(D(n,1)-Xs)+R(2,1)*(D(n,2)-Ys)+R(3,1)*(D(n,3)-Zs);Yp(n)=R(1,2)*(D(n,1)-Xs)+R(2,2)*(D(n,2)-Ys)+R(3,2)*(D(n,3)-Zs);Zp(n)=R(1,3)*(D(n,1)-Xs)+R(2,3)*(D(n,2)-Ys)+R(3,3)*(D(n,3)-Zs
4、);xc(n)=-f*Xp(n)/Zp(n);yc(n)=-f*Yp(n)/Zp(n);A(2*n-1,1)=(R(1,1)*f+R(1,3)*xc(n))/Zp(n);A(2*n-1,2)=(R(2,1)*f+R(2,3)*xc(n))/Zp(n);A(2*n-1,3)=(R(3,1)*f+R(3,3)*xc(n))/Zp(n);A(2*n,1)=(R(1,2)*f+R(1,3)*yc(n))/Zp(n);A(2*n,2)=(R(2,2)*f+R(2,3)*yc(n))/Zp(n);A(2*n,3)=(R(3,2)*f+R(3,3)*yc(n))/Zp(n);A(2*n-1,4)=yc(n)
5、*sin(J(2))-(xc(n)/f*(xc(n)*cos(J(3))-yc(n)*sin(J(3)))+f*cos(J(3)))*cos(J(2));A(2*n-1,5)=-f*sin(J(3))-xc(n)*(xc(n)*sin(J(3))+yc(n)*cos(J(3)))/f;A(2*n-1,6)=yc(n);A(2*n,4)=-xc(n)*sin(J(2))-(yc(n)/f*(xc(n)*cos(J(3))-yc(n)*sin(J(3)))-f*sin(J(3)))*cos(J(2));A(2*n,5)=-f*cos(J(3))-yc(n)*(xc(n)*sin(J(3))+yc(
6、n)*cos(J(3)))/f;A(2*n,6)=-xc(n);L(2*n-1,1)=Y(n,1)-xc(n);L(2*n,1)=Y(n,2)-yc(n);endX=inv(A'*A)*A'*L;Xs=Xs+X(1);Ys=Ys+X(2);Zs=Zs+X(3);J(1)=J(1)+X(4);J(2)=J(2)+X(5);J(3)=J(3)+X(6);M=max(abs(X));ifM<=0.001XsYsZsRbreak;endend二.运行实例(课本p-44习题24)27.已知四队点的影像坐标和地点坐标如下:影像坐标地面坐标x(mm)y(mm0X(mm)Y(mm)Z(mm)1—86.15—6
7、8.9936589.4125273.322195.172—53.4082.2137631.0831324.51728.693—14.78—76.6339100.9724934.982386.50410.4664.4340426.5430319.81757.31试计算近似垂直摄影情况下空间后方交会的解。假设内方位元素已知:f=153.24mm,x0=y0=0.(3)运行结果:请输入地面点坐标:[36