i have this python code, using NMEA sentence ($GPRMC)
i need to convert the latitude ang longitude to decimal degress, The details are in this link : http://notinthemanual.blogspot.com/2008 ... de-to.html
Code: Select all
import serial
ser = serial.Serial('/dev/ttyUSB0', 9600,timeout=1)
x = ser.read(1200)
pos1 = x.find("$GPRMC")
pos2 = x.find("\n", pos1)
loc = x[pos1:pos2]
data = loc.split(',')
if data[2] == 'V':
print 'No location found'
else
print "Latitude =" + data[3]
print "Longitude =" + data[5]
