📄 fansuan.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 9495
ClientLeft = 60
ClientTop = 345
ClientWidth = 11055
LinkTopic = "Form1"
ScaleHeight = 9495
ScaleWidth = 11055
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "退出"
Height = 855
Left = 4200
TabIndex = 16
Top = 8640
Width = 3495
End
Begin VB.Frame Frame2
Caption = "大地坐标输出"
Height = 2535
Left = 120
TabIndex = 7
Top = 4920
Width = 14535
Begin VB.TextBox Text8
Height = 375
Left = 10800
TabIndex = 15
Text = "Text8"
Top = 1320
Width = 855
End
Begin VB.TextBox Text7
Height = 375
Left = 9600
TabIndex = 14
Text = "Text7"
Top = 1320
Width = 855
End
Begin VB.TextBox Text6
Height = 375
Left = 8160
TabIndex = 13
Text = "Text6"
Top = 1320
Width = 1095
End
Begin VB.TextBox Text5
Height = 375
Left = 3240
TabIndex = 11
Text = "Text5"
Top = 1320
Width = 855
End
Begin VB.TextBox Text4
Height = 375
Left = 2280
TabIndex = 10
Text = "Text4"
Top = 1320
Width = 735
End
Begin VB.TextBox Text3
Height = 375
Left = 1200
TabIndex = 9
Text = "Text3"
Top = 1320
Width = 855
End
Begin VB.Label Label11
Caption = "秒"
Height = 375
Left = 10800
TabIndex = 25
Top = 600
Width = 735
End
Begin VB.Label Label10
Caption = "分"
Height = 375
Left = 9600
TabIndex = 24
Top = 720
Width = 735
End
Begin VB.Label Label9
Caption = "度"
Height = 375
Left = 8160
TabIndex = 23
Top = 720
Width = 735
End
Begin VB.Label Label6
Caption = "Label6"
Height = 375
Index = 1
Left = 0
TabIndex = 22
Top = 0
Width = 495
End
Begin VB.Label Label8
Caption = "秒"
Height = 375
Left = 3360
TabIndex = 21
Top = 840
Width = 495
End
Begin VB.Label Label7
Caption = "分"
Height = 375
Left = 2400
TabIndex = 20
Top = 840
Width = 495
End
Begin VB.Label Label6
Caption = "度"
Height = 375
Index = 0
Left = 1320
TabIndex = 19
Top = 840
Width = 495
End
Begin VB.Label Label4
Caption = "L"
Height = 495
Left = 7320
TabIndex = 12
Top = 1200
Width = 495
End
Begin VB.Label Label3
Caption = "B "
Height = 735
Left = 240
TabIndex = 8
Top = 1080
Width = 735
End
End
Begin VB.CommandButton Command2
Caption = "1975年国际椭球反算"
Height = 735
Left = 8280
TabIndex = 6
Top = 3600
Width = 4575
End
Begin VB.CommandButton Command1
Caption = "克氏椭球反算"
Height = 735
Left = 960
TabIndex = 5
Top = 3600
Width = 3615
End
Begin VB.Frame Frame1
Caption = "输入坐标"
Height = 2535
Left = 0
TabIndex = 0
Top = 120
Width = 14775
Begin VB.TextBox Text9
Height = 495
Left = 12960
TabIndex = 17
Text = "Text9"
Top = 960
Width = 855
End
Begin VB.TextBox Text2
Height = 615
Left = 6600
TabIndex = 4
Text = "Text2"
Top = 960
Width = 4335
End
Begin VB.TextBox Text1
Height = 615
Left = 840
TabIndex = 1
Text = "Text1"
Top = 960
Width = 3855
End
Begin VB.Label Label5
Caption = "子午轴线(度)"
Height = 495
Left = 11760
TabIndex = 18
Top = 960
Width = 1095
End
Begin VB.Label Label2
Caption = "y(米)"
Height = 615
Left = 5520
TabIndex = 3
Top = 840
Width = 735
End
Begin VB.Label Label1
Caption = "x(米)"
Height = 615
Left = 120
TabIndex = 2
Top = 720
Width = 615
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim x, y, b, L As Integer
Private Sub Command1_Click()
Dim bf, b1, z, nf, b2, b3, b4, b5, a1, a2, a3, bf1, bf2, e, f, l1, L, b As Variant
x = Val(Text1.Text)
y = Val(Text2.Text)
L0 = Val(Text9.Text)
b1 = (x / 6367558.4969)
c = Cos(b1) * Cos(b1)
bf = b1 + (50221746 + (293622 + (2350 + 22 * c) * c) * c) * Sin(b1) * Cos(b1) / 10 ^ (10)
bf1 = bf
bf2 = Cos(bf1) * Cos(bf1)
bf3 = bf * 206264.806247096
nf = 6399698.902 - (21562.267 - (108.973 - 0.612 * bf2) * bf2) * bf2
z = y / (nf * Cos(bf1))
b2 = (0.5 + 0.003369 * bf2) * Sin(bf1) * Cos(bf1)
b3 = 0.333333 - (0.166667 - 0.001123 * bf2) * bf2
b4 = 0.25 + (0.16161 + 0.00562 * bf2) * bf2
b5 = 0.2 - (0.1667 - 0.0088 * bf2) * bf2
b = bf3 - (1 - (b4 - 0.12 * z * z) * z * z) * z * z * b2 * 206264.806247096
Debug.Print b
L = (1 - (b3 - b5 * z * z) * z * z) * z * 206264.806247096
Debug.Print L
l1 = L0 * 3600 + L
Text3.Text = Int(Abs(b) / 3600)
e = Abs(b) / 3600 - Int(Abs(b) / 3600)
Text4.Text = Int(e * 60)
Text5.Text = (e * 60 - Int(e * 60)) * 60
Text6.Text = Int(Abs(l1) / 3600)
f = Abs(l1) / 3600 - Int(Abs(l1) / 3600)
Text4.Text = Int(f * 60)
Text5.Text = (f * 60 - Int(f * 60)) * 60
End Sub
Private Sub Command2_Click()
Dim bf, b1, z, nf, b2, b3, b4, b5, a1, a2, a3, bf1, bf2, e, f, l1, L, b As Variant
x = Val(Text1.Text)
y = Val(Text2.Text)
L0 = Val(Text9.Text)
b1 = (x / 6367452.1328)
c = Cos(b1) * Cos(b1)
bf = b1 + (52289760 + (2936975 + (2383 + 22 * c) * c) * c) * Sin(b1) * Cos(b1) / 10 ^ (10)
bf1 = bf
bf2 = Cos(bf1) * Cos(bf1)
bf3 = bf * 206264.806247096
nf = 6399596.652 - (21565.045 - (108.996 - 0.603 * bf2) * bf2) * bf2
z = y / (nf * Cos(bf1))
b2 = (0.5 + 0.00336975 * bf2) * Sin(bf1) * Cos(bf1)
b3 = 0.3333333 - (0.1666667 - 0.001123 * bf2) * bf2
b4 = 0.25 + (0.161612 + 0.005617 * bf2) * bf2
b5 = 0.2 - (0.16667 - 0.00878 * bf2) * bf2
b = bf3 - (1 - (b4 - 0.147 * z * z) * z * z) * z * z * b2 * 206264.806247096
L = (1 - (b3 - b5 * z * z) * z * z) * z * 206264.806247096
l1 = L0 * 3600 + L
Text3.Text = Int(Abs(b) / 3600)
e = Abs(b) / 3600 - Int(Abs(b) / 3600)
Text4.Text = Int(e * 60)
Text5.Text = (e * 60 - Int(e * 60)) * 60
Text6.Text = Int(Abs(l1) / 3600)
f = Abs(l1) / 3600 - Int(Abs(l1) / 3600)
Text4.Text = Int(f * 60)
Text5.Text = (f * 60 - Int(f * 60)) * 60
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Move 0, 0, 8000, 5000
Text1.Text = ""
Text2.Text = ""
Text9.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -