Browse Source

receive_meteor: toggle image flip for night passes

tags/v.1.4
Nico Rey 3 years ago
parent
commit
630ad41a99
2 changed files with 11 additions and 3 deletions
  1. +9
    -2
      receive_meteor.sh
  2. +2
    -1
      templates/noaa.conf

+ 9
- 2
receive_meteor.sh View File

@@ -12,6 +12,13 @@ if [ "$SYSTEM_MEMORY" -lt 2000 ]; then
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
PASS_START=$(expr "$5" + 90)
SUN_ELEV=$(python3 "$NOAA_HOME"/sun.py "$PASS_START")
@@ -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" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122" -r 68 -g 68 -b 68 -d
/usr/bin/convert -rotate 180 "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.bmp" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.bmp"
/usr/bin/convert -negate $FLIP "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.bmp" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.bmp"
else
log "I got a successful ${3}.dec file. Creating false color image" "INFO"
medet_arm "${METEOR_OUTPUT}/${3}.dec" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122" -r 65 -g 65 -b 64 -d
@@ -63,7 +70,7 @@ if [ -f "${METEOR_OUTPUT}/${3}.dec" ]; then

log "Rectifying image to adjust aspect ratio" "INFO"
python3 "${NOAA_HOME}/rectify.py" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.bmp"
convert "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified.jpg" -channel rgb -normalize "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified.jpg"
convert "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified.jpg" -channel rgb -normalize -channel rgb -normalize -undercolor black -fill yellow -pointsize 60 -annotate +20+60 "${1} ${START_DATE} Elev: $7°" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified.jpg"
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