From bc5d63d8be1f6c09ea2b300d91348a4e20401659 Mon Sep 17 00:00:00 2001 From: Pascal Date: Sun, 31 Jan 2021 13:12:21 +0000 Subject: [PATCH] added ppm error config --- receive.sh | 10 ++++++++-- receive_meteor.sh | 2 +- test_reception.sh | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/receive.sh b/receive.sh index 76cee35..c04bd1d 100755 --- a/receive.sh +++ b/receive.sh @@ -31,7 +31,7 @@ fi # $7 = Satellite max elevation log "Starting rtl_fm record" "INFO" -timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -f "${2}"M -s 60k $GAIN -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 +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 if [ "${SUN_ELEV}" -gt "${SUN_MIN_ELEV}" ]; then ENHANCEMENTS="ZA MCIR MCIR-precip MSA MSA-precip HVC-precip HVCT-precip HVC HVCT" @@ -41,7 +41,7 @@ else daylight="false" fi -log "Bulding pass map" "INFO" +log "Bulding pass map wxtoimg " "INFO" /usr/local/bin/wxmap -T "${1}" -H "${4}" -p 0 -l 0 -o "${PASS_START}" "${NOAA_HOME}/map/${3}-map.png" for i in $ENHANCEMENTS; do log "Decoding image" "INFO" @@ -50,6 +50,12 @@ for i in $ENHANCEMENTS; do /usr/bin/convert -thumbnail 300 "${NOAA_OUTPUT}/images/${3}-$i.jpg" "${NOAA_OUTPUT}/images/thumb/${3}-$i.jpg" done +log "Building noaa-apt maps" +noaa-apt "${RAMFS_AUDIO}/audio/${3}.wav" -R auto -m yes -o "${NOAA_OUTPUT}/images/${3}-noaa-apt.png" +/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" + + rm "${NOAA_HOME}/map/${3}-map.png" if [ "${SUN_ELEV}" -gt "${SUN_MIN_ELEV}" ]; then diff --git a/receive_meteor.sh b/receive_meteor.sh index 029b860..b892639 100755 --- a/receive_meteor.sh +++ b/receive_meteor.sh @@ -43,7 +43,7 @@ fi # $7 = Satellite max elevation log "Starting rtl_fm record" "INFO" -timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -M raw -f "${2}"M -s 288k $GAIN | sox -t raw -r 288k -c 2 -b 16 -e s - -t wav "${RAMFS_AUDIO}/audio/${3}.wav" rate 96k +timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -p $PPM_ERROR -M raw -f "${2}"M -s 288k $GAIN | sox -t raw -r 288k -c 2 -b 16 -e s - -t wav "${RAMFS_AUDIO}/audio/${3}.wav" rate 96k log "Demodulation in progress (QPSK)" "INFO" [ $1 = "METEOR-M2 2"] && demod_extra="-m opsk" diff --git a/test_reception.sh b/test_reception.sh index fbd59f2..594f79f 100755 --- a/test_reception.sh +++ b/test_reception.sh @@ -40,6 +40,7 @@ echo "$(tput setaf 2) $(tput sgr0) " -rtl_fm ${BIAS_TEE} -f "$1M" -s 256k -g 48 -p 55 -E deemp -F 9 - \ +echo "rtl_fm ${BIAS_TEE} -f "$1M" -s 256k $GAIN -p $PPM_ERROR -E deemp -F 9 -" +rtl_fm ${BIAS_TEE} -f "$1M" -s 256k $GAIN -p $PPM_ERROR -E deemp -F 9 - \ | sox -traw -r256k -es -b16 -c1 -V1 - -tmp3 - \ | socat -u - TCP-LISTEN:8073 1>/dev/null