From 64e40f649a10f167154c74d80dfc9fa3cb438be6 Mon Sep 17 00:00:00 2001 From: AndreHauschild Date: Thu, 11 Apr 2024 11:40:41 +0200 Subject: [PATCH] Fix common GPSRawL2C/L5, QZSRawL2C/L5 decoding --- receiver/decode_sbf.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/receiver/decode_sbf.py b/receiver/decode_sbf.py index ab6b564..0ca5dfa 100644 --- a/receiver/decode_sbf.py +++ b/receiver/decode_sbf.py @@ -561,19 +561,21 @@ def decode(self, buff, len_, sys=[], prn=[]): format(int(self.tow), prn, crcpass, cnt, src)) return -1 + fh = self.fh_gpscnav if sys == uGNSS.GPS else self.fh_qzscnav + blen = (300+7)//8 - self.fh_gpscnav.write("{:4d}\t{:6d}\t{:3d}\t{:1d}\t{:3d}\t". - format(self.week, int(self.tow), prn, - src, blen)) + fh.write("{:4d}\t{:6d}\t{:3d}\t{:1d}\t{:3d}\t". + format(self.week, int(self.tow), prn, + src, blen)) msg = bytearray(40) for i in range(10): d = st.unpack_from('L', msg, i*4, d) k += 4 msg = bytes(msg) - self.fh_gpscnav.write("\n") + fh.write("\n") sat = prn2sat(sys, prn) eph = self.rn.decode_gps_cnav(self.week, self.tow, sat, msg)