From 9854b4823d9ef54a44bfc8eaf224fe0504625cb0 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 24 May 2019 20:16:01 -0700 Subject: ubxtool: Better Subfram 3 decode, Still unconfirmed. --- ubxtool | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'ubxtool') diff --git a/ubxtool b/ubxtool index e604b1b9..6cdc509a 100755 --- a/ubxtool +++ b/ubxtool @@ -217,6 +217,19 @@ def unpack_u24(word, pos): return u[0] +def unpack_s32s(word, word1): + """Grab an signed 32 bits from weird split word, word1""" + + bytes = bytearray(4) + bytes[0] = (word >> 6) & 0xff + bytes[1] = (word >> 14) & 0xff + bytes[2] = (word >> 22) & 0xff + bytes[3] = (word1 >> 6) & 0xff + + u = struct.unpack_from('