瀏覽代碼

enh for peyrat le chateau

Pierre Bourdin 9 月之前
父節點
當前提交
42a2087762
共有 17 個文件被更改,包括 47 次插入7 次删除
  1. 0 1
      acquisition_process/1_capture
  2. 16 6
      convert_process/2_convert
  3. 二進制
      mire.jpg
  4. 二進制
      sound/annonce_start (1).wav
  5. 二進制
      sound/annonce_start.mp3
  6. 二進制
      sound/annonce_start.wav
  7. 二進制
      sound/annonce_stop (1).wav
  8. 二進制
      sound/annonce_stop.mp3
  9. 二進制
      sound/annonce_stop.wav
  10. 二進制
      sound/mire.wav
  11. 二進制
      sound/old2_annonce_start.wav
  12. 二進制
      sound/old2_annonce_stop.wav
  13. 2 0
      tx_process/3_transmit
  14. 19 0
      tx_process/4_tx_file
  15. 二進制
      tx_process/filename.wav
  16. 二進制
      tx_process/out.wav
  17. 10 0
      tx_process/qpsk31

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

二進制
mire.jpg


二進制
sound/annonce_start (1).wav


二進制
sound/annonce_start.mp3


二進制
sound/annonce_start.wav


二進制
sound/annonce_stop (1).wav


二進制
sound/annonce_stop.mp3


二進制
sound/annonce_stop.wav


二進制
sound/mire.wav


二進制
sound/old2_annonce_start.wav


二進制
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

二進制
tx_process/filename.wav


二進制
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