Skip to content
Open
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ Enable error correction in the uniq word. Increases processing time.

##### --harder

Try to decode packets with correctable bit errors at the beginning. Significantly increases processing time.
Relax the BCH gate so bursts with 1-2 correctable bit errors in the header get decoded instead of falling through to `RAW`. In practice this recovers a large fraction of downlink LCW traffic: on typical multi-hour captures 15-25% of the RAW bucket moves into `IRI`, `IBC`, `IIU`, `IME`, `ITL`, `IRA`, and `LW` (individual channels can see 3x more hits than without `--harder`). Stats comparisons between captures are only meaningful when both sides use the same setting.

Significantly increases processing time. The parser prints a one-line hint on stderr at the end of the run when `--harder` is off and the RAW fraction looks inflated.

##### --disable-freqclass

Expand Down
20 changes: 19 additions & 1 deletion iridium-parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __call__(self, parser, ns, values, option):
parser.add_argument("--uw-ec", action="store_true", dest='uwec',
help="enable error correction on unique word")
parser.add_argument("--harder", action="store_true",
help="try harder to parse input")
help="relax BCH gate - recover bursts with correctable bit errors (otherwise lost to RAW). Slower, but can move 15-25%% of RAW into IRI/IBC/IIU/etc.")
parser.add_argument("--disable-freqclass", action="store_false", dest='freqclass',
help="turn frequency classificiation off")
parser.add_argument("-s", "--satclass", action="store_true", dest='dosatclass',
Expand Down Expand Up @@ -337,6 +337,10 @@ def perline(q):
return
if args.do_stats:
stats["out"]+=1
# bursts that never upgraded to a known msgtype print as "RAW:"; track
# them so we can hint at --harder when the fraction looks inflated.
if type(q).__name__ == 'Message':
stats["raw"]+=1
if args.output == "err":
if q.error:
selected.append(q)
Expand Down Expand Up @@ -408,6 +412,7 @@ def bitdiff(a, b):
stats['start']=time.time()
stats['in']=0
stats['out']=0
stats['raw']=0
stats['stop']= Event()
sthread = Thread(target = stats_thread, args = [stats], daemon= True, name= 'stats')
sthread.start()
Expand All @@ -423,6 +428,19 @@ def bitdiff(a, b):
stats['stop'].set()
sthread.join()

# Accuracy hint: many bursts that end up as RAW are actually decodable
# DL frames that hit the strict BCH gate with 1-2 bit errors. --harder
# relaxes that gate and recovers them as IRI/IBC/IIU/etc. Only hint on
# unfiltered runs where the signal is clear, and only once per run.
if (not args.harder
and args.linefilter['type'] == 'All'
and stats['out'] >= 1000
and stats['raw'] / stats['out'] >= 0.15):
raw_pct = 100.0 * stats['raw'] / stats['out']
print("NOTE: %.0f%% of output frames are RAW. Try --harder to recover "
"LCW-shaped bursts (expect 15-25%% of RAW to move into IRI/IBC/"
"IIU/etc.)." % raw_pct, file=sys.stderr)

if args.output=='zmq':
socket.close()
context.term()
Expand Down