Skip to content

Commit

Permalink
- fixed glonass FDMA buffer handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokawa committed Jan 5, 2025
1 parent b9715dc commit fb866a6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
21 changes: 17 additions & 4 deletions receiver/decode_jps.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,21 @@ def decode(self, buff, len_, sys=[], prn=[]):
# type 0 - L1, 2 - L2C, 3 - P1, 4 - P2
msg = st.unpack_from('>'+len_*'L', buff, 12)
b = bytes(np.array(msg, dtype='uint32'))
sat = prn2sat(uGNSS.GLO, svn)

# get 77 bit (25x3+2) in frame without hamming and time mark
if type_ == 0:
buff = bytearray(12)
for k in range(4):
d = bs.unpack_from('u32', b, 32*k)[0]
if k < 3:
bs.pack_into('u25', buff, 25*k, d & 0x1ffffff)
else:
bs.pack_into('u2', buff, 25*k, (d >> 23) & 0x3)

if self.flg_rnxnav:
geph = None
geph = self.rn.decode_glo_fdma(self.week, time_, sat, b)
if self.flg_rnxnav and type_ == 0:
geph = self.rn.decode_glo_fdma(
self.week, self.tow, sat, buff, fcn)

if geph is not None:
self.re.rnx_gnav_body(geph, self.fh_rnxnav)
Expand Down Expand Up @@ -869,11 +880,13 @@ def decode(self, buff, len_, sys=[], prn=[]):
ch = self.ch_t[head[0]]
nsat = (len_-6)//2
# srdp = st.unpack_from('h'*nsat, buff, 5)
elif head in ('ST', 'SP', 'PV', 'PG'):
elif head in ('ST', 'SP', 'PV', 'PG', 'IE', 'UO'):
# [ST] Solution Time-Tag
# [SP] Position Covariance Matrix
# [PV] Cartesian Position and Velocity
# [PG] Geodetic Position
# [IE] IRNSS Ephemeris
# [UO] GPS UTC Time Parameters
None
else:
print("[{:s}] undef".format(head))
Expand Down
4 changes: 2 additions & 2 deletions samples/test_qznma.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
sample for QZNMA
[1] Quasi-Zenith Satellite System Interface Specification
Satellite Positioning, Navigation and Timing Service (IS-QZSS-PNT-006),
July, 2024
Signal Authentication Service (IS-QZSS-SAS-001),
March, 2024
Note:
to use the package for QZSNMA, the user needs to
Expand Down

0 comments on commit fb866a6

Please sign in to comment.