📄 formguassf.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form FormGuassF
Caption = "高斯平均引数反算"
ClientHeight = 6090
ClientLeft = 4455
ClientTop = 3495
ClientWidth = 9870
LinkTopic = "Form1"
ScaleHeight = 6090
ScaleWidth = 9870
Begin MSComDlg.CommonDialog CommonDialog1
Left = 8280
Top = 360
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Frame Frame1
Caption = "批量处理"
Height = 1215
Left = 840
TabIndex = 18
Top = 4320
Width = 8055
Begin VB.CommandButton Command3
Caption = "文件另存为"
Height = 495
Left = 4560
TabIndex = 20
Top = 360
Width = 1695
End
Begin VB.CommandButton Command2
Caption = "打开文件 -->>>处理"
Height = 495
Left = 1200
TabIndex = 19
Top = 360
Width = 1815
End
End
Begin VB.TextBox Text_B1
Height = 375
Left = 1320
TabIndex = 4
Text = "42.32356784"
Top = 2520
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "立即计算"
Height = 375
Left = 7320
TabIndex = 8
Top = 3600
Width = 1575
End
Begin VB.TextBox Text_B2
Height = 405
Left = 1320
TabIndex = 6
Text = "42.45479027"
Top = 3600
Width = 1575
End
Begin VB.TextBox Text_L2
Height = 405
Left = 3360
TabIndex = 7
Text = "131.3201104 "
Top = 3600
Width = 1695
End
Begin VB.TextBox Text_L1
Height = 405
Left = 3360
TabIndex = 5
Text = "130.10122627"
Top = 2520
Width = 1695
End
Begin VB.TextBox Text_A12
Height = 405
Left = 5400
TabIndex = 11
Top = 2520
Width = 1575
End
Begin VB.TextBox Text_S
Height = 375
Left = 7320
TabIndex = 10
Top = 3000
Width = 1455
End
Begin VB.TextBox Text_A21
Height = 375
Left = 5400
TabIndex = 9
Top = 3600
Width = 1575
End
Begin VB.OptionButton Option3
Caption = "WGS-84椭球体"
Height = 495
Left = 6600
TabIndex = 3
Top = 1200
Width = 2055
End
Begin VB.OptionButton Option2
Caption = "1975国际椭球体"
Height = 495
Left = 3840
TabIndex = 2
Top = 1200
Width = 2175
End
Begin VB.OptionButton Option1
Caption = "克拉索夫斯基椭球体"
Height = 495
Index = 0
Left = 960
TabIndex = 1
Top = 1200
Width = 2535
End
Begin VB.Label Label4
Caption = "B"
Height = 375
Left = 2040
TabIndex = 17
Top = 1800
Width = 1215
End
Begin VB.Label Label5
Caption = "L"
Height = 495
Left = 4200
TabIndex = 16
Top = 1800
Width = 735
End
Begin VB.Label Label6
Caption = "A"
Height = 615
Left = 6120
TabIndex = 15
Top = 1800
Width = 855
End
Begin VB.Label Label7
Caption = "S"
Height = 375
Left = 8040
TabIndex = 14
Top = 1800
Width = 615
End
Begin VB.Label Label2
Caption = "已知点 1"
Height = 255
Left = 360
TabIndex = 13
Top = 2640
Width = 735
End
Begin VB.Label Label3
Caption = "待求点 2"
Height = 375
Left = 360
TabIndex = 12
Top = 3720
Width = 735
End
Begin VB.Label Label1
Caption = "高斯反算"
BeginProperty Font
Name = "MS Sans Serif"
Size = 24
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 3960
TabIndex = 0
Top = 240
Width = 3735
End
Begin VB.Menu Return
Caption = "返回主页"
End
End
Attribute VB_Name = "FormGuassF"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a As Double
Dim b_b As Double
Dim c As Double
Dim AA As Double
Dim ee As Double
Dim e_e As Double
Const PI = 3.14159265358979
Const p = 206264.806247096
Public BBmat
Dim CCmat() As Variant
Dim dd As Double
Public Function AngleToRadian(angle As Double) As Double '角度化弧度
Dim d As Integer
Dim f As Integer
Dim m As Double
angle = angle + 0.0000000001
d = Int(Abs(angle)) * Sgn(angle)
f = Int(Abs((angle - d) * 100)) * Sgn((angle - d) * 100)
m = ((angle - d) * 100 - f) * 100
'Print d
'Print f
'Print m
AngleToRadian = (CDbl(m) / 3600 + CDbl(f) / 60 + CDbl(d)) * PI / 180
'AngleToRadian = Sgn(angle) * AngleToRadian
'Print AngleToRadian
End Function
Public Function GetV(B As Double) As Double '其中B为弧度
GetV = Sqr(1 + e_e * Cos(B) * Cos(B))
'Print B
'Print e_e
'Print Sqr(1 + e_e * Cos(B) * Cos(B))
End Function
Public Function GetM(B As Double) As Double '其中B为弧度
Dim V As Double
V = GetV(B)
GetM = c / (V * V * V)
End Function
Public Function GetN(B As Double) As Double '其中B为弧度
Dim V As Double
V = GetV(B)
GetN = c / V
End Function
Public Function Gett(B As Double) As Double '其中B为弧度
Gett = Tan(B)
End Function
Public Function Getnn(B As Double) As Double '其中B为弧度
Getnn = e_e * Cos(B) * Cos(B)
End Function
Public Function RadianToAngle(radian As Double) As Double '弧度化角度
Dim angle As Double
Dim d As Double
Dim f As Double
Dim m As Double
Do While (radian > (2 * PI))
radian = radian - 2 * PI
Loop
'Do While (radian < 0)
'radian = radian + 2 * PI
'Loop
angle = radian * 180 / PI
d = Int(Abs(angle)) * Sgn(angle)
f = Int(Abs((angle - d) * 60)) * Sgn((angle - d) * 60)
m = ((angle - d) * 60 - f) * 60
RadianToAngle = CDbl(d) + CDbl(f) / 100 + m / 10000
'RadianToAngle = Sgn(radian) * RadianToAngle
End Function
Private Sub Command1_Click()
If (e_e = 0) Then
MsgBox ("请选择椭球体的类型")
ElseIf (Text_B1.Text = "") Then
MsgBox ("请填入已知点1的纬度值")
ElseIf (Text_L1.Text = "") Then
MsgBox ("请填入已知点1的经度值")
ElseIf (Text_B2.Text = "") Then
MsgBox ("请填入已知点2的纬度值")
ElseIf (Text_L2.Text = "") Then
MsgBox ("请填入已知点2的经度值")
Else
Dim B1, B2, L1, L2, S As Double
Dim U, V, tm, nnm, dAm, Am, Vm, Nm, t As Double
Dim dl, dB, Bm As Double
Dim r01, r21, r03, S10, S12, S30, t01, t21, t03 As Double
B1 = AngleToRadian(Val(Text_B1.Text))
B2 = AngleToRadian(Val(Text_B2.Text))
L1 = AngleToRadian(Val(Text_L1.Text))
L2 = AngleToRadian(Val(Text_L2.Text))
dl = L2 - L1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -