📄 form1.ebf
字号:
VERSION 5.00
Begin VB.Form Form1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Form1"
ClientHeight = 3510
ClientLeft = 60
ClientTop = 840
ClientWidth = 3480
ForeColor = &H80000008&
ScaleHeight = 3510
ScaleWidth = 3480
ShowOK = -1 'True
Begin VBCE.CommandButton Command3
Height = 615
Left = 480
TabIndex = 2
Top = 2520
Width = 2535
_cx = 4471
_cy = 1085
BackColor = 12632256
Caption = "Command3"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Style = 0
End
Begin VBCE.CommandButton Command2
Height = 735
Left = 480
TabIndex = 1
Top = 1560
Width = 2535
_cx = 4471
_cy = 1296
BackColor = 12632256
Caption = "Command2"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Style = 0
End
Begin VBCE.CommandButton Command1
Height = 855
Left = 480
TabIndex = 0
Top = 480
Width = 2415
_cx = 4260
_cy = 1508
BackColor = 12632256
Caption = "Command1"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Style = 0
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
x1 = 3425907.456 '北京直角坐标系
y1 = 567563.807
zuobiaotojingwei
b0 = bbb
L0 = 120 + lll
pi = 3.14159265358979
pp = 180# / pi
p = 206265#
a = 6378245#
b = 6356863.0188
f = 1 / 298.3
H0 = 27.356
N0 = a / Sqr(1 - (2 * f - f ^ 2) * Sin(b0 / pp) * Sin(b0 / pp))
X0 = (N0 + H0) * Cos(b0 / pp) * Cos(L0 / pp)
Y0 = (N0 + H0) * Cos(b0 / pp) * Sin(L0 / pp)
Z0 = (N0 * (1 - (2 * f - f ^ 2)) + H0) * Sin(b0 / pp)
MsgBox X0
MsgBox Y0
MsgBox Z0
MsgBox e
MsgBox E1
End Sub
Private Sub Command2_Click()
pi = 3.14159265358979 ' WGS 84空间坐标反算大地坐标
pp = 180# / pi
p = 206265#
a = 6378137#
b = 6356752.314
f = 1 / 298.257223563
X = -2795746.096
Y = 4707099.755
z = 3261334.812
l = Atn(Y / X)
b = Atn(z / Sqr(X ^ 2 + Y ^ 2))
For i = 1 To 6
N0 = a / Sqr(1 - (2 * f - f ^ 2) * Sin(b) * Sin(b))
b = Atn((z + N0 * (2 * f - f ^ 2) * Sin(b)) / Sqr(X ^ 2 + Y ^ 2))
Next i
N0 = a / Sqr(1 - (2 * f - f ^ 2) * Sin(b) * Sin(b))
h = Sqr(X ^ 2 + Y ^ 2) / Cos(b) - N0
dms (b * pp)
MsgBox bstr
dms (l * pp + 180)
MsgBox bstr
MsgBox h
End Sub
Private Sub Command3_Click()
DX = -60.955021
DY = 123.068774
DZ = 61.418283
RX = -0.0000021342
RY = 0.000003394
RZ = 0.0000153074
K = -0.000011669551
M = 1 + K
WGS84XYH
XS = X0
YS = Y0
ZS = Z0
'XS = -2876358.443983
'YS = 4728159.271302
'ZS = 3160380.167326
XT = M * (XS + RZ * YS - RY * ZS) + DX
YT = M * (-RZ * XS + YS + RX * ZS) + DY
ZT = M * (RY * XS - RX * YS + ZS) + DZ
X = XT
Y = YT
z = ZT
BLTOXY
b = b * p
l = l * p + 180
lo = 123
zuobiaozhengsuan
MsgBox xx2
MsgBox yy2
'MsgBox XT
'MsgBox YT
'MsgBox ZT
End Sub
Private Sub Form_OKClick()
App.End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -