diff --git a/receiver/decode_jps.py b/receiver/decode_jps.py index 3897d2e..8fef1d0 100644 --- a/receiver/decode_jps.py +++ b/receiver/decode_jps.py @@ -698,12 +698,19 @@ def decode(self, buff, len_, sys=[], prn=[]): print("[WD] prn={:d} tow={:d} type={:d}". format(prn, time_, type_)) + sat = prn2sat(uGNSS.SBS, prn) + b = buff[12:] + if self.flg_sbas and self.flg_rnxnav: + seph = self.rn.decode_sbs_l1(self.week, time_, sat, b) + if seph is not None: + self.re.rnx_snav_body(seph, self.fh_rnxnav) + if self.flg_sbas and self.week >= 0: if sbs_ref > 0 and prn != sbs_ref: return self.fh_sbas.write("{:4d}\t{:6d}\t{:3d}\t{:1d}\t{:3d}\t{:s}\n". format(self.week, time_, prn, type_, len_, - hexlify(buff[12:]).decode())) + hexlify(b).decode())) elif head[0] == 'r' and head[1] in self.ch_t.keys(): # Integer Pseudo-ranges diff --git a/receiver/decode_sbf.py b/receiver/decode_sbf.py index 9c1048d..72d2a90 100644 --- a/receiver/decode_sbf.py +++ b/receiver/decode_sbf.py @@ -558,12 +558,21 @@ def decode(self, buff, len_, sys=[], prn=[]): self.fh_sbas.write("{:4d}\t{:6d}\t{:3d}\t{:2d}\t{:3d}\t". format(self.week, int(self.tow), prn, src-24, 32)) + msg = bytearray(32) for i in range(8): d = st.unpack_from('L', msg, i*4, d) k += 4 self.fh_sbas.write("\n") + sat = prn2sat(uGNSS.SBS, prn) + seph = None + if blk_num == 4020: + seph = self.rn.decode_sbs_l1(self.week, self.tow, sat, msg) + if seph is not None: + self.re.rnx_snav_body(seph, self.fh_rnxnav) + elif blk_num == 4022: # GalRawFNAV sys, prn = self.decode_head(buff, k) sat = prn2sat(sys, prn) @@ -683,6 +692,7 @@ def decode(self, buff, len_, sys=[], prn=[]): k += 7 crcpass, cnt, src, freq, ch = st.unpack_from(' 0: diff --git a/receiver/decode_ubx.py b/receiver/decode_ubx.py index d8e0ca8..5afeca7 100644 --- a/receiver/decode_ubx.py +++ b/receiver/decode_ubx.py @@ -246,6 +246,7 @@ def decode_nav(self, buff, k=6): fh_ = None eph = None geph = None + seph = None type_ = sigid blen = len_*4 if sys == uGNSS.GPS: @@ -287,8 +288,18 @@ def decode_nav(self, buff, k=6): fh_ = self.fh_galcnav type_ = 6 elif sys == uGNSS.BDS: - if sigid == 4 and self.flg_bdsd12: # B3I D1 + if sigid == 0 and self.flg_bdsd12: # B1I D1 + type_ = 0 + # eph = self.rn.decode_bds_d1(self.week, self.tow, sat, b) + elif sigid == 1 and self.flg_bdsd12: # B1I D2 + type_ = 0 + elif sigid == 2 and self.flg_bdsd12: # B2I D1 + type_ = 1 + elif sigid == 3 and self.flg_bdsd12: # B2I D2 + type_ = 1 + elif sigid == 4 and self.flg_bdsd12: # B3I D1 type_ = 2 + # eph = self.rn.decode_bds_d1(self.week, self.tow, sat, b, 2) elif sigid == 6 and self.flg_bdsb1c: # B1Cd fh_ = self.fh_bdsb1c type_ = 3 @@ -312,7 +323,10 @@ def decode_nav(self, buff, k=6): self.week, self.tow, sat, b) elif sigid == 8 and self.flg_bdsb2a: # B2ad type_ = 5 + elif sigid == 10 and self.flg_bdsd12: # B3I D2 + type_ = 2 elif sys == uGNSS.GLO: + freqid -= 7 if sigid == 0 and self.flg_gloca: # L1 OF type_ = 0 geph = self.rn.decode_glo_fdma(self.week, self.tow, @@ -325,6 +339,7 @@ def decode_nav(self, buff, k=6): if sigid == 0 and self.flg_sbas: # L1C/A fh_ = self.fh_sbas type_ = 0 + seph = self.rn.decode_sbs_l1(self.week, self.tow, sat, b) elif sys == uGNSS.QZS: if sigid == 0 and self.flg_qzslnav: # L1C/A fh_ = self.fh_qzslnav @@ -344,6 +359,8 @@ def decode_nav(self, buff, k=6): self.re.rnx_nav_body(eph, self.fh_rnxnav) if geph is not None: self.re.rnx_gnav_body(geph, self.fh_rnxnav) + if seph is not None: + self.re.rnx_snav_body(seph, self.fh_rnxnav) if fh_ is not None and blen > 0: fh_.write("{:4d}\t{:6d}\t{:3d}\t{:1d}\t{:3d}\t{:s}\n". @@ -417,10 +434,10 @@ def decode(self, buff, len_, sys=[], prn=[]): opt.flg_bdsb1c = True opt.flg_bdsb2a = False opt.flg_bdsb2b = False - opt.flg_bdsd12 = False - opt.flg_gloca = False + opt.flg_bdsd12 = True + opt.flg_gloca = True opt.flg_irnnav = False - opt.flg_sbas = False + opt.flg_sbas = True opt.flg_rnxnav = True opt.flg_rnxobs = True