文件名称:程序代码-VB实现高斯正反算
文件大小:410KB
文件格式:PPT
更新时间:2024-05-15 03:20:04
VB 坐标正反算
程序代码 这个程序使用很简单,首先确认*子午线的,点击*子午线下方的小黑三角形选择大地坐标或或高斯投影平面坐标所在的*子午线的经度。在计算之前还要选择所依据的椭球面,椭球不一样,计算的参数不一样。若选择“北京54”,则点击“北京54”前面的小白圆圈,显黑点就说明已经选中,例如上面界面所显示的那样。在选定*子午线和椭球后,要大地坐标转高斯投影平面坐标,则在大地坐标下输入B,L,按上方的转换按钮,则可以得到高斯投影平面坐标X,Y。反之,输入高斯投影平面坐标X,Y,按下方的转换按钮,则可以得到大地坐标B,L。 六.程序代码 Public Const PI = 3.14159265358979 Public a As Double, e2 As Double, e22 As Double Public B As Double, L As Double, L0 As Double Public Bf As Double Public x0 As Double, y0 As Double Private ll As Double Public Number As Integer Public AA As Double, BB As Double, CC As Double, DD As Double, EE As Double, FF As Double, GG As Double Public Sub Gauss(mL0 As Double, mB As Double, mL As Double) Dim T As Double, Yita As Double mL0 = mGetrad(mL0): mB = mGetrad(mB): mL = mGetrad(mL) Yita = e22 * (Cos(mB) ^ 2): T = Tan(mB) ll = mL - mL0 x0 = mGetX(0, mB) + mGetN(mB) * T * (Cos(mB)) ^ 2 * ll ^ 2 * (0.5 + (5 - T ^ 2 + 9 * Yita + 4 * Yita ^ 2) * (Cos(mB)) ^ 2 * ll ^ 2 / 24 + (61 - 58 * T ^ 2 + T ^ 4) * (Cos(mB)) ^ 4 * ll ^ 4 / 720) y0 = mGetN(mB) * Cos(mB) * ll * (1 + (1 - T ^ 2 + Yita) * (Cos(mB)) ^ 2 * ll ^ 2 / 6 + (5 - 18 * T ^ 2 + T ^ 4 + 14 * Yita - 58 * T ^ 2 * Yita) * (Cos(mB)) ^ 4 * ll ^ 4 / 120) End Sub Public Sub mGauss(mL0 As Double, mB As Double, mY As Double)