ソースを参照

Maybe this removes a failed meteor pass

pull/131/head
Pascal 3年前
コミット
c494767a06
1個のファイルの変更6行の追加4行の削除
  1. +6
    -4
      receive_meteor.sh

+ 6
- 4
receive_meteor.sh ファイルの表示

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash

### Run as a normal user
if [ $EUID -eq 0 ]; then
@@ -43,10 +43,11 @@ fi
# $7 = Satellite max elevation

log "Starting rtl_fm record" "INFO"
log "timeout \"${6}\" /usr/local/bin/rtl_fm ${BIAS_TEE} -p $PPM_ERROR -M raw -f \"${2}\"M -s 144k $GAIN | sox -t raw -r 144k -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 -s 144k $GAIN | sox -t raw -r 144k -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"
log "Demodulation in progress (QPSK) $demod_extra" "INFO"
meteor_demod $demod_extra -B -o "${METEOR_OUTPUT}/${3}.qpsk" "${RAMFS_AUDIO}/audio/${3}.wav" 2>> $NOAA_LOG

if [ "$DELETE_AUDIO" = true ]; then
@@ -86,12 +87,13 @@ if [ -f "${METEOR_OUTPUT}/${3}.dec" ]; then

sqlite3 $HOME/raspberry-noaa/panel.db "insert into decoded_passes (pass_start, file_path, daylight_pass, sat_type) values ($5,\"$3\", 1,0);"
pass_id=$(sqlite3 $HOME/raspberry-noaa/panel.db "select id from decoded_passes order by id desc limit 1;")
sqlite3 $HOME/raspberry-noaa/panel.db "update predict_passes set is_active = 0 where (predict_passes.pass_start) in (select predict_passes.pass_start from predict_passes inner join decoded_passes on predict_passes.pass_start = decoded_passes.pass_start where decoded_passes.id = $pass_id);"

if [ -n "$CONSUMER_KEY" ]; then
log "Posting to Twitter" "INFO"
python3 "${NOAA_HOME}/post.py" "$1 ${START_DATE} Resolución completa: https://weather.reyni.co/detail.php?id=$pass_id" "$7" "${NOAA_OUTPUT}/images/${3}-122-rectified.jpg"
fi
else
log "Decoding failed, either a bad pass/low SNR or a software problem" "ERROR"
sqlite3 $HOME/raspberry-noaa/panel.db "update predict_passes set is_active = 0 where predict_passes.pass_start = $5);"
fi

sqlite3 $HOME/raspberry-noaa/panel.db "update predict_passes set is_active = 0 where (predict_passes.pass_start) in (select predict_passes.pass_start from predict_passes inner join decoded_passes on predict_passes.pass_start = decoded_passes.pass_start where decoded_passes.id = $pass_id);"

読み込み中…
キャンセル
保存