From b4bb8134a89bf2d346d7bcfad72c63833d33382a Mon Sep 17 00:00:00 2001 From: Pascal Date: Mon, 8 Feb 2021 23:08:29 +0100 Subject: [PATCH] enabled more detailed samplerate experiments --- receive_meteor.sh | 6 +++--- receive_noaa.sh | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/receive_meteor.sh b/receive_meteor.sh index b539907..5be2ce6 100755 --- a/receive_meteor.sh +++ b/receive_meteor.sh @@ -44,11 +44,11 @@ fi # $6 = Time to capture # $7 = Satellite max elevation -pre_rate=144k +pre_rate=288k log "Starting rtl_fm record for $1 at $2 to $3 at epoch $5" "INFO" -log "timeout \"${6}\" /usr/local/bin/rtl_fm ${BIAS_TEE} -p $PPM_ERROR -M raw -f \"${2}\"M -E dc -s $pre_rate $GAIN | sox -t raw -r $pre_rate -c 2 -b 16 -e s - -t wav \"${RAMFS_AUDIO}/audio/${3}.wav\"" DEBUG -timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -p $PPM_ERROR -M raw -f "${2}"M -E dc -s $pre_rate $GAIN | sox -t raw -r $pre_rate -c 2 -b 16 -e s - -t wav "${RAMFS_AUDIO}/audio/${3}.wav" #rate 96k +log "timeout \"${6}\" /usr/local/bin/rtl_fm ${BIAS_TEE} -p $PPM_ERROR -M raw -f ${2}M -F0 -s $pre_rate $GAIN | sox -t raw -r $pre_rate -c 2 -b 16 -e s - -t wav \"${RAMFS_AUDIO}/audio/${3}.wav\"" DEBUG +timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -p $PPM_ERROR -M raw -f ${2}M -F0 -s $pre_rate $GAIN | sox -t raw -r $pre_rate -c 2 -b 16 -e s - -t wav "${RAMFS_AUDIO}/audio/${3}.wav" #rate 96k [[ $1 == "METEOR-M22" ]] && demod_extra="-m opsk" log "Demodulation in progress (QPSK) $demod_extra" "INFO" diff --git a/receive_noaa.sh b/receive_noaa.sh index 7c647d1..76d965d 100755 --- a/receive_noaa.sh +++ b/receive_noaa.sh @@ -30,9 +30,11 @@ fi # $6 = Time to capture # $7 = Satellite max elevation +pre_samplerate=60k + log "Starting rtl_fm record for $1 at $2 to $3 at epoch $5" "INFO" -log "timeout ${6} /usr/local/bin/rtl_fm ${BIAS_TEE} -f ${2}M -s 60k $GAIN -p $PPM_ERROR -E wav -E deemp -F 9 - | /usr/bin/sox -t raw -e signed -c 1 -b 16 -r 60000 - ${RAMFS_AUDIO}/audio/${3}.wav rate 11025" DEBUG -timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -f "${2}"M -s 60k $GAIN -p $PPM_ERROR -E wav -E deemp -F 9 - | /usr/bin/sox -t raw -e signed -c 1 -b 16 -r 60000 - "${RAMFS_AUDIO}/audio/${3}.wav" rate 11025 +log "timeout ${6} /usr/local/bin/rtl_fm ${BIAS_TEE} -f ${2}M -s$pre_samplerate $GAIN -p $PPM_ERROR -E wav -E deemp -F 0 - | /usr/bin/sox -t raw -e signed -c 1 -b 16 -r $pre_samplerate - ${RAMFS_AUDIO}/audio/${3}.wav rate 11025" DEBUG +timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -f "${2}"M -s$pre_samplerate $GAIN -p $PPM_ERROR -E wav -E deemp -F 0 - | /usr/bin/sox -t raw -e signed -c 1 -b 16 -r $pre_samplerate - "${RAMFS_AUDIO}/audio/${3}.wav" rate 11025 if [ "${SUN_ELEV}" -gt "${SUN_MIN_ELEV}" ]; then ENHANCEMENTS="ZA MCIR MCIR-precip MSA MSA-precip HVC-precip HVCT-precip HVC HVCT" @@ -52,7 +54,10 @@ for i in $ENHANCEMENTS; do done log "Building noaa-apt maps" DEBUG +curpath=$(pwd) # needed for faulty noaa-apt arm version +cd /usr/bin noaa-apt "${RAMFS_AUDIO}/audio/${3}.wav" -R auto -m yes -o "${NOAA_OUTPUT}/images/${3}-noaa-apt.png" +cd $curpath /usr/bin/convert -quality 98 -format jpg "${NOAA_OUTPUT}/images/${3}-noaa-apt.png" -undercolor black -fill yellow -pointsize 18 -annotate +20+20 "${1} $i ${START_DATE} Elev: $7°" "${NOAA_OUTPUT}/images/${3}-noaa-apt.jpg" /usr/bin/convert -thumbnail 300 "${NOAA_OUTPUT}/images/${3}-noaa-apt.jpg" "${NOAA_OUTPUT}/images/thumb/${3}-noaa-apt.jpg" @@ -83,5 +88,5 @@ if [ "$DELETE_AUDIO" = true ]; then rm "${RAMFS_AUDIO}/audio/${3}.wav" else log "Moving audio files out to the SD card" "INFO" - mv "${RAMFS_AUDIO}/audio/${3}.wav" "${NOAA_OUTPUT}/audio/${3}.wav" + mv "${RAMFS_AUDIO}/audio/${3}.wav" "${NOAA_OUTPUT}/audio/${3}_${pre_samplerate}_${7}.wav" fi