diff --git a/install.sh b/install.sh index 8dbb4ad..6c6bf8d 100755 --- a/install.sh +++ b/install.sh @@ -195,6 +195,15 @@ sudo chmod 777 /var/ramfs set -e success "Install (almost) done!" + +read -rp "Do you want to enable bias-tee? (y/N)" +if [[ $REPLY =~ ^[Yy]$ ]]; then + sed -i -e "s/enable_bias_tee/-T/g" "$HOME/.noaa.conf" + log_done "Bias-tee is enabled!" +else + sed -i -e "s/enable_bias_tee//g" "$HOME/.noaa.conf" +fi + echo " It's time to configure your ground station You'll be asked for your latitude and longitude diff --git a/receive.sh b/receive.sh index 0c9f744..19855b9 100755 --- a/receive.sh +++ b/receive.sh @@ -25,7 +25,7 @@ fi # $6 = Time to capture # $7 = Satellite max elevation -timeout "${6}" /usr/local/bin/rtl_fm -f "${2}"M -s 60k -g 50 -p 55 -E wav -E deemp -F 9 - | /usr/bin/sox -t raw -e signed -c 1 -b 16 -r 60000 - "${NOAA_AUDIO}/audio/${3}.wav" rate 11025 +timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -f "${2}"M -s 60k -g 50 -p 55 -E wav -E deemp -F 9 - | /usr/bin/sox -t raw -e signed -c 1 -b 16 -r 60000 - "${NOAA_AUDIO}/audio/${3}.wav" rate 11025 if [ ! -d "{NOAA_OUTPUT}/image/${FOLDER_DATE}" ]; then mkdir -m 775 -p "${NOAA_OUTPUT}/image/${FOLDER_DATE}" diff --git a/receive_meteor.sh b/receive_meteor.sh index 63d66ef..966813b 100755 --- a/receive_meteor.sh +++ b/receive_meteor.sh @@ -29,7 +29,7 @@ fi # $7 = Satellite max elevation log "Starting rtl_fm record" "INFO" -timeout "${6}" /usr/local/bin/rtl_fm -M raw -f "${2}"M -s 288k -g 48 -p 1 | sox -t raw -r 288k -c 2 -b 16 -e s - -t wav "${METEOR_OUTPUT}/audio/${3}.wav" rate 96k +timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -M raw -f "${2}"M -s 288k -g 48 -p 1 | sox -t raw -r 288k -c 2 -b 16 -e s - -t wav "${METEOR_OUTPUT}/audio/${3}.wav" rate 96k log "Normalization in progress" "INFO" sox "${METEOR_OUTPUT}/audio/${3}.wav" "${METEOR_OUTPUT}/${3}.wav" gain -n diff --git a/templates/noaa.conf b/templates/noaa.conf index e746385..b5095dd 100644 --- a/templates/noaa.conf +++ b/templates/noaa.conf @@ -8,3 +8,4 @@ SUN_MIN_ELEV=10 LOG_LEVEL=DEBUG LAT=change_latitude LON=change_longitude +BIAS_TEE="enable_bias_tee"