资源描述:
《摄影测量——后方交会(matlab)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、3.用matlab编程结果function[XS,YS,ZS,p,w,k]=hfjhx_o=[-0.08615;-0.06899;-0.05340;0.08211;-0.01478;-0.07663;0.01064;0.06443];X=[36589.641,25273.32,2195.17;37631.08,31324.51,728.69;39100.97,24934.98,2386.50;40426.54,30319.81,757.31];f=0.15324;m=40000;XS=38437;YS=27963.155;ZS=f*m+1516.9175;p=
2、0;w=0;k=0;R=zeros(3,3);num=1;dx=zeros(6,1);whilenum==1
3、
4、abs(dx(4,1)*206225)>6
5、
6、abs(dx(5,1)*206225)>6
7、
8、abs(dx(6,1)*206265)>6;R(1,1)=cos(p)*cos(k)-sin(p)*sin(w)*sin(k);R(1,2)=-cos(p)*cos(k)-sin(p)*sin(w)*sin(k);R(1,3)=-sin(p)*cos(w);R(2,1)=cos(w)*sin(k);R(2,2)=cos(w)*cos(k);R(2,3)=-si
9、n(w);R(3,1)=sin(p)*cos(k)+cos(p)*sin(w)*sin(k);R(3,2)=-sin(p)*sin(k)+cos(p)*sin(w)*cos(k);R(3,3)=cos(p)*cos(w);x_s=zeros(8,1);x_s(1,1)=-f*(R(1,1)*(X(1,1)-XS)+R(2,1)*(X(1,2)-YS)+R(3,1)*(X(1,3)-ZS))/(R(1,3)*(X(1,1)-XS)+R(2,3)*(X(1,2)-YS)+R(3,3)*(X(1,3)-ZS));x_s(2,1)=-f*(R(1,2)*(X(1,1)
10、-XS)+R(2,2)*(X(1,2)-YS)+R(3,2)*(X(1,3)-ZS))/(R(1,3)*(X(1,1)-XS)+R(2,3)*(X(1,2)-YS)+R(3,3)*(X(1,3)-ZS));x_s(3,1)=-f*(R(1,1)*(X(2,1)-XS)+R(2,1)*(X(2,2)-YS)+R(3,1)*(X(2,3)-ZS))/(R(1,3)*(X(2,1)-XS)+R(2,3)*(X(2,2)-YS)+R(3,3)*(X(2,3)-ZS));x_s(4,1)=-f*(R(1,2)*(X(2,1)-XS)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