|
@@ -25,14 +25,24 @@ echo "=> Converting to PD120 Format <long>x496"
|
|
|
convert /ramfs/$IMG -resize 660x496^ /ramfs/lit-$IMG
|
|
|
rm -rf /ramfs/$IMG
|
|
|
echo "=> Adding annotaion"
|
|
|
-mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+10 " Ballon Stratosphérique ENSIL - F4KMH " /ramfs/lit-$IMG
|
|
|
+mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+10 " Ballon Planète-Sciences - F4KLN-AM " /ramfs/lit-$IMG
|
|
|
mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+50 " $(date "+%a %d %b %y - %X")" /ramfs/lit-$IMG
|
|
|
|
|
|
echo "=> Adding GPS Position"
|
|
|
-GPS_POS=$(exiftool /home/pi/_Pictures/$IMG | grep "GPS Position" | cut -d":" -f2)
|
|
|
-ALTITUDE=$(exiftool /home/pi/_Pictures/$IMG | grep "GPS Altitude" | cut -d":" -f2)
|
|
|
-mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+410 "Altitude : $ALTITUDE" /ramfs/lit-$IMG
|
|
|
-mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+450 "$GPS_POS" /ramfs/lit-$IMG
|
|
|
+
|
|
|
+# On cherche à voir si on a la position GPS ou non dans le exif
|
|
|
+exiftool /home/pi/_Pictures/$IMG | grep -e "GPS Position" -e "GPS Altitude"
|
|
|
+if $? -eq 0; then
|
|
|
+ GPS_POS=$(exiftool /home/pi/_Pictures/$IMG | grep "GPS Position" | cut -d":" -f2)
|
|
|
+ ALTITUDE=$(exiftool /home/pi/_Pictures/$IMG | grep "GPS Altitude" | cut -d":" -f2)
|
|
|
+ mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+410 "Altitude : $ALTITUDE" /ramfs/lit-$IMG
|
|
|
+ mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+450 "$GPS_POS" /ramfs/lit-$IMG
|
|
|
+else
|
|
|
+ mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+410 "Altitude : Unknown" /ramfs/lit-$IMG
|
|
|
+ mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+450 "NO GPS." /ramfs/lit-$IMG
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
|
|
|
echo " => Converting image to WAV..."
|
|
|
cd ~/PySSTV/
|
|
@@ -42,7 +52,7 @@ deactivate
|
|
|
echo "=> Setting flag that can be Tx"
|
|
|
touch /ramfs/.canbetx
|
|
|
|
|
|
-rm -rf /ramfs/lit-$IMG
|
|
|
+#rm -rf /ramfs/lit-$IMG
|
|
|
|
|
|
echo -n ""
|
|
|
|