|
@@ -6,8 +6,8 @@
|
|
|
source ~/BallonSonde/variables.sh
|
|
source ~/BallonSonde/variables.sh
|
|
|
|
|
|
|
|
while [[ ! -f /ramfs/.canbeconvert ]]; do
|
|
while [[ ! -f /ramfs/.canbeconvert ]]; do
|
|
|
- sleep 1
|
|
|
|
|
- echo "wait for file to convert..."
|
|
|
|
|
|
|
+ sleep 1
|
|
|
|
|
+ echo "wait for file to convert..."
|
|
|
done
|
|
done
|
|
|
|
|
|
|
|
IMG=$(cat /ramfs/.canbeconvert)
|
|
IMG=$(cat /ramfs/.canbeconvert)
|
|
@@ -16,8 +16,8 @@ echo "=> File $IMG detected !"
|
|
|
#############
|
|
#############
|
|
|
# Mode SSTV
|
|
# Mode SSTV
|
|
|
while [[ -f "/ramfs/totx.wav" ]]; do
|
|
while [[ -f "/ramfs/totx.wav" ]]; do
|
|
|
- echo "=> Skipping convert, because old one is not yet Txed !"
|
|
|
|
|
- sleep 5
|
|
|
|
|
|
|
+ echo "=> Skipping convert, because old one is not yet Txed !"
|
|
|
|
|
+ sleep 5
|
|
|
done
|
|
done
|
|
|
|
|
|
|
|
# On traite l'image...
|
|
# On traite l'image...
|
|
@@ -30,24 +30,29 @@ echo "=> Adding annotaion"
|
|
|
mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+10 $SSTV_BANNER /ramfs/lit-$IMG
|
|
mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+10 $SSTV_BANNER /ramfs/lit-$IMG
|
|
|
mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+50 " $(date -u --date=@$(date "+%s"))" /ramfs/lit-$IMG
|
|
mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+50 " $(date -u --date=@$(date "+%s"))" /ramfs/lit-$IMG
|
|
|
|
|
|
|
|
-echo "=> Adding GPS Position"
|
|
|
|
|
|
|
|
|
|
-# On cherche à voir si on a la position GPS ou non dans le exif
|
|
|
|
|
-exiftool ~/_Pictures/$IMG | grep -e "GPS Position" -e "GPS Altitude"
|
|
|
|
|
-echo $?
|
|
|
|
|
-if [ $? -eq 0 ]
|
|
|
|
|
|
|
+if [[ $HAVE_GPS = 1 ]]
|
|
|
then
|
|
then
|
|
|
- GPS_POS=$(exiftool ~/_Pictures/$IMG | grep "GPS Position" | cut -d":" -f2)
|
|
|
|
|
- ALTITUDE=$(exiftool ~/_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
|
|
|
|
|
|
|
+ echo "=> Adding GPS Position"
|
|
|
|
|
+
|
|
|
|
|
+ # On cherche à voir si on a la position GPS ou non dans le exif
|
|
|
|
|
+ exiftool ~/_Pictures/$IMG | grep -e "GPS Position" -e "GPS Altitude"
|
|
|
|
|
+ echo $?
|
|
|
|
|
+ if [ $? -eq 0 ]
|
|
|
|
|
+ then
|
|
|
|
|
+ GPS_POS=$(exiftool ~/_Pictures/$IMG | grep "GPS Position" | cut -d":" -f2)
|
|
|
|
|
+ ALTITUDE=$(exiftool ~/_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
|
|
|
|
|
+else
|
|
|
|
|
+ echo "=> HAVE_GPS = 0, add nothing"
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
-
|
|
|
|
|
echo " => Converting image to WAV..."
|
|
echo " => Converting image to WAV..."
|
|
|
cd ~/PySSTV/
|
|
cd ~/PySSTV/
|
|
|
source bin/activate
|
|
source bin/activate
|