Converts Degrees Decimal Minutes GPS coordinate string into the decimal value.

@param ddmCoordinate Degrees Decimal Minutes GPS coordinate to convert. Can't be null nor blank.
@return GPS coordinates in decimal format
551752
public static double convertDdmCoordinatesToDecimal(String ddmCoordinate) {
        checkArgument(isNotBlank(ddmCoordinate), "Coordinate to convert can't be null nor blank.");

        int dotIndex = ddmCoordinate.indexOf('.');
        double degrees = parseDouble(ddmCoordinate.substring(0, dotIndex - 2));
        double minutes = parseDouble(ddmCoordinate.substring(dotIndex - 2));
        double decimalCoordinates = degrees + minutes/60;
        LOG.debug("Converted NMEA DDM degree coordinate {} (degrees/minutes: {}/{}) to decimal coordinate {}.", ddmCoordinate, degrees, minutes, decimalCoordinates);
        return decimalCoordinates;
    }
830949
function DECtoSEX(angle) {

  // Extract DMS
  const deg = parseInt(angle, 10);
  const min = parseInt((angle - deg) * 60, 10);
  const sec = (((angle - deg) * 60) - min) * 60;

  // Result in degrees sex (dd.mmss)
  return deg + min / 100 + sec / 10000;

}
1147665
def gmst(utc_time):
    
    ut1 = jdays2000(utc_time) / 36525.0
    theta = 67310.54841 + ut1 * (876600 * 3600 + 8640184.812866 + ut1 *
                                 (0.093104 - ut1 * 6.2 * 10e-6))
    return np.deg2rad(theta / 240.0) % (2 * np.pi)
846927
public static Date setMinutes(Date d, int minutes) {
       Calendar cal = Calendar.getInstance();
       cal.setTime(d);
       cal.set(Calendar.MINUTE, minutes);
       return cal.getTime();
   }
476033
public static String yyyy_MM_dd(String strDate) {
        SimpleDateFormat formatter = new SimpleDateFormat(dateFormat);
        ParsePosition pos = new ParsePosition(0);
        Date strtodate = formatter.parse(strDate, pos);
        SimpleDateFormat formatter2 = new SimpleDateFormat(dateFormat);
        return formatter2.format(strtodate);
    }
392713
def latitude(self):
        ''''''
        sd = dm_to_sd(self.lat)
        if self.lat_dir == 'N':
            return +sd
        elif self.lat_dir == 'S':
            return -sd
        else:
            return 0.
1268964
def tomindecstr(origin):
    

    degrees, minutes = tomindec(origin)
    return u'%d°%f\'' % (degrees, minutes)
1201963
public static String convertMsToShortClockTime(long millis) {
    Preconditions.checkArgument(millis >= 0, "Negative values are not supported");

    long days = millis / Constants.DAY_MS;
    long hours = (millis % Constants.DAY_MS) / Constants.HOUR_MS;
    long mins = (millis % Constants.HOUR_MS) / Constants.MINUTE_MS;
    long secs = (millis % Constants.MINUTE_MS) / Constants.SECOND_MS;

    return String.format("%d d, %d h, %d m, and %d s", days, hours, mins, secs);
  }
941549
def lat_to_deg(lat):
    """"""
    if isinstance(lat, str) and (':' in lat):
        # TODO: handle other coordinate systems
        lat_deg = dmsStrToDeg(lat)
    else:
        lat_deg = float(lat)
    return lat_deg
613762
function DEGtoSEC(angle) {

  // Extract DMS
  const deg = parseInt(angle, 10);
  let min = parseInt((angle - deg) * 100, 10);
  let sec = (((angle - deg) * 100) - min) * 100;

  // Avoid rounding problems with seconds=0
  const parts = String(angle).split('.');
  if (parts.length == 2 && parts[1].length == 2) {
    min = Number(parts[1]);
    sec = 0;
  }

  // Result in degrees sex (dd.mmss)
  return sec + min * 60 + deg * 3600;

}
576206
public static EGpsWeekDays gpsWeekTime2WeekDay( double gpsWeekTime ) {
        int seconds = (int) gpsWeekTime;
        // week starts with Sunday
        EGpsWeekDays day4Seconds = EGpsWeekDays.getDay4Seconds(seconds);
        return day4Seconds;
    }
620438
@NonNull
    public static String convertDuration(@IntRange(from = 1) long duration) {
        duration /= 1000;
        int hour = (int) (duration / 3600);
        int minute = (int) ((duration - hour * 3600) / 60);
        int second = (int) (duration - hour * 3600 - minute * 60);

        String hourValue = "";
        String minuteValue;
        String secondValue;
        if (hour > 0) {
            if (hour >= 10) {
                hourValue = Integer.toString(hour);
            } else {
                hourValue = "0" + hour;
            }
            hourValue += ":";
        }
        if (minute > 0) {
            if (minute >= 10) {
                minuteValue = Integer.toString(minute);
            } else {
                minuteValue = "0" + minute;
            }
        } else {
            minuteValue = "00";
        }
        minuteValue += ":";
        if (second > 0) {
            if (second >= 10) {
                secondValue = Integer.toString(second);
            } else {
                secondValue = "0" + second;
            }
        } else {
            secondValue = "00";
        }
        return hourValue + minuteValue + secondValue;
    }
