高斯正反算及换带计算matlab源代码-附截图

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

MATLAB0.001m0.001MAINMATLAB1disp('');disp('123');K=0;while(K1||K3)K=input('K=');switchKcase1GSZS;case2GSFS;case3HDJS;otherwisedisp('K1-3');enddisp('');disp('');disp('');endGSZSfunctionGSZS%GSZS%DHHHHD%disp('');B=input('B=');L=input('L=');L0=input('L0=');B=DHH(B);L=DHH(L);L0=DHH(L0);disp('1:2:19753:WGS-84');T=0;while(T1||T2)T=input('T=');switchTcase1a=6378245.0000000000;b=6356863.0187730473;X=111134.861*(B*180/pi)-16036.480*sin(2*B)+16.828*sin(4*B)-0.022*sin(6*B);case2MATLAB2a=6378140.0000000000;b=6356755.2881575287;X=111133.005*(B*180/pi)-16038.528*sin(2*B)+16.833*sin(4*B)-0.022*sin(6*B);otherwisedisp('T1-2');endende=(sqrt(a^2-b^2))/a;e1=(sqrt(a^2-b^2))/b;V=sqrt(1+(e1^2)*(cos(B))^2);c=(a^2)/b;M=c/(V^3);N=c/V;t=tan(B);n=sqrt((e1^2)*(cos(B))^2);l=L-L0;xp1=X;xp2=(N*sin(B)*cos(B)*l^2)/2;xp3=(N*sin(B)*((cos(B))^3)*(5-t^2+9*n^2+4*n^4)*l^4)/24;xp4=(N*sin(B)*((cos(B))^5)*(61-58*t^2+t^4)*l^6)/720;x=xp1+xp2+xp3+xp4;yp1=N*cos(B)*l;yp2=N*(cos(B))^3*(1-t^2+n^2)*l^3/6;yp3=N*(cos(B))^5*(5-18*t^2+t^4+14*n^2-58*(n^2)*(t^2))*l^5/120;y=yp1+yp2+yp3;r1=l*sin(B);r2=(1/3)*sin(B)*(cos(B))^2*(l^3)*(1+3*n^2+2*n^4);r3=(1/15)*sin(B)*(cos(B))^2*(l^5)*(2-t^2);r=r1+r2+r3;formatlonggxyR=HHD(r)GSFSfunctionGSFS%GSZS%DHHHHD%disp('');x=input('x=');y=input('y=');MATLABL0=input('L0=');disp('1:2:19753:WGS-84');T=0;while(T1||T2)T=input('T=');switchTcase1a=6378245.0000000000;b=6356863.0187730473;B=x/6367558.4969;B=B+(50221746+(293622+(2350+22*(cos(B))^2)*(cos(B))^2)*(cos(B))^2)*10^(-10)*sin(B)*cos(B);case2a=6378140.0000000000;b=6356755.2881575287;B=x/6367452.1328;B=B+(50228976+(293697+(2383+22*(cos(B))^2)*(cos(B))^2)*(cos(B))^2)*10^(-10)*sin(B)*cos(B);otherwisedisp('T1-2');endende=(sqrt(a^2-b^2))/a;e1=(sqrt(a^2-b^2))/b;V=sqrt(1+(e1^2)*(cos(B))^2);c=(a^2)/b;M=c/(V^3);N=c/V;t=tan(B);n=sqrt((e1^2)*(cos(B))^2);lp1=y/(N*cos(B));lp2=(1+2*t^2+n^2)*(y^3)/(6*cos(B)*N^3);lp3=(5+28*t^2+24*t^4+6*n^2+8*(n^2)*(t^2))*(y^5)/(120*cos(B)*N^5);l=lp1-lp2+lp3;Bp1=B;Bp2=(t*y^2)/(2*M*N);Bp3=(t/(24*M*N^3))*(5+3*t^2+n^2-9*(n^2)*(t^2))*y^4;Bp4=(t/(720*M*N^5))*(61+90*t^2+45*(t^4))*y^6;B=Bp1-Bp2+Bp3-Bp4;r1=l*sin(B);r2=(1/3)*sin(B)*(cos(B))^2*(l^3)*(1+3*n^2+2*n^4);r3=(1/15)*sin(B)*(cos(B))^2*(l^5)*(2-t^2);r=r1+r2+r3;formatlonggL=HHD(l)+L0B=HHD(B)MATLAB3R=HHD(r)HDJSfunctionHDJSdisp('')x=input('x=');y=input('y=');L0=input('L0=');disp('1:2:19753:WGS-84');T=0;while(T1||T2)T=input('T=');switchTcase1a=6378245.0000000000;b=6356863.0187730473;B=x/6367558.4969;B=B+(50221746+(293622+(2350+22*(cos(B))^2)*(cos(B))^2)*(cos(B))^2)*10^(-10)*sin(B)*cos(B);case2a=6378140.0000000000;b=6356755.2881575287;B=x/6367452.1328;B=B+(50228976+(293697+(2383+22*(cos(B))^2)*(cos(B))^2)*(cos(B))^2)*10^(-10)*sin(B)*cos(B);otherwisedisp('T1-2');endende=(sqrt(a^2-b^2))/a;e1=(sqrt(a^2-b^2))/b;V=sqrt(1+(e1^2)*(cos(B))^2);c=(a^2)/b;M=c/(V^3);N=c/V;t=tan(B);n=sqrt((e1^2)*(cos(B))^2);lp1=y/(N*cos(B));lp2=(1+2*t^2+n^2)*(y^3)/(6*cos(B)*N^3);lp3=(5+28*t^2+24*t^4+6*n^2+8*(n^2)*(t^2))*(y^5)/(120*cos(B)*N^5);l=lp1-lp2+lp3;Bp1=B;Bp2=(t*y^2)/(2*M*N);Bp3=(t/(24*M*N^3))*(5+3*t^2+n^2-9*(n^2)*(t^2))*y^4;MATLABBp4=(t/(720*M*N^5))*(61+90*t^2+45*(t^4))*y^6;B=Bp1-Bp2+Bp3-Bp4;formatlonggL=HHD(l)+L0B=HHD(B)L00=input('L00=');B=DHH(B);L=DHH(L);L00=DHH(L00);disp('1:2:19753:WGS-84');T=0;while(T1||T2)T=input('T=');switchTcase1a=6378245.0000000000;b=6356863.0187730473;X=111134.861*(B*180/pi)-16036.480*sin(2*B)+16.828*sin(4*B)-0.022*sin(6*B);case2a=6378140.0000000000;b=6356755.2881575287;X=111133.005*(B*180/pi)-16038.528*sin(2*B)+16.833*sin(4*B)-0.022*sin(6*B);otherwisedisp('T1-2');endende=(sqrt(a^2-b^2))/a;e1=(sqrt(a^2-b^2))/b;V=sqrt(1+(e1^2)*(cos(B))^2);c=(a^2)/b;M=c/(V^3);N=c/V;t=tan(B);n=sqrt((e1^2)*(cos(B))^2);l=L-L00;xp1=X;xp2=(N*sin(B)*cos(B)*l^2)/2;xp3=(N*sin(B)*((cos(B))^3)*(5-t^2+9*n^2+4*n^4)*l^4)/24;xp4=(N*sin(B)*((cos(B))^5)*(61-58*t^2+t^4)*l^6)/720;x=xp1+xp2+xp3+xp4;yp1=N*cos(B)*l;yp2=N*(cos(B))^3*(1-t^2+n^2)*l^3/6;yp3=N*(cos(B))^5*(5-18*t^2+t^4+14*n^2-58*(n^2)*(t^2))*l^5/120;MATLAB45y=yp1+yp2+yp3;r1=l*sin(B);r2=(1/3)*sin(B)*(cos(B))^2*(l^3)*(1+3*n^2+2*n^4);r3=(1/15)*sin(B)*(cos(B))^2*(l^5)*(2-t^2);r=r1+r2+r3;formatlonggx2=xy2=yR=HHD(r)DHHfunctionHD=DHH(BD)%DHH%30.4523D=fix(BD);F=fix((BD-D)*100);M=((BD-D)*100-F)*100;HD=((D+F/60+M/3600)/180)*pi;HHDfunctionBD=HHD(HD)%HHD%30.4523SD=HD*180/pi;D=fix(SD);F=fix((SD-D)*60);M=((SD-D)*60-F)*60;BD=D+F/100+M/10000;

1 / 7
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功