Мне нужно преобразовать список координат из десятичных градусов в DMS ... это работает довольно хорошо, но значение секунд по-прежнему целое число, мне нужно его как двойное значение для более высокой точности. Мой код пока что
Function Convert_Degree(Decimal_Deg) As Variant
With Application
'Set degree to Integer of Argument Passed
Degrees = Int(Decimal_Deg)
'Set minutes to 60 times the number to the right
'of the decimal for the variable Decimal_Deg
Minutes = (Decimal_Deg - Degrees) * 60
'Set seconds to 60 times the number to the right of the
'decimal for the variable Minute
Seconds = Format(((Minutes - Int(Minutes)) * 60), "0")
'Returns the Result of degree conversion
'(for example, 10.46 = 10~ 27 ' 36")
Convert_Degree = " " & Degrees & " deg " & Int(Minutes) & "' " _
& Seconds + Chr(34)
End With
End Function
Формат - это именно то, что мне нужно, но значение секунд должно быть двойным ... Я не могу заставить это работать, например, при установке Dim Seconds As Double
. Есть идеи?