1108679
private String getLocalTimeAsString(BigDecimal localTimeParam) {
        if (localTimeParam == null) {
            return "99:99";
        }

        BigDecimal localTime = localTimeParam;
        if (localTime.compareTo(BigDecimal.ZERO) == -1) {
            localTime = localTime.add(BigDecimal.valueOf(24.0D));
        }
        String[] timeComponents = localTime.toPlainString().split("\\.");
        int hour = Integer.parseInt(timeComponents[0]);

        BigDecimal minutes = new BigDecimal("0." + timeComponents[1]);
        minutes = minutes.multiply(BigDecimal.valueOf(60)).setScale(0, RoundingMode.HALF_EVEN);
        if (minutes.intValue() == 60) {
            minutes = BigDecimal.ZERO;
            hour += 1;
        }
        if (hour == 24) {
            hour = 0;
        }

        String minuteString = minutes.intValue() < 10 ? "0" + minutes.toPlainString() : minutes.toPlainString();
        String hourString = (hour < 10) ? "0" + String.valueOf(hour) : String.valueOf(hour);
        return hourString + ":" + minuteString;
    }
202031
def parse_location(location):
    
    def split_dms(text, hemisphere):
        """Split degrees, minutes and seconds string.

        Args:
            text (str): Text to split

        Returns::
            float: Decimal degrees
        """
        out = []
        sect = []
        for i in text:
            if i.isdigit():
                sect.append(i)
            else:
                out.append(sect)
                sect = []
        d, m, s = [float(''.join(i)) for i in out]
        if hemisphere in 'SW':
            d, m, s = [-1 * x for x in (d, m, s)]
        return to_dd(d, m, s)

    for sep in ';, ':
        chunks = location.split(sep)
        if len(chunks) == 2:
            if chunks[0].endswith('N'):
                latitude = float(chunks[0][:-1])
            elif chunks[0].endswith('S'):
                latitude = -1 * float(chunks[0][:-1])
            else:
                latitude = float(chunks[0])
            if chunks[1].endswith('E'):
                longitude = float(chunks[1][:-1])
            elif chunks[1].endswith('W'):
                longitude = -1 * float(chunks[1][:-1])
            else:
                longitude = float(chunks[1])
            return latitude, longitude
        elif len(chunks) == 4:
            if chunks[0].endswith(('s', '"')):
                latitude = split_dms(chunks[0], chunks[1])
            else:
                latitude = float(chunks[0])
                if chunks[1] == 'S':
                    latitude = -1 * latitude
            if chunks[2].endswith(('s', '"')):
                longitude = split_dms(chunks[2], chunks[3])
            else:
                longitude = float(chunks[2])
                if chunks[3] == 'W':
                    longitude = -1 * longitude
            return latitude, longitude
332375
public static OffsetTime time(EvaluationContext ctx, Object hours, Object minutes, Object seconds) {
        int _hours = Conversions.toInteger(hours, ctx);
        int _minutes = Conversions.toInteger(minutes, ctx);
        int _seconds = Conversions.toInteger(seconds, ctx);
        LocalTime localTime = LocalTime.of(_hours, _minutes, _seconds);
        return ZonedDateTime.of(LocalDate.now(ctx.getTimezone()), localTime, ctx.getTimezone()).toOffsetDateTime().toOffsetTime();
    }
796791
def hms2dec(hms):
    
    DEGREE = 360.
    HOUR = 24.
    MINUTE = 60.
    SECOND = 3600.

    if isstring(hms):
        hour,minute,second = np.array(re.split('[hms]',hms))[:3].astype(float)
    else:
        hour,minute,second = hms.T

    decimal = (hour + minute * 1./MINUTE + second * 1./SECOND)*(DEGREE/HOUR)
    return decimal
408148
private static String formatISO6709Short(final PointLocation pointLocation)
  {
    final Latitude latitude = pointLocation.getLatitude();
    final Longitude longitude = pointLocation.getLongitude();
    String string = formatLatitudeShort(latitude) +
                    formatLongitudeShort(longitude);
    final double altitude = pointLocation.getAltitude();
    string = string + formatAltitudeWithSign(altitude);
    final String crs = pointLocation.getCoordinateReferenceSystemIdentifier();
    string = string + formatCoordinateReferenceSystemIdentifier(crs);
    return string + "/";
  }