diff options
-rw-r--r-- | sys/kern/tty_nmea.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/kern/tty_nmea.c b/sys/kern/tty_nmea.c index 8578fee59ca..fafca388b14 100644 --- a/sys/kern/tty_nmea.c +++ b/sys/kern/tty_nmea.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_nmea.c,v 1.46 2018/02/19 08:59:52 mpi Exp $ */ +/* $OpenBSD: tty_nmea.c,v 1.47 2018/09/01 06:09:26 landry Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Marc Balmer <mbalmer@openbsd.org> @@ -260,8 +260,20 @@ nmea_scan(struct nmea *np, struct tty *tp) } } - /* we only look at the GPRMC message */ - if (strcmp(fld[0], "GPRMC")) + /* + * we only look at the RMC message, which can come from different 'talkers', + * distinguished by the two-chars prefix, the most common being: + * GPS (GP) + * Glonass (GL) + * BeiDou (BD) + * Galileo (GA) + * 'Any kind/a mix of GNSS systems' (GN) + */ + if (strcmp(fld[0], "BDRMC") && + strcmp(fld[0], "GARMC") && + strcmp(fld[0], "GLRMC") && + strcmp(fld[0], "GNRMC") && + strcmp(fld[0], "GPRMC")) return; /* if we have a checksum, verify it */ |