def test_invalid_coordinates(self): self.assertEqual( gps.parse_line(b'$GPGGA,053446.426,,,,,0,00,,,M,0.0,M,,0000*56'), gps.INVALID_COORDINATES)
def test_parsing_old_GPGGA(self): line = b'$GPGGA,051852.000,5005.0244,N,01430.3360,E,1,06,3.8,253.1,M,45.4,M,,0000*58' self.assertEqual( gps.parse_line(line), [52220160, 180301464]) # arc milliseconds (x, y) = (lon, lat)
def test_parse_line(self): line = b'$GNGGA,182433.10,5007.71882,N,01422.50467,E,1,05,6.09,305.1,M,44.3,M,,*41' self.assertEqual( gps.parse_line(line), [51750280, 180463129]) # arc milliseconds (x, y) = (lon, lat)
def test_invalid_coordinates(self): self.assertEqual(gps.parse_line(b'$GPGGA,053446.426,,,,,0,00,,,M,0.0,M,,0000*56'), gps.INVALID_COORDINATES)
def test_parsing_old_GPGGA(self): line = b'$GPGGA,051852.000,5005.0244,N,01430.3360,E,1,06,3.8,253.1,M,45.4,M,,0000*58' self.assertEqual(gps.parse_line(line), [52220160, 180301464]) # arc milliseconds (x, y) = (lon, lat)
def test_parse_line(self): line = b'$GNGGA,182433.10,5007.71882,N,01422.50467,E,1,05,6.09,305.1,M,44.3,M,,*41' self.assertEqual(gps.parse_line(line), [51750280, 180463129]) # arc milliseconds (x, y) = (lon, lat)