|
@@ -54,23 +54,29 @@ if [ -f "${METEOR_OUTPUT}/${3}.dec" ]; then |
|
|
|
|
|
|
|
|
if [ "${SUN_ELEV}" -lt "${SUN_MIN_ELEV}" ]; then |
|
|
if [ "${SUN_ELEV}" -lt "${SUN_MIN_ELEV}" ]; then |
|
|
log "I got a successful ${3}.dec file. Decoding APID 68" "INFO" |
|
|
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" |
|
|
|
|
|
|
|
|
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" |
|
|
else |
|
|
else |
|
|
log "I got a successful ${3}.dec file. Creating false color image" "INFO" |
|
|
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 |
|
|
|
|
|
|
|
|
medet_arm "${METEOR_OUTPUT}/${3}.dec" "${METEOR_OUTPUT}/${3}-122" -r 65 -g 65 -b 64 -d |
|
|
|
|
|
convert "${METEOR_OUTPUT}/${3}-122.bmp" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.png" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
log "Rectifying image to adjust aspect ratio" "INFO" |
|
|
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" |
|
|
|
|
|
rm "${METEOR_OUTPUT}/${3}.bmp" |
|
|
|
|
|
rm "${METEOR_OUTPUT}/${3}-122.bmp" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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" |
|
|
if [ -n "$CONSUMER_KEY" ]; then |
|
|
if [ -n "$CONSUMER_KEY" ]; then |
|
|
log "Posting to Twitter" "INFO" |
|
|
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.jpg" |
|
|
|
|
|
|
|
|
python3 "${NOAA_HOME}/post.py" "$1 ${START_DATE}" "$7°" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified-text.png" |
|
|
fi |
|
|
fi |
|
|
|
|
|
rm "${METEOR_OUTPUT}/${3}.bmp" |
|
|
|
|
|
rm "${METEOR_OUTPUT}/${3}-122.bmp" |
|
|
|
|
|
rm "${METEOR_OUTPUT}/${3}-122.png" |
|
|
|
|
|
rm "${METEOR_OUTPUT}/${3}.dec" |
|
|
|
|
|
rm "${METEOR_OUTPUT}/${3}-122.png" |
|
|
|
|
|
rm "${METEOR_OUTPUT}/${3}-122-rectified.png" |
|
|
|
|
|
rm "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122.png" |
|
|
|
|
|
rm "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified.png" |
|
|
|
|
|
#rm "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-122-rectified-text.png" |
|
|
else |
|
|
else |
|
|
log "Decoding failed, either a bad pass/low SNR or a software problem" "ERROR" |
|
|
log "Decoding failed, either a bad pass/low SNR or a software problem" "ERROR" |
|
|
fi |
|
|
fi |