kopia lustrzana https://github.com/projecthorus/chasemapper
Added support for GNRMC and GNGGA NMEA output
Several GPS mouses (like Beitan BN-808 with U-blox chip) send GNRMC instead of GPRMC as well as GNGGA instead of GPGGA NMEA strings and causing GPS not to work with Chasemapper. This change made those gps-mouses work. See http://navspark.mybigcommerce.com/content/NMEA_Format_v0.1.pdf table2 and 3 for equal function for GPGGA/GNGGA "Time, position, and fix related data of the receiver. "pull/37/head
rodzic
d49978f222
commit
1a116381bc
|
@ -179,7 +179,7 @@ class SerialGPS(object):
|
|||
if self.uberdebug:
|
||||
print(data.strip())
|
||||
|
||||
if ("$GPRMC" in data) or ("GNRMC" in data):
|
||||
if ("$GPRMC" in data) or ("$GNRMC" in data):
|
||||
logging.debug("SerialGPS - Got GPRMC or GNRMC.")
|
||||
gprmc = data.split(",")
|
||||
gprmc_lat = self.dm_to_sd(gprmc[3])
|
||||
|
@ -200,7 +200,7 @@ class SerialGPS(object):
|
|||
|
||||
self.gps_state["speed"] = gprmc_speed * 0.51444 * 3.6
|
||||
|
||||
elif ("$GPGGA" in data) or ("GNGGA" in data):
|
||||
elif ("$GPGGA" in data) or ("$GNGGA" in data):
|
||||
logging.debug("SerialGPS - Got GPGGA or GNGGA.")
|
||||
gpgga = data.split(",")
|
||||
gpgga_lat = self.dm_to_sd(gpgga[2])
|
||||
|
|
Ładowanie…
Reference in New Issue