本文介绍了我该如何用Java编写此VB代码...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Function ParallaxHA(HH As Double, HM As Double, HS As Double, DD As Double, DM As Double, DS As Double, SW As String, GP As Double, HT As Double, HP As Double) As Double
A = Radians(GP): C1 = Cos(A): S1 = Sin(A)
U = Atn(0.996647 * S1 / C1)
C2 = Cos(U): S2 = Sin(U): B = HT / 6378160#
RS = (0.996647 * S2) + (B * S1)
RC = C2 + (B * C1): TP = 6.283185308
RP = 1 / Sin(Radians(HP))
X = Radians(DHDD(HMSDH(HH, HM, HS))): X1 = X
Y = Radians(DMSDD(DD, DM, DS)): Y1 = Y
If ((Left$(SW, 1) = "T") Or (Left$(SW, 1) = "t")) Then
D = 1#
Else
D = -1#
End If
If (D = 1) Then
GoSub 2870
GoTo 2895
End If
P1 = 0: Q1 = 0
2845 GoSub 2870: P2 = P - X: Q2 = Q - Y
AA = Abs(P2 - P1): BB = Abs(Q2 - Q1)
If ((AA < 0.000001) And (BB < 0.000001)) Then
P = X1 - P2: Q = Y1 - Q2: X = X1: Y = Y1
GoTo 2895
End If
X = X1 - P2: Y = Y1 - Q2: P1 = P2: Q1 = Q2: GoTo 2845
2870 CX = Cos(X): SY = Sin(Y): CY = Cos(Y)
AA = (RC * Sin(X)) / ((RP * CY) - (RC * CX))
DX = Atn(AA): P = X + DX: CP = Cos(P)
P = P - TP * Int(P / TP)
Q = Atn(CP * (RP * SY - RS) / (RP * CY * CX - RC))
Return
2895 ParallaxHA = DDDH(Degrees(P))
推荐答案
这篇关于我该如何用Java编写此VB代码...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!