From db8d5fa17d44febb90dc4a7fed9b0870a91292ce Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Mon, 27 May 2019 19:30:22 -0700 Subject: ubxtool: Add poll and decode for UBX-CFG-NMEA. --- ubxtool | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 4 deletions(-) (limited to 'ubxtool') diff --git a/ubxtool b/ubxtool index e9a33ffb..dff5ab79 100755 --- a/ubxtool +++ b/ubxtool @@ -2034,6 +2034,84 @@ class ubx(object): (self.class_id_s(u[0], u[1]), u[2], u[3], u[4], u[5], u[6], u[7])) return s + cfg_nmea_filter = { + 1: "posFilt", + 2: "mskPosFilt", + 4: "timeFilt", + 8: "dateFilt", + 0x10: "gpsOnlyFilter", + 0x20: "trackFilt", + } + + cfg_nmea_ver = { + 0x11: "2.1", + 0x23: "2,3", + 0x40: "4.0", + 0x41: "4.10", + } + + cfg_nmea_flags = { + 1: "compat", + 2: "consider", + 4: "limit82", + 8: "highPrec", + } + + cfg_nmea_svn = { + 0: "Strict", + 1: "Extended", + } + + cfg_nmea_mtid = { + 0: "Default", + 1: "GP", + 2: "GL", + 3: "GN", + 4: "GA", + 5: "GB", + } + + cfg_nmea_gtid = { + 0: "GNSS Specific", + 1: "Main", + } + + cfg_nmea_gnssfilt = { + 1: "gps", + 2: "sbas", + 0x10: "qzss", + 0x20: "glonass", + 0x40: "beidou", + } + + def cfg_nmea(self, buf): + """UBX-CFG-NMEA decode, Extended NMEA protocol configuration V1""" + m_len = len(buf) + if 0 == m_len: + return " Poll request" + + if 20 > m_len: + return "Bad Length %s" % m_len + + u = struct.unpack_from('