高斯投影换带计算详细写出原代码 最好是vb编的 要有相邻带之间转换 以及3度带 6度带 1.5度带的相互转换
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/27 07:32:25
高斯投影换带计算详细写出原代码 最好是vb编的 要有相邻带之间转换 以及3度带 6度带 1.5度带的相互转换
高斯投影换带计算
详细写出原代码 最好是vb编的 要有相邻带之间转换 以及3度带 6度带 1.5度带的相互转换
高斯投影换带计算详细写出原代码 最好是vb编的 要有相邻带之间转换 以及3度带 6度带 1.5度带的相互转换
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5490
ClientLeft = 60
ClientTop = 345
ClientWidth = 7410
LinkTopic = "Form1"
ScaleHeight = 5490
ScaleWidth = 7410
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "克氏计算"
Height = 495
Left = 2760
TabIndex = 19
Top = 4800
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 615
Left = 3960
TabIndex = 18
Top = 4080
Width = 2415
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 615
Left = 360
TabIndex = 17
Top = 4080
Width = 2175
End
Begin VB.Frame Frame3
Caption = "输出坐标"
Height = 1455
Left = 120
TabIndex = 12
Top = 2280
Width = 6855
Begin VB.TextBox Text6
Height = 495
Left = 3960
TabIndex = 16
Text = "Text6"
Top = 360
Width = 2175
End
Begin VB.TextBox Text5
Height = 375
Left = 720
TabIndex = 14
Text = "Text5"
Top = 480
Width = 1455
End
Begin VB.Label Label8
Caption = "Y="
Height = 375
Left = 3480
TabIndex = 15
Top = 480
Width = 255
End
Begin VB.Label Label7
Caption = "X="
Height = 375
Left = 240
TabIndex = 13
Top = 480
Width = 255
End
End
Begin VB.Frame Frame2
Caption = "输入换代的中央子午线"
Height = 855
Left = 0
TabIndex = 5
Top = 1080
Width = 7095
Begin VB.TextBox Text4
Height = 375
Left = 5280
TabIndex = 9
Text = "Text4"
Top = 240
Width = 1335
End
Begin VB.TextBox Text3
Height = 375
Left = 1800
TabIndex = 8
Text = "Text3"
Top = 240
Width = 1095
End
Begin VB.Label Label6
Caption = "要换到的带的中央子午线"
Height = 495
Left = 3600
TabIndex = 11
Top = 240
Width = 1095
End
Begin VB.Label Label5
Caption = "所在的带的中央子午线"
Height = 495
Left = 240
TabIndex = 10
Top = 240
Width = 1095
End
Begin VB.Label Label3
Caption = "L0="
Height = 375
Left = 4920
TabIndex = 7
Top = 360
Width = 255
End
Begin VB.Label Label4
Caption = "L0="
Height = 255
Left = 1440
TabIndex = 6
Top = 360
Width = 375
End
End
Begin VB.Frame Frame1
Caption = "输入坐标"
Height = 975
Left = 0
TabIndex = 0
Top = 0
Width = 7095
Begin VB.TextBox Text2
Height = 375
Left = 4080
TabIndex = 4
Text = "Text2"
Top = 360
Width = 2295
End
Begin VB.TextBox Text1
Height = 375
Left = 360
TabIndex = 2
Text = "Text1"
Top = 360
Width = 2175
End
Begin VB.Label Label2
Caption = "Y="
Height = 375
Left = 3600
TabIndex = 3
Top = 360
Width = 375
End
Begin VB.Label Label1
Caption = "X="
Height = 375
Left = 120
TabIndex = 1
Top = 360
Width = 255
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 x, y, L0, b1, c, bf, bf1, bf2, nf, z, b2, b3, b4, b5, b, L, l1 As Variant
x = Val(Text1.Text)
y = Val(Text2.Text)
L0 = Val(Text3.Text)
b1 = (x / 6367452.1328)
c = Cos(b1) * Cos(b1)
bf = b1 * 206264.806247096 + (52289760 + (2936975 + (2383 + 22 * c) * c) * c) * Sin(b1) * Cos(b1) / 10 ^ (10)
bf1 = bf / 206264.806247096
bf2 = Cos(bf1) * Cos(bf1)
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 = bf - (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
Debug.Print l1
Debug.Print b
Dim l2, b6, c1, n, a0, a4, a6, a3, a5, x1, y1 As Variant
l2 = (l1 - Val(Text4.Text) * 3600) / 206264.806247096
b6 = b / 206264.806247096
c1 = Cos(b6) * Cos(b6)
n = 6399596.652 - (21565.045 - (108.996 - 0.603 * c1) * c1) * c1
a0 = 32144.5189 - (135.3646 - (0.7034 - 0.0041 * c1) * c1) * c1
a4 = (0.25 + 0.00253 * c1) * c1 - 0.04167
a6 = (0.167 * c1 - 0.083) * c1
a3 = (0.3333333 + 0.001123 * c1) * c1 - 0.1666667
a5 = 0.00878 - (0.1702 - 0.20382 * c1) * c1
x1 = 6367452.1328 * b / 206264.806247096 - (a0 - (0.5 + (a4 + a6 * l2 * l2) * l2 * l2) * l2 * l2 * n) * Cos(b6) * Sin(b6)
y1 = (1 + (a3 + a5 * l2 * l2) * l2 * l2) * l2 * n * Cos(b6)
Debug.Print x
Debug.Print y
Text5.Text = x1
Text6.Text = y1
End Sub
Private Sub Command3_Click()
Dim x, y, L0, b1, c, bf, bf2, bf1, nf, z, b2, b3, b4, b5, b, L, l1 As Variant
'可氏
x = Val(Text1.Text)
y = Val(Text2.Text)
L0 = Val(Text3.Text)
b1 = (x / 6367558.4969)
c = Cos(b1) * Cos(b1)
bf = b1 * 206264.806247096 + (50221746 + (293622 + (2350 + 22 * c) * c) * c) * Sin(b1) * Cos(b1) / 10 ^ (10)
bf1 = bf / 206264.806247096
bf2 = Cos(bf1) * Cos(bf1)
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.161612 + 0.00562 * bf2) * bf2
b5 = 0.2 - (0.1667 - 0.0088 * bf2) * bf2
b = bf - (1 - (b4 - 0.12 * z * z) * z * z) * z * z * b2 * 206264.806247096
L = (1 - (b3 - b5 * z * z) * z * z) * z * 206264.806247096
l1 = L0 * 3600 + L
Debug.Print l1
Debug.Print b
Dim l2, b6, c1, n, a0, a4, a6, a3, a5, x1, y1 As Variant
l2 = (l1 - Val(Text4.Text) * 3600) / 206264.806247096
b6 = b / 206264.806247096
c1 = Cos(b6) * Cos(b6)
n = 6399698.902 - (21562.267 - (108.973 - 0.612 * c1) * c1) * c1
a0 = 32140.404 - (135.3302 - (0.7092 - 0.004 * c1) * c1) * c1
a4 = (0.25 + 0.00252 * c1) * c1 - 0.04166
a6 = (0.166 * c1 - 0.084) * c1
a3 = (0.3333333 + 0.001123 * c1) * c1 - 0.1666667
a5 = 0.0083 - (0.1667 - (0.1968 + 0.004 * c1 * c1) * c1 * c1) * c1 * c1
x1 = 6367558.4969 * b / 206264.806247096 - (a0 - (0.5 + (a4 + a6 * l2 * l2) * l2 * l2) * l2 * l2 * n) * Cos(b6) * Sin(b6)
y1 = (1 + (a3 + a5 * l2 * l2) * l2 * l2) * l2 * n * Cos(b6)
Debug.Print x
Debug.Print y
Text5.Text = x1
Text6.Text = y1
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
End Sub
Private Sub Command2_Click()
End
End Sub