资源描述:
《用(VB)实现测量坐标转换系统.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、坐标转换系统(VB) 东华理工大学Theory北京54高斯坐标转换西安80高斯坐标转换系统1.0版多点处理结果 核心源代码:'高斯坐标转换成大地坐标过程PublicSubGausReverse(aAsDouble,fAsDouble,x()AsDouble,y()AsDouble,RB()AsDouble,RL()AsDouble,kAsInteger)Di
2、miAsInteger,fxbAsDouble,fxblAsDouble,fyblAsDoublee=Sqr(2*f-f^2)C=a/Sqr(1-e^2)e2=e/Sqr(1-e^2)beita0=1-(3/4)*e2^2+(45/64)*e2^4-(175/256)*e2^6+(11025/16384)*e2^8beita2=beita0-1beita4=(15/32)*e2^4-(175/384)*e2^6+(3675/8192)*e2^8beita6=(-35/96)*e2^6+(735/2
3、048)*e2^8beita8=(315/1024)*e2^8Fori=1Tok B0=x(i)/(C*beita0) a1=a*Cos(B0)/Sqr(1-e^2*(Sin(B0))^2) l0=y(i)/a1Do fxb=0 fxbl=0 fybl=0 t=Tan(B0) yita=e2*Cos(B0) n=a/Sqr(1-e^2*(Sin(B0))^2) a2=(1/2)*n*Sin(B0)*Cos(B0) a3=(1/6)*n*(Cos(B0))
4、^3*(1-t^2+yita^2) a4=(1/24)*n*Sin(B0)*(Cos(B0))^3*(5-t^2+9*yita^2+4*yita^4) a5=(1/120)*n*(Cos(B0))^5*(5-18*t^2+t^4+14*yita^2-58*yita^2*t^2) a6=(1/720)*n*Sin(B0)*(Cos(B0))^5*(61-58*t^2+t^4) fxb=fxb+(C*beita6+C*beita8*(Cos(B0))^2)*(Cos(B0))^2
5、fxb=(fxb+C*beita4)*(Cos(B0))^2 fxb=(fxb+C*beita2)*Sin(B0)*Cos(B0) fxbl=a2*l0^2+a4*l0^4+a6*l0^6 fybl=a3*l0^3+a5*l0^5 RB(i)=(x(i)-fxb-fxbl)/(C*beita0) a1=(a*Cos(RB(i)))/Sqr(1-e^2*(Sin(RB(i))^2)) RL(i)=(y(i)-fybl)/a1 IfAbs(RB(i)-B0)<=0.0000
6、000001AndAbs(RL(i)-l0)<=0.0000000001Then RL(i)=zrl+l0 ExitDo Else B0=RB(i) l0=RL(i) EndIfLoopNextiEndSub'大地坐标B,L转换为高斯坐标x,y的过程PublicSubBLHGaus(RB()AsDouble,RL()AsDouble,GX()AsDouble,GY()AsDouble,aAsDouble,fAsDouble,kAsIntege
7、r)Diml0AsDouble,fxbAsDouble,gxblAsDouble,fyblAsDoublee=Sqr(2*f-f^2)C=a/Sqr(1-e^2)e2=e/Sqr(1-e^2)beita0=1-(3/4)*e2^2+(45/64)*e2^4-(175/256)*e2^6+(11025/16384)*e2^8beita2=beita0-1beita4=(15/32)*e2^4-(175/384)*e2^6+(3675/8192)*e2^8beita6=(-35/96)*e2^6+(7
8、35/2048)*e2^8beita8=(315/1024)*e2^8Fori=1Tok l0=RL(i)-zrl n=a/Sqr(1-e^2*(Sin(RB(i)))^2) t=Tan(RB(i)) yita=e2*Cos(RB(i)) a1=(a*Cos(RB(i)))/Sqr(1-e^2*(Sin(RB(i))^2)) a2=(1/2)*n*Sin(RB(i))*Cos(RB(i)) a3=(1/6)*n*(Cos(RB(i)))^3*(1-t^2