Input from file and stdin¶
Reading from STDIN¶
AIS-catcher can read input in two ways using the -r switch: from a file by specifying a filename, or from standard input by using either a dot (.) or stdin as the argument:
AIS-catcher -r .
Pipeline example¶
AIS-catcher can be integrated into command-line processing pipelines for real-time signal processing. For example, you can capture radio signals using rtl_sdr and pipe them directly to AIS-catcher for decoding:
rtl_sdr -s 288K -f 162M - | AIS-catcher -r . -s 288K -v
sox
. Here's an example of downsampling a signal before processing:
sox -c 2 -r 1536000 -b 8 -e unsigned -t raw posterholt.raw -t raw -b 16 -e signed -r 96000 - |AIS-catcher -s 96K -r CS16 . -v
As of version 0.36, AIS-catcher includes built-in sox functionality (if compiled with this feature), allowing for built-in usage of sox:
bash AIS-catcher -s 1536K -r CU8 posterholt.raw -v -go SOXR on
By default, AIS-catcher expects input files to be in raw unsigned 8-bit IQ format (CU8). You can specify other formats using the FORMAT setting.
NMEA0183 input from file¶
For a text file with NMEA input, we can use:
AIS-catcher -r txt nmea-file
AIS-catcher -r -ga FORMAT txt file nmea-file
Summary Settings¶
Key | Type | Default | Description |
---|---|---|---|
Generic Options | |||
SAMPLE_RATE | integer | 1536K | Sampling rate in Hz (0-20,000,000) |
BANDWIDTH | integer | 0 | Tuner bandwidth in Hz (0-1,000,000), 0 = off |
FREQOFFSET | integer | 0 | Frequency correction in PPM (-150 to +150) |
FORMAT | string | CU8 | Data type for input source |
Specific Options | |||
FILE | string | - | Input file path or "stdin" for standard input |
LOOP | boolean | false | Enable continuous file looping |