Переглянути джерело

enh for peyrat le chateau

Pierre Bourdin 9 місяців тому
батько
коміт
42a2087762

+ 0 - 1
acquisition_process/1_capture

@@ -55,4 +55,3 @@ echo "Picz $DATE.jpg saved to SDCARD"
 
 echo "$DATE.jpg" > /ramfs/.canbeconvert
 echo "Sleeping... zzzZZZzzZZZzzz..."
-sleep 60

+ 16 - 6
convert_process/2_convert

@@ -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 ""
 


BIN
sound/annonce_start (1).wav


BIN
sound/annonce_start.mp3


BIN
sound/annonce_start.wav


BIN
sound/annonce_stop (1).wav


BIN
sound/annonce_stop.mp3


BIN
sound/annonce_stop.wav


BIN
sound/mire.wav


BIN
sound/old2_annonce_start.wav


BIN
sound/old2_annonce_stop.wav


+ 2 - 0
tx_process/3_transmit

@@ -37,3 +37,5 @@ if [[ -f /ramfs/out.wav ]]; then
 	echo " => All done, cleaning ramfs"
 	rm -rf /ramfs/out.wav
 fi
+
+/home/pi/BallonSonde/tx_process/qpsk31

+ 19 - 0
tx_process/4_tx_file

@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Utile pour couper le TX quand on ctrl+c et que le script n'abouti pas
+trap ctrl_c INT
+function ctrl_c() {
+    echo "Ctrl + C happened"
+    raspi-gpio set 4 dh
+    rm -rf /ramfs/*
+}
+
+# Setup the GPIO4 as output for Tx
+raspi-gpio set 4 op && raspi-gpio set 4 dh
+
+raspi-gpio set 4 dl
+sleep 1
+echo " => Playing WAV file"
+sleep 1
+aplay $1
+raspi-gpio set 4 dh

BIN
tx_process/filename.wav


BIN
tx_process/out.wav


+ 10 - 0
tx_process/qpsk31

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PSK="/home/pi/PSK31-Modulation-WAV-Generator/psk"
+
+GPS=$(/home/pi/BallonSonde/read_nmea.py)
+
+DATA="This is the EasterEGG ! We are actually located at : "$GPS" Please feedback something to me at f4iyq@pi3rrot.net ! <3 Peace !"
+
+$PSK -m qpsk -s 250 -f ~/BallonSonde/tx_process/filename.wav -t "$DATA"
+~/BallonSonde/tx_process/4_tx_file ~/BallonSonde/tx_process/filename.wav