Skip to content

Commit

Permalink
Merge pull request #49 from AndreHauschild/devel
Browse files Browse the repository at this point in the history
Update to APC reference signals
  • Loading branch information
hirokawa authored Apr 4, 2024
2 parents e6f1dd3 + cb81c98 commit 61c82f9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/cssrlib/ephemeris.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ def satpos(sat, t, nav, cs=None, orb=None):
"""

n = 1
rs = np.zeros((n, 3))
vs = np.zeros((n, 3))
dts = np.zeros(n)
rs = np.ones((n, 3))*np.nan
vs = np.ones((n, 3))*np.nan
dts = np.ones(n)*np.nan
svh = np.zeros(n, dtype=int)
iode = -1

Expand Down
4 changes: 2 additions & 2 deletions src/cssrlib/peph.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ def __init__(self):
self.nmax = 24*12

def parse_satlist(self, line):
n = len(line[9:60])//3
n = len(line[9:60].strip())//3
for k in range(n):
svid = line[9+3*k:12+3*k]
if int(svid[1:]) > 0:
self.sat[self.cnt] = id2sat(svid)
self.cnt += 1

def parse_acclist(self, line):
n = len(line[9:60])//3
n = len(line[9:60].strip())//3
for k in range(n):
acc = int(line[9+3*k:12+3*k])
if self.cnt < self.nsat:
Expand Down
31 changes: 22 additions & 9 deletions src/cssrlib/pppssr.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def zdres(self, obs, cs, bsx, rs, vs, dts, rr, rtype=1):
cbias = np.zeros(self.nav.nf)
pbias = np.zeros(self.nav.nf)

if self.nav.ephopt == 4:
if self.nav.ephopt == 4: # from Bias-SINEX

# Code and phase signal bias, converted from [ns] to [m]
# note: IGS uses sign convention different with RTCM
Expand Down Expand Up @@ -619,17 +619,30 @@ def zdres(self, obs, cs, bsx, rs, vs, dts, rr, rtype=1):
sig0 = None
if cs is not None:

if cs.cssrmode in (sc.GAL_HAS_SIS, sc.GAL_HAS_IDD,
sc.QZS_MADOCA):
if cs.cssrmode == sc.QZS_MADOCA:

if sys == uGNSS.GPS:
sig0 = (rSigRnx("GC1W"), rSigRnx("GC2W"))
elif sys == uGNSS.GLO:
sig0 = (rSigRnx("RC1C"), rSigRnx("RC2C"))
elif sys == uGNSS.GAL:
sig0 = (rSigRnx("EC1C"), rSigRnx("EC7Q"))
elif sys == uGNSS.QZS:
sig0 = (rSigRnx("JC1C"), rSigRnx("JC2S"))
elif sys == uGNSS.GLO:
sig0 = (rSigRnx("RC1C"), rSigRnx("RC2C"))

elif cs.cssrmode == sc.GAL_HAS_SIS:

if sys == uGNSS.GPS:
sig0 = (rSigRnx("GC1W"), rSigRnx("GC2W"))
elif sys == uGNSS.GAL:
sig0 = (rSigRnx("EC1C"), rSigRnx("EC7Q"))

elif cs.cssrmode == sc.GAL_HAS_IDD:

if sys == uGNSS.GPS:
sig0 = (rSigRnx("GC1C"),)
elif sys == uGNSS.GAL:
sig0 = (rSigRnx("EC1C"),)

elif cs.cssrmode == sc.BDS_PPP:

Expand All @@ -650,10 +663,10 @@ def zdres(self, obs, cs, bsx, rs, vs, dts, rr, rtype=1):
antsCP = antModelTx(
self.nav, e[i, :], sigsCP, sat, obs.t, rs[i, :])

elif cs is not None and (cs.cssrmode == sc.GAL_HAS_SIS or
cs.cssrmode == sc.GAL_HAS_IDD or
cs.cssrmode == sc.QZS_MADOCA or
cs.cssrmode == sc.BDS_PPP):
elif cs is not None and cs.cssrmode in (sc.GAL_HAS_SIS,
sc.GAL_HAS_IDD,
sc.QZS_MADOCA,
sc.BDS_PPP):

antsPR = antModelTx(self.nav, e[i, :], sigsPR,
sat, obs.t, rs[i, :], sig0)
Expand Down
2 changes: 1 addition & 1 deletion src/cssrlib/rawnav.py
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ def init_sig_tab(self, gnss_t='GEJ'):
rSigRnx('RD3Q')],
uTYP.S: [rSigRnx('RS1C'), rSigRnx('RS2C'), rSigRnx('RS2P'),
rSigRnx('RS3Q')],
},
}

if 'E' in gnss_t:
sig_tab[uGNSS.GAL] = {
Expand Down

0 comments on commit 61c82f9

Please sign in to comment.