-/* $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>
}
}
- /* 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 */