Skip to content

A note on device sample rates

AIS-catcher automatically sets an appropriate sample rate depending on your device but provides the option to overwrite this default using the -s switch. For performance reasons, you can decide to use a lower rate or improve the sensitivity by picking a higher rate than the default. The decoding model supports most sample rates above 96K but will internally upsample a signal, if needed, to one of the following rates:

96K, 192K, 288K, 384K, 768K, 1536K, 3072K, 6144K, 12288K 
There is no efficiency advantage of using other rates than in this list apart from limiting the bandwidth and data throughput. Ideally, consider using an option from the list as it avoids upsampling (and additional noise) but it is not required and the model works well with other sampling rates.

In recent versions of AIS-catcher you can use the SOXR or libsamplerate (SRC) library for downsampling. In fact, you can compare the four different downsampling approaches with a command like:

AIS-catcher -r posterholt.raw -m 2 -m 2 -go FP_DS on  -m 2 -go SOXR on -m 2 -go SRC on -b -q -v
which produces:
[AIS engine v0.35 ]:                     41 msgs at 4.1 msg/s
[AIS engine v0.35 FP-DS ]:               41 msgs at 4.1 msg/s
[AIS engine v0.35 SOXR ]:                41 msgs at 4.1 msg/s
[AIS engine v0.35 SRC]:                  41 msgs at 4.1 msg/s
with the following timings:
[AIS engine v0.35 ]:                     320.624 ms
[AIS engine v0.35 FP-DS ]:               254.341 ms
[AIS engine v0.35 SOXR ]:                653.716 ms
[AIS engine v0.35 SRC]:                  3762.6 ms
Some libraries will require significant hardware resources. The advice is to use the native built-in downsampling functionality but it is fun to experiment.

The default downsampler uses a simple but efficient CIC5 filter. To mitigate some of the drawbacks of this method, version 0.39 onwards uses by default a simple droop compensator in the form of a fast 3 tap filter which can be switched off with the switch -go DROOP off. The following results are from my home station running for a few hours with the various methods running in parallel and counting the number of messages:

Downsampler RTL-SDR @ 1536K AirSpy HF+ @ 192K SDRPlay RSPdx @ 3072K
-go DROOP off 94219 16022 16530
-go DROOP on (default) 98176 (+4.20%) 16265 (+1.52%) 17190 (+3.99%)
-go SOXR on (SOX downsampling) 97652 (+3.64%) 16209 (+1.17%) 17049 (+3.14%)

For reference, the command line instruction to test is:

AIS-catcher  -v 10 -gr rtlagc on -m 2 -go droop off -m 2 -m 2 -go soxr on
Please note that the runs are performed on different days over different time spans so this does not represent a comparison of devices but you can compare within a column.