Encode and decode COSPAS-SARSAT 406 MHz emergency beacon signals in audio WAV format. Supports EPIRB (maritime), ELT (aviation), and PLB (personal) distress beacons used in the international satellite search-and-rescue system. Encodes beacon registration, identification, position, and protocol type into BPSK- modulated audio. Decodes WAV recordings to extract beacon information. Use this skill whenever the user mentions COSPAS-SARSAT, EPIRB, ELT, PLB, 406 MHz beacon, distress beacon, emergency beacon, SAR beacon, LEOSAR, MEOSAR, or wants to create/analyze emergency beacon WAV files.
Comprehensive codec for encoding and decoding emergency distress beacons used in the international search-and-rescue system.
COSPAS-SARSAT is the satellite-based search and rescue system operated by an international consortium. When an emergency beacon is activated:
Three types of beacons transmit on this frequency:
Transmission characteristics:
Audio baseband representation (for SDR processing):
All beacon messages follow this 15-bit to 144-bit structure:
000101111101100 — optimized for autocorrelation detection011010000 — identifies normal message (not self-test)0010 = Maritime EPIRB (user protocol) or Standard Location EPIRB0011 = Standard Location ELT (aviation)0100 = Standard Location PLB (personal) or Serial user protocol0110 = Aviation ELT (user protocol) with ICAO address1110 / 1100 = Test beaconsMaritime EPIRB (user protocol):
Aviation ELT (user protocol):
Personal Locator Beacon (PLB):
Coarse Position (20 bits):
Fine Position Offset (25 bits, optional):
Primary BCH Code (bits 26-85, 60 data bits):
Secondary BCH Code (optional, long format):
Create an audio WAV file containing an encoded beacon signal:
python3 sarsat_encode.py output.wav \
--country 338 \
--type epirb \
--mmsi 311000001 \
--lat 40.7 \
--lon -74.0 \
--long-format
Options:
--country CODE — 3-digit ITU country code (default: 338 = USA)--type {epirb,elt,plb,test} — Beacon type (default: epirb)--mmsi NNNNNNNNN — MMSI number for maritime beacons--icao NNNNNN — ICAO hex address for aviation (e.g., A0B1C2)--serial NNNN — Serial number for PLB/serial protocol--lat DD.DDDD — Latitude (positive=North, negative=South)--lon DD.DDDD — Longitude (positive=East, negative=West)--long-format — Use 144-bit format with position (default)--short-format — Use 112-bit format without position--bursts N — Number of beacon bursts (default: 1)--burst-interval N — Seconds between bursts (default: 50)Extract beacon information from an audio WAV recording:
python3 sarsat_decode.py input.wav output.txt -v
Output includes:
Run the comprehensive test suite to verify correct implementation:
python3 sarsat_test.py
Tests cover:
| Code | Country | Code | Country |
|---|---|---|---|
| 201-299 | Europe | 301-399 | Americas |
| 226 | France | 303 | Canada |
| 230 | Finland | 338 | USA |
| 211 | Germany | 244 | Netherlands |
| 412 | Japan | 501 | Australia |
| 431 | China | 636 | South Africa |
cospas-sarsat/
├── SKILL.md # This documentation
├── README.md # Extended usage guide
├── scripts/
│ ├── sarsat_common.py # Core codec library
│ ├── sarsat_encode.py # Beacon encoder CLI
│ ├── sarsat_decode.py # Beacon decoder CLI
│ └── sarsat_test.py # Comprehensive test suite
└── examples/
├── maritime_epirb.sh # Example: encode maritime EPIRB
├── aviation_elt.sh # Example: encode aviation ELT
└── plb_with_position.sh # Example: encode PLB with coordinates
Recording beacon signals:
sarsat_decode.pyGenerating test signals:
sarsat_encode.py to create synthetic beacon WAV filesReal-world beacon activation: