Skip to content

Commit

Permalink
Fix common GPSRawL2C/L5, QZSRawL2C/L5 decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreHauschild committed Apr 11, 2024
1 parent 8db80c7 commit 64e40f6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions receiver/decode_sbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', buff, k)[0]
self.fh_gpscnav.write("{:08x}".format(d))
fh.write("{:08x}".format(d))
st.pack_into('>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)
Expand Down

0 comments on commit 64e40f6

Please sign in to comment.