Skip to content

Commit 98b6b89

Browse files
dirkhhfredclausen
authored andcommitted
enable Airspy sample rate multiplier
This has been tested with an Airspy mini. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
1 parent 3e674db commit 98b6b89

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

rootfs/etc/s6-overlay/scripts/acarsdec

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,16 @@ elif [[ "${MODE}" == @(A|a) ]]; then
3838
ACARS_CMD+=("--output" "native:udp:host=127.0.0.1,port=5550")
3939
fi
4040

41+
SAMPLERATEMULTIPLIER=${RTLMULT}
4142
# loop through the SOAPYSDR string and split on spaces
4243
if [[ -n "${SOAPYSDR}" ]]; then
4344
IFS=' ' read -ra SOAPYSDR_PROCESSED <<< "${SOAPYSDR}"
4445
# ACARS_CMD+=("${SOAPYSDR_PROCESSED[@]}") # used for acarsdec < 4.0
4546
ACARS_CMD+=("--soapysdr" "${SOAPYSDR_PROCESSED[@]}")
47+
if [[ ${SOAPYSDR} == *"airspy"* ]]; then
48+
# airspy runs at 3MSPS so needs a different sample rate multiplier
49+
SAMPLERATEMULTIPLIER="240"
50+
fi
4651
fi
4752

4853
if [ -n "${PPM}" ]; then
@@ -59,8 +64,8 @@ if [[ -n "$ACARSDEC_COMMAND_EXTRA" ]]; then
5964
ACARS_CMD+=("$ACARSDEC_COMMAND_EXTRA")
6065
fi
6166

62-
if [ -n "${RTLMULT}" ]; then
63-
ACARS_CMD+=("-m" "$RTLMULT")
67+
if [ -n "${SAMPLERATEMULTIPLIER}" ]; then
68+
ACARS_CMD+=("-m" "$SAMPLERATEMULTIPLIER")
6469
fi
6570

6671
# shellcheck disable=SC2206

0 commit comments

Comments
 (0)