code: def dms2dd(d,m,s):
      
      if d < 0:
          sign = -1
      else:
          sign = 1
      dd = sign * (int(abs(d)) + float(m) / 60 + float(s) / 3600)
      return dd
docs: Convert degrees, minutes, seconds to decimal degrees