From 4a19066ab8292bc0f38341ea5574e549ffe2be32 Mon Sep 17 00:00:00 2001 From: Pascal Date: Sun, 31 Jan 2021 22:07:13 +0100 Subject: [PATCH] added ppm-error config template --- common.sh | 4 ++-- schedule_meteor.sh | 2 +- schedule_sat.sh | 4 ++++ templates/noaa.conf | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/common.sh b/common.sh index 299f720..ae4cd42 100755 --- a/common.sh +++ b/common.sh @@ -1,4 +1,4 @@ -#!/bin/bash +##!/bin/bash ## debug # set -x @@ -21,7 +21,7 @@ log() { #log here echo "${log_priority} : ${log_message}" - echo $(date '+%d-%m-%Y %H:%M') "${log_priority} : ${log_message}" >> /var/log/noaa.log + echo $(date '+%d-%m-%Y %H:%M') $0 "${log_priority} : ${log_message}" >> /var/log/noaa.log } ## current date and folder structure diff --git a/schedule_meteor.sh b/schedule_meteor.sh index 67ca712..0b24917 100755 --- a/schedule_meteor.sh +++ b/schedule_meteor.sh @@ -18,7 +18,7 @@ var2=$(echo "${PREDICTION_END}" | cut -d " " -f 1) MAXELEV=$(predict -t "${NOAA_HOME}"/predict/weather.tle -p "${1}" | awk -v max=0 '{if($5>max){max=$5}}END{print max}') while [ "$(date --date="@${var2}" +%D)" = "$(date +%D)" ]; do - log "Pass prediction in progress" "INFO" + log "Pass prediction for $1 in progress" "INFO" START_TIME=$(echo "$PREDICTION_START" | cut -d " " -f 3-4) var1=$(echo "$PREDICTION_START" | cut -d " " -f 1) var3=$(echo "$START_TIME" | cut -d " " -f 2 | cut -d ":" -f 3) diff --git a/schedule_sat.sh b/schedule_sat.sh index c02ce9b..5c208ae 100755 --- a/schedule_sat.sh +++ b/schedule_sat.sh @@ -25,6 +25,8 @@ var2=$(echo "${PREDICTION_END}" | cut -d " " -f 1) MAXELEV=$(predict -t "${NOAA_HOME}"/predict/weather.tle -p "${1}" | awk -v max=0 '{if($5>max){max=$5}}END{print max}') +log "Looking for passes of $1" INFO + while [ "$(date --date="@${var2}" +%D)" = "$(date +%D)" ]; do START_TIME=$(echo "$PREDICTION_START" | cut -d " " -f 3-4) var1=$(echo "$PREDICTION_START" | cut -d " " -f 1) @@ -38,6 +40,8 @@ while [ "$(date --date="@${var2}" +%D)" = "$(date +%D)" ]; do echo "${NOAA_HOME}/receive.sh \"${1}\" $2 ${SATNAME}${OUTDATE} "${NOAA_HOME}"/predict/weather.tle \ ${var1} ${TIMER} ${MAXELEV}" | at "$(date --date="TZ=\"UTC\" ${START_TIME}" +"%H:%M %D")" sqlite3 $HOME/raspberry-noaa/panel.db "insert or replace into predict_passes (sat_name,pass_start,pass_end,max_elev,is_active) values (\"$SATNAME\",$var1,$var2,$MAXELEV, 1);" + else + log "Max. elevation ${MAXELEV} too small for configured ${SAT_MIN_ELEV}" DEBUG fi NEXTPREDICT=$(expr "${var2}" + 60) PREDICTION_START=$(predict -t "${NOAA_HOME}"/predict/weather.tle -p "${1}" "${NEXTPREDICT}" | head -1) diff --git a/templates/noaa.conf b/templates/noaa.conf index 9cd7183..5d1d539 100644 --- a/templates/noaa.conf +++ b/templates/noaa.conf @@ -11,5 +11,6 @@ LON=change_longitude BIAS_TEE="enable_bias_tee" DELETE_AUDIO="true" FLIP_METEOR_IMG="true" -GAIN="-g 50" +GAIN="-g 50" #leave out for auto-gain +PPM_ERROR=0 SCHEDULE_ISS="false"