mirror of
https://github.com/smittix/intercept.git
synced 2026-05-03 10:57:58 -07:00
fix: harden DSC decoder against noise-induced false decodes
Stricter dot pattern detection (200 bits/100 alternations), bounded phasing strip (max 7), symbol check bit parity validation, EOS minimum position check, strict MMSI decode (reject out-of-range symbols), format-aware telecommand extraction, and expanded critical category detection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -89,6 +89,15 @@ TELECOMMAND_CODES = {
|
||||
201: 'POLL_RESPONSE', # Poll response
|
||||
}
|
||||
|
||||
# Full 0-127 telecommand lookup (maps unknown codes to "UNKNOWN")
|
||||
TELECOMMAND_CODES_FULL = {i: TELECOMMAND_CODES.get(i, "UNKNOWN") for i in range(128)}
|
||||
|
||||
# Format codes that carry telecommand fields
|
||||
TELECOMMAND_FORMATS = {112, 114, 116, 120, 123}
|
||||
|
||||
# Minimum symbols (after phasing strip) before an EOS can be accepted
|
||||
MIN_SYMBOLS_FOR_FORMAT = 12
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# DSC Symbol Definitions
|
||||
|
||||
Reference in New Issue
Block a user