@Test
public void parseDegreesMinutes() {

    // Parse DDDMM.MMMM,N into decimal degrees
    assertEquals(123.761315, NMEA.parseDegreesMinutes("12345.6789", "N"), 0.01);
    assertEquals(-123.761315, NMEA.parseDegreesMinutes("12345.6789", "S"), 0.01);
    assertEquals(Double.NaN, NMEA.parseDegreesMinutes("", ""), 0.01);
    assertEquals(Double.NaN, NMEA.parseDegreesMinutes("X", ""), 0.01);
    assertEquals(Double.NaN, NMEA.parseDegreesMinutes("XX.YY", ""), 0.01);
    assertEquals(Double.NaN, NMEA.parseDegreesMinutes("12345", ""), 0.01);
}