Skip to content

Commit b3b8364

Browse files
committed
[reassembler] time: account for extra-long preamble
1 parent c7be665 commit b3b8364

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

iridiumtk/reassembler/time.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def lbfc_str(ts, start=0):
5050
return f"{lbfc_c:03d}{lbfc_o:+03.0f}#{slot}"
5151

5252

53+
simplex = ("IRA:", "ITL:", "INP:", "IMS:", "MSG:")
5354
class ReassembleTIME(Reassemble):
5455
toff = None
5556

@@ -65,10 +66,15 @@ def filter(self, line):
6566

6667
def process(self, q):
6768
q.enrich(channelize=True)
68-
if self.toff is None and q.typ in ("IRA:", "ITL:", "INP:", "IMS:", "MSG:"):
69-
self.toff = q.mstime
7069
q.uxtime = np.datetime64(int(q.starttime), 's')
7170
q.uxtime += np.timedelta64(q.nstime, 'ns')
71+
if q.typ in ("IBC:", ) + simplex: # has a longer preamble
72+
q.uxtime -= np.timedelta64((64-16)*(1000000//25000), 'us')
73+
q.mstime -= (64-16)/25000 * 1000
74+
75+
if self.toff is None and q.typ in simplex:
76+
self.toff = q.mstime
77+
7278
strtime = str(q.uxtime)[:-2]
7379
if False:
7480
lbfc_c = (q.mstime-self.toff+45)//90

0 commit comments

Comments
 (0)