Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initialization of t0s for local corrections #51

Merged
merged 4 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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