Skip to content

Commit

Permalink
Merge pull request #51 from AndreHauschild/rtcmfix
Browse files Browse the repository at this point in the history
Add initialization of t0s for local corrections
  • Loading branch information
hirokawa authored Apr 23, 2024
2 parents 9aae6d1 + 455a151 commit 73be994
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/cssrlib/cssrlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ def __init__(self):
self.sat_n = []
self.t0 = {}
self.cstat = 0 # status for receiving CSSR message
self.t0s = {}
sc_t = [sCType.CLOCK, sCType.ORBIT, sCType.CBIAS, sCType.PBIAS,
sCType.HCLOCK]
for sc in sc_t:
self.t0s[sc] = gtime_t()


class cssr:
Expand Down Expand Up @@ -444,7 +449,7 @@ def isset(self, mask, nbit, k):
return False

def set_t0(self, inet=0, sat=0, ctype=0, t=gtime_t()):
""" set reference time for correcion to check validity time """
""" set reference time for correction to check validity time """
sc_t = [sCType.CLOCK, sCType.ORBIT, sCType.CBIAS, sCType.PBIAS,
sCType.HCLOCK]

Expand Down Expand Up @@ -1160,7 +1165,7 @@ def out_log(self):
np.isnan(self.lc[0].dclk[sat_]):
continue
self.fh.write(
" {:s}\t{:3d}\t{:6.3f}\t{:6.3f}\t{:6.3f}\t{:6.3f}\n"
" {:s}\t{:3d}\t{:6.3f}\t{:6.3f}\t{:6.3f}\t{:8.4f}\n"
.format(sat2id(sat_),
self.lc[0].iode[sat_],
self.lc[0].dorb[sat_][0],
Expand Down
2 changes: 1 addition & 1 deletion src/cssrlib/rtcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ def out_log_ssr_clk(self, sys):
sys_, _ = sat2prn(sat_)
if sys_ != sys:
continue
self.fh.write(" {:s}\t{:5.3f}\n".format(sat2id(sat_),
self.fh.write(" {:s}\t{:8.4f}\n".format(sat2id(sat_),
self.lc[0].dclk[sat_]))

def out_log_ssr_orb(self, sys):
Expand Down

0 comments on commit 73be994

Please sign in to comment.