code: def decimal_to_dms(value, precision):
      '''
      Convert decimal position to degrees, minutes, seconds in a fromat supported by EXIF
      '''
      deg = math.floor(value)
      min = math.floor((value - deg) * 60)
      sec = math.floor((value - deg - min / 60) * 3600 * precision)
  
      return ((deg, 1), (min, 1), (sec, precision)f decimal_to_dms(value, precision):
      '''
      Convert decimal position to degrees, minutes, seconds in a fromat supported by EXIF
      '''
      deg = math.floor(value)
      min = math.floor((value - deg) * 60)
      sec = math.floor((value - deg - min / 60) * 3600 * precision)
  
      return ((deg, 1), (min, 1), (sec, precision))
docs: Convert decimal position to degrees, minutes, seconds in a fromat supported by EXIF