From 3ac250f473a60473a492376adf36fa262900cbde Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Wed, 29 May 2019 15:48:33 -0700 Subject: ubxtool: Add poll, and cleanup UBX-NAV-SOL --- ubxtool | 56 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 23 deletions(-) (limited to 'ubxtool') diff --git a/ubxtool b/ubxtool index 66ca45d3..3598c44b 100755 --- a/ubxtool +++ b/ubxtool @@ -3392,10 +3392,26 @@ class ubx(object): return s # u-blox TIME ONLY is same as Surveyed - fix_types = ('None', 'Dead Reckoning', '2D', '3D', 'GPS+DR', 'Surveyed') + nav_sol_gpsFix = { + 0: 'None', + 1: 'Dead Reckoning', + 2: '2D', + 4: '3D', + 5: 'GPS+DR', + 6: 'Surveyed', + } + + nav_sol_flags = { + 1: "GPSfixOK", + 2: "DiffSoln", + 4: "WKNSET", + 8: "TOWSET", + } def nav_sol(self, buf): - """UBX-NAV-SOL decode deprecated by u-blox""" + """UBX-NAV-SOL decode, Navigation Solution Information""" + + # deprecated by u-blox m_len = len(buf) if 0 == m_len: return " Poll request" @@ -3403,27 +3419,17 @@ class ubx(object): if 52 > m_len: return " Bad Length %s" % m_len - u = struct.unpack_from('