C#+测量程序设计

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

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

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

资源描述

完成的类usingSystem;usingSystem.Collections.Generic;usingSystem.Text;namespaceClassLibrary3{publicclasscejiao_jiao{publicdoublecj_j(doublejiao){jiao=Math.Abs(jiao);intdu=(int)(Math.Floor(jiao));jiao=(jiao-du)*100;intfen=(int)(Math.Floor(jiao));jiao=(jiao-fen)*100;intmiao=(int)(Math.Floor(jiao));jiao=du+fen/60+miao/3600;returnjiao;}}publicclasscejiao_jiaomiao{publicdoublecj_j(doublejiao){jiao=Math.Abs(jiao);intdu=(int)(Math.Floor(jiao));jiao=(jiao-du)*100;intfen=(int)(Math.Floor(jiao));jiao=(jiao-fen)*100;intmiao=(int)(Math.Floor(jiao));jiao=du*3600+fen*60+miao;returnjiao;}}publicclassh_j{publicdoubleHUDU_to_JIAODU(doubledd)/////////弧度化测角{doublea=dd;a=a*57.2957795130823;intd=(int)System.Math.Floor(a);a=a-d;a=a*60;intf=(int)System.Math.Floor(a);a=a-f;a=a*60;if(a+0.000160){a=0;f=f+1;}if(f=60){f=0;d=d+1;}a=d+f/100.0+a/10000.0;returna;}}publicclassj_h{publicdoubleJIAO_HUDU(doublejiao)/////测角化弧度{intd=(int)(Math.Floor(jiao));jiao=jiao-d;intf=(int)(Math.Floor(jiao*100.0));jiao=jiao*100-f;doublem=jiao*100.0;jiao=d*3600.0+f*60.0+m;doublehudu=jiao/206264.806247096263;returnhudu;}}Arctan的计算publicclassfwj{publicdoublejisuan(doublex1,doubley1,doublex2,doubley2){doublecx,cy,cc;cx=x2-x1;cy=y2-y1;if(cx==0&&cy==0)return-1;else{if(cx==0){if(cy0)cc=Math.PI/2.0;elsecc=Math.PI*1.5;}elsecc=Math.Atan2(cy,cx);if(cy0&&cx!=0)cc=cc+Math.PI;returncc;}}}高斯投影publicclassGaosi{publicconstdoublerou=206264.806247096263;privatedoubleb,c,e,ep,t,l,M,N,g2,CSB,SINB,X;privatedoublem0,m2,m4,m6,m8,n0,n2,n4,n6,n8,beita0,beita2,beita4,beita6,beita8;publicdoublezhengsuan(doublea,doublealf,doubleB,doubleL,doubleL0,outdoubley)/////B为弧度,L为秒,L0也为数学上的角度表示{//L=L*3600;///////////L0=L0*3600;//////////////度化为秒b=a-a*alf;e=Math.Sqrt(a*a-b*b)/a;ep=Math.Sqrt(a*a-b*b)/b;c=a*a/b;t=Math.Tan(B);CSB=Math.Cos(B);SINB=Math.Sin(B);g2=ep*ep*CSB*CSB;m0=a*(1-e*e);m2=3.0/2.0*e*e*m0;m4=5.0/4.0*e*e*m2;m6=7.0/6.0*e*e*m4;m8=9.0/8.0*e*e*m6;n0=a;n2=1.0/2.0*e*e*n0;n4=3.0/4.0*e*e*n2;n6=5.0/6.0*e*e*n4;n8=7.0/8.0*e*e*n6;M=m0+m2*SINB*SINB+m4*SINB*SINB*SINB*SINB+m6*SINB*SINB*SINB*SINB*SINB*SINB+m8*SINB*SINB*SINB*SINB*SINB*SINB*SINB*SINB;N=n0+n2*SINB*SINB+n4*SINB*SINB*SINB*SINB+n6*SINB*SINB*SINB*SINB*SINB*SINB+n8*SINB*SINB*SINB*SINB*SINB*SINB*SINB*SINB;l=L-L0;beita0=1.0-3.0/4.0*ep*ep+45.0/64.0*ep*ep*ep*ep-175.0/256.0*ep*ep*ep*ep*ep*ep+11025.0/16384.0*ep*ep*ep*ep*ep*ep*ep*ep;beita2=beita0-1.0;beita4=15.0/32.0*ep*ep*ep*ep-175.0/384.0*ep*ep*ep*ep*ep*ep+3675.0/8192.0*ep*ep*ep*ep*ep*ep*ep*ep;beita6=-35.0/96.0*ep*ep*ep*ep*ep*ep+735.0/2048.0*ep*ep*ep*ep*ep*ep*ep*ep;beita8=315.0/1024.0*ep*ep*ep*ep*ep*ep*ep*ep;X=c*(beita0*B+(beita2*CSB+beita4*CSB*CSB*CSB+beita6*CSB*CSB*CSB*CSB*CSB+beita8*CSB*CSB*CSB*CSB*CSB*CSB*CSB)*SINB);doublex,y;x=X+N/2.0/rou/rou*SINB*CSB*l*l+N/24.0/rou/rou/rou/rou*SINB*CSB*CSB*CSB*(5.0-t*t+9.0*g2+4.0*g2*g2)*l*l*l*l+N/720/rou/rou/rou/rou/rou/rou*SINB*CSB*CSB*CSB*CSB*CSB*(61.0-58.0*t*t+t*t*t*t)*l*l*l*l*l*l;y=N/rou*CSB*l+N/(6.0*rou*rou*rou)*CSB*CSB*CSB*(1.0-t*t+g2)*l*l*l+N/(120.0*rou*rou*rou*rou*rou)*CSB*CSB*CSB*CSB*CSB*(5.0-18.0*t*t+t*t*t*t+14*g2-58.0*g2*t*t)*l*l*l*l*l;returnx;}publicdoubledaN(doublea,doublealf,doubleB){b=a-a*alf;e=Math.Sqrt(a*a-b*b)/a;n0=a;n2=1.0/2.0*e*e*n0;n4=3.0/4.0*e*e*n2;n6=5.0/6.0*e*e*n4;n8=7.0/8.0*e*e*n6;N=n0+n2*SINB*SINB+n4*SINB*SINB*SINB*SINB+n6*SINB*SINB*SINB*SINB*SINB*SINB+n8*SINB*SINB*SINB*SINB*SINB*SINB*SINB*SINB;returnN;}publicdoublegama(doublea,doublealf,doubleB,doubleL,doubleL0)//,B为弧度L,l0为弧度{doubletan_gama;doublegama;b=a-a*alf;ep=Math.Sqrt(a*a-b*b)/b;t=Math.Tan(B);CSB=Math.Cos(B);SINB=Math.Sin(B);g2=ep*ep*CSB*CSB;l=L-L0;tan_gama=SINB*l+1.0/3.0*(1+t*t+3*g2+2*g2*g2)*SINB*CSB*CSB*l*l*l+1.0/15.0*(2+4*t*t+2*t*t*t*t)*SINB*CSB*CSB*CSB*CSB*l*l*l*l*l*l;gama=Math.Atan(tan_gama);returngama;}}publicclassfansuan{privatedoubleb,c,e,ep,l;privatedoubleB,Bf,Bf1,CSBf,SINBf,Mf,Nf,g2f,tf,fbf;privatedoublem0,m2,m4,m6,m8,n0,n2,n4,n6,n8,beita0,beita2,beita4,beita6,beita8;publicdoublefansuan_B(doublea,doublealf,doubleL0,doublex,doubley,outdoubleL)////////L0用测角表示,算出的B,L为弧度{b=a-a*alf;e=Math.Sqrt(a*a-b*b)/a;ep=Math.Sqrt(a*a-b*b)/b;c=a*a/b;m0=a*(1-e*e);m2=3.0/2.0*e*e*m0;m4=5.0/4.0*e*e*m2;m6=7.0/6.0*e*e*m4;m8=9.0/8.0*e*e*m6;n0=a;n2=1.0/2.0*e*e*n0;n4=3.0/4.0*e*e*n2;n6=5.0/6.0*e*e*n4;n8=7.0/8.0*e*e*n6;beita0=1.0-3.0/4.0*ep*ep+45.0/64.0*ep*ep*ep*ep-175.0/256.0*ep*ep*ep*ep*ep*ep+11025.0/16384.0*ep*ep*ep*ep*ep*ep*ep*ep;beita2=beita0-1;beita4=15.0/32.0*ep*ep*ep*ep-175.0/384.0*ep*ep*ep*ep*ep*ep+3675.0/8192.0*ep*ep*ep*ep*ep*ep*ep*ep;beita6=-35.0/96.0*ep*ep*ep*ep*ep*ep+735/2048*ep*ep*ep*ep*ep*ep*ep*ep;beita8=315.0/1024.0*ep*ep*ep*ep*ep*ep*ep*ep;Bf=x/c/beita0;for(inti=0;i10000;i++){tf=Math.Tan(Bf);CSBf=Math.Cos(Bf);SINBf=Math.Sin(Bf);g2f=ep*ep*CSBf*CSBf;fbf=c*(beita2*CSBf+beita4*CSBf*CSBf*CSBf+beita6*CSBf*CSBf*CSBf*CSBf*CSBf+beita8*CSBf*CSBf*CSBf*CSBf*CSBf*CSBf*CSBf)*SINBf;Bf1=(x-fbf)/c/beita0;if(Math.Abs(Bf-Bf1)1e-10)break;Bf=Bf1;}j_hjhl0=newj_h();L0=jhl0.JIAO_HUDU(L0);Mf=m0+m2*SINBf*SINBf+m4*SINBf*SINBf*SINBf*SINBf+m6*SINBf*SINBf*SINBf*SINBf*SINBf*SINBf+m8*SINBf*SINBf*SINBf*SINBf*

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

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

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

×
保存成功