Hitung Jarak (NM)
unknown
vbscript
2 years ago
493 B
5
Indexable
Public Function DistCalc(Prague_Lati As Double, Prague_Longi As Double, Salzburg_Lati As Double, Salzburg_Longi As Double)
With WorksheetFunction
M = Cos(.Radians(90 - Prague_Lati))
N = Cos(.Radians(90 - Salzburg_Lati))
O = Sin(.Radians(90 - Prague_Lati))
P = Sin(.Radians(90 - Salzburg_Lati))
Q = Cos(.Radians(Prague_Longi - Salzburg_Longi))
DistCalc = .Acos(M * N + O * P * Q) * 6371 * 0,539957
End With
End FunctionEditor is loading...