Browse Source

toggle image flip for meteor night passes

tags/v.1.4
Nico Rey 4 years ago
parent
commit
b0d4afd73c
3 changed files with 14 additions and 6 deletions
  1. +1
    -1
      install.sh
  2. +11
    -4
      receive_meteor.sh
  3. +2
    -1
      templates/noaa.conf

+ 1
- 1
install.sh View File

@@ -227,7 +227,7 @@ read -rp "Enter your timezone (Ex: -3 for Argentina time): "
sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/${lon}/g" "$HOME/.noaa.conf"
sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/${lon}/g" "$HOME/.wxtoimgrc"
sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/$(echo "$lon * -1" | bc)/g" "$HOME/.predict/predict.qth"
sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/${lon}/g;s/change_tz/$(echo "$timezone * -1" | bc)/g" "sun.py"
sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/${lon}/g;s/change_tz/${timezone}/g" "sun.py"

# Running WXTOIMG to have the user accept the licensing agreement
wxtoimg


+ 11
- 4
receive_meteor.sh View File

@@ -9,7 +9,14 @@
SYSTEM_MEMORY=$(free -m | awk '/^Mem:/{print $2}')
if [ "$SYSTEM_MEMORY" -lt 2000 ]; then
log "The system doesn't have enough space to store a Meteor pass on RAM" "INFO"
RAMFS_AUDIO="${METEOR_OUTPUT}"
RAMFS_AUDIO="${METEOR_OUTPUT}"
fi

if [ "$FLIP_METEOR_IMG" == "true" ]; then
log "I'll flip this image pass because FLIP_METEOR_IMG is set to true" "INFO"
FLIP="-rotate 180"
else
FLIP=""
fi

## pass start timestamp and sun elevation
@@ -55,7 +62,7 @@ if [ -f "${METEOR_OUTPUT}/${3}.dec" ]; then
if [ "${SUN_ELEV}" -lt "${SUN_MIN_ELEV}" ]; then
log "I got a successful ${3}.dec file. Decoding APID 68" "INFO"
medet_arm "${METEOR_OUTPUT}/${3}.dec" "${METEOR_OUTPUT}/${3}-122" -r 68 -g 68 -b 68 -d
convert "${METEOR_OUTPUT}/${3}-122.bmp" -channel RGB -negate "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.png"
convert "${METEOR_OUTPUT}/${3}-122.bmp" -channel RGB -negate $FLIP "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.png"
else
log "I got a successful ${3}.dec file. Creating false color image" "INFO"
medet_arm "${METEOR_OUTPUT}/${3}.dec" "${METEOR_OUTPUT}/${3}-122" -r 65 -g 65 -b 64 -d
@@ -63,10 +70,10 @@ if [ -f "${METEOR_OUTPUT}/${3}.dec" ]; then
fi
log "Rectifying image to adjust aspect ratio" "INFO"
python3 "${NOAA_HOME}/rectify.py" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.png"
convert "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified.png" -undercolor black -fill yellow -pointsize 18 -annotate +20+20 "${1} ${START_DATE} Elevation: $7°" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified-text.png"
convert "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified.png" -undercolor black -fill yellow -pointsize 18 -annotate +20+20 "${1} ${START_DATE} Elevacion: $7°" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified-text.png"
if [ -n "$CONSUMER_KEY" ]; then
log "Posting to Twitter" "INFO"
python3 "${NOAA_HOME}/post.py" "$1 EXPERIMENTAL ${START_DATE} Resolución completa: http://weather.reyni.co/image/${FOLDER_DATE}/${3}-122-rectified.jpg" "$7°" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified.png"
python3 "${NOAA_HOME}/post.py" "$1 EXPERIMENTAL ${START_DATE} Resolución completa: http://weather.reyni.co/image/${FOLDER_DATE}/${3}-122-rectified-text.jpg" "$7°" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified-text.png"
fi
rm "${METEOR_OUTPUT}/${3}.bmp"
rm "${METEOR_OUTPUT}/${3}-122.bmp"


+ 2
- 1
templates/noaa.conf View File

@@ -9,4 +9,5 @@ LOG_LEVEL=DEBUG
LAT=change_latitude
LON=change_longitude
BIAS_TEE="enable_bias_tee"
DELETE_AUDIO=true
DELETE_AUDIO="true"
FLIP_METEOR_IMG="true"

Loading…
Cancel
Save