| Line | |
|---|
| 1 | #!/usr/bin/env python3
|
|---|
| 2 | """Regression capture for the SSR QC IOD check (tests/data/qc_iod_261015.raw).
|
|---|
| 3 |
|
|---|
| 4 | ephemeris stream: each RTCM3 message of BCEP00BKG0 only at its first reception
|
|---|
| 5 | (the stream repeats every data set every 5 s), START_EPH..END
|
|---|
| 6 | SSR streams: complete, START_SSR..END
|
|---|
| 7 |
|
|---|
| 8 | usage: mk_qc_iod.py <SSR QC capture of 15 Oct 2026 (bncSsrQc.raw_261015)> <out>
|
|---|
| 9 | """
|
|---|
| 10 | import sys
|
|---|
| 11 | sys.path.insert(0, '/home/andrea/tools/BNC/tests/tools')
|
|---|
| 12 | import bncraw
|
|---|
| 13 |
|
|---|
| 14 | EPH = 'BCEP00BKG0'
|
|---|
| 15 | SSR = ('SSRA00WHU1', 'SSRA00GMV1', 'SSRA00CNE1')
|
|---|
| 16 | START_EPH = '2026-10-15T00:00'
|
|---|
| 17 | START_SSR = '2026-10-15T01:55'
|
|---|
| 18 | END = '2026-10-15T02:10'
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | def chunks(raw):
|
|---|
| 22 | framer = bncraw.Rtcm3Framer()
|
|---|
| 23 | seen = set()
|
|---|
| 24 | for t, sta, fmt, data in bncraw.read_chunks(raw):
|
|---|
| 25 | if t >= END:
|
|---|
| 26 | return
|
|---|
| 27 | if sta == EPH and t >= START_EPH:
|
|---|
| 28 | new = [p for p in framer.feed(data) if p not in seen]
|
|---|
| 29 | seen.update(new)
|
|---|
| 30 | if new:
|
|---|
| 31 | yield t, sta, fmt, b''.join(bncraw.frame(p) for p in new)
|
|---|
| 32 | elif sta in SSR and t >= START_SSR:
|
|---|
| 33 | yield t, sta, fmt, data
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | bncraw.write_chunks(sys.argv[2], chunks(sys.argv[1]))
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.