Skip to content

Commit

Permalink
- On, hexdump if I/NAV the missing tail offset of odd page was not co…
Browse files Browse the repository at this point in the history
…nsidere.
  • Loading branch information
hirokawa committed Nov 30, 2024
1 parent bf9e050 commit 2c14831
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions receiver/decode_sbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,21 +665,24 @@ def decode(self, buff, len_, sys=[], prn=[]):
msg = bytearray(32)
for i in range(8):
d = st.unpack_from('<L', buff, k)[0]
self.fh_galinav.write("{:08x}".format(d))
st.pack_into('>L', msg, i*4, d)
k += 4
self.fh_galinav.write("\n")

# GALRawINAV is missing tail bit (6) of even page
# add 6 bits offset for odd page
msg_ = bytearray(30)
msg_[0:15] = msg[0:15]
msg_[0:15] = msg[0:15] # even page
k = 114
for i in range(15):
d = bs.unpack_from('u8', bytes(msg), k)[0]
bs.pack_into('u8', msg_, 120+i*8, d)
k += 8
msg_ = bytes(msg_)

for i in range(30):
self.fh_galinav.write("{:08x}".format(msg_[i]))
self.fh_galinav.write("\n")

eph = self.rn.decode_gal_inav(self.week, self.tow,
sat, 2, msg_)
if self.mode_galinav == 0 and eph is not None:
Expand Down

0 comments on commit 2c14831

Please sign in to comment.