01.
Option
Explicit
02.
'================================
03.
' 经纬度角度格式到弧度格式的转换
04.
'
06.
'================================
07.
Type TDFM
08.
D
As
Integer
09.
F
As
Integer
10.
M
As
Integer
11.
End
Type
12.
Function
DFM2JW(strDFM
As
String
)
13.
Dim
aDFM
As
TDFM
14.
Dim
vecSplit
As
Variant
15.
16.
vecSplit = Split(strDFM,
"°"
, 2)
17.
aDFM.D = Val(vecSplit(0))
18.
vecSplit = Split(vecSplit(1),
"′"
, 2)
19.
aDFM.F = Val(vecSplit(0))
20.
aDFM.M = Val(vecSplit(1))
21.
22.
DFM2JW = aDFM.D + aDFM.F / 60 + aDFM.M / 3600
23.
End
Function
TEXT(A1/24,"[h]°m′s.00″")