Quellcode durchsuchen

Fete de la sciencec 2024

Pierre Bourdin vor 2 Monaten
Ursprung
Commit
7f767e3a8d

+ 6 - 2
acquisition_process/1_capture

@@ -51,12 +51,17 @@ else
 fi
 
 echo "Picz $DATE.jpg saved in RAM"
-mv /ramfs/$DATE.jpg ~/_Pictures
+cp /ramfs/$DATE.jpg ~/_Pictures
+mv /ramfs/$DATE.jpg /ramfs/$DATE.jp_
+rm -rf /ramfs/*.jpg
+mv /ramfs/$DATE.jp_ /ramfs/$DATE.jpg
+
 echo "Picz $DATE.jpg saved to SDCARD"
 
 echo "$DATE.jpg" > /ramfs/.canbeconvert
 echo "Sleeping... zzzZZZzzZZZzzz..."
 
+sleep 5
 }
 
 
@@ -68,4 +73,3 @@ else
   echo "Command failed"
   /home/pi/BallonSonde/tx_process/4_tx_file /home/pi/BallonSonde/sound/error_camera.wav
 fi
-

+ 3 - 3
convert_process/2_convert

@@ -25,8 +25,8 @@ 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 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
+mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+10 "https://f4koa.fr - Ballon Planète-Sciences - F4KOA-AM " /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"
 
@@ -52,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/2024_aubusson/1_presentation.wav


BIN
sound/2024_aubusson/2_tx_qpsk.wav


BIN
sound/2024_aubusson/2_tx_sstv.wav


BIN
sound/2024_aubusson/3_tx_cw.wav


BIN
sound/2024_aubusson/9_stop_en.wav


BIN
sound/2024_aubusson/9_stop_fr.wav


+ 1 - 0
sysconfig/alsa/conf.d/10-rate-lav.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/10-rate-lav.conf

+ 1 - 0
sysconfig/alsa/conf.d/10-samplerate.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/10-samplerate.conf

+ 1 - 0
sysconfig/alsa/conf.d/10-speexrate.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/10-speexrate.conf

+ 1 - 0
sysconfig/alsa/conf.d/50-arcam-av-ctl.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/50-arcam-av-ctl.conf

+ 1 - 0
sysconfig/alsa/conf.d/50-jack.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/50-jack.conf

+ 1 - 0
sysconfig/alsa/conf.d/50-oss.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/50-oss.conf

+ 1 - 0
sysconfig/alsa/conf.d/50-pulseaudio.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/50-pulseaudio.conf

+ 1 - 0
sysconfig/alsa/conf.d/60-a52-encoder.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/60-a52-encoder.conf

+ 1 - 0
sysconfig/alsa/conf.d/60-upmix.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/60-upmix.conf

+ 1 - 0
sysconfig/alsa/conf.d/60-vdownmix.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/60-vdownmix.conf

+ 1 - 0
sysconfig/alsa/conf.d/98-usb-stream.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/98-usb-stream.conf

+ 1 - 0
sysconfig/alsa/conf.d/99-pulse.conf

@@ -0,0 +1 @@
+/usr/share/alsa/alsa.conf.d/pulse.conf

+ 13 - 0
sysconfig/alsa/conf.d/99-pulseaudio-default.conf.example

@@ -0,0 +1,13 @@
+# Default to PulseAudio
+
+pcm.!default {
+    type pulse
+    hint {
+        show on
+        description "Default ALSA Output (currently PulseAudio Sound Server)"
+    }
+}
+
+ctl.!default {
+    type pulse
+}

+ 21 - 4
tx_process/3_transmit

@@ -27,10 +27,28 @@ echo " => Playing WAV file"
 cd ~/trxamadrmv3_7/linux
 ./txwfal 0
 sleep 1
-aplay ~/BallonSonde/sound/annonce_start.wav
+aplay ~/BallonSonde/sound/2024_aubusson/1_presentation.wav
 sleep 1
-aplay /ramfs/out.wav
-aplay ~/BallonSonde/sound/annonce_stop.wav
+aplay ~/BallonSonde/sound/2024_aubusson/2_tx_sstv.wav
+ionice -c 2 -n 0 aplay /ramfs/out.wav
+
+sleep 1
+
+aplay ~/BallonSonde/sound/2024_aubusson/2_tx_qpsk.wav
+# Generate the wav file to Tx
+/home/pi/BallonSonde/tx_process/qpsk31
+# Tx the wav file !
+aplay /ramfs/psk.wav
+
+aplay ~/BallonSonde/sound/2024_aubusson/3_tx_cw.wav
+echo "F4KOA-AM F4KOA-AM from France" | /usr/local/bin/cwwav -f 700 -w 20 -o /ramfs/cw.wav
+aplay /ramfs/cw.wav; rm /ramfs/cw.wav
+/home/pi/BallonSonde/read_nmea.py | awk '{print $10$3$4$5$6}' | sed -e "s/,/ /g" | sed -e "s/ NS=//g" | sed -e "s/ EW=//g" | sed -e "s/=/ /g" | /usr/local/bin/cwwav -f 700 -w 20 -o /ramfs/cw.wav
+# alt 311.7 lat 46.0154466667N lon 1.0988666667E for example...
+aplay /ramfs/cw.wav; rm /ramfs/cw.wav
+
+aplay ~/BallonSonde/sound/2024_aubusson/9_stop_en.wav
+aplay ~/BallonSonde/sound/2024_aubusson/9_stop_fr.wav
 raspi-gpio set 4 dh
 
 if [[ -f /ramfs/out.wav ]]; then
@@ -38,4 +56,3 @@ if [[ -f /ramfs/out.wav ]]; then
 	rm -rf /ramfs/out.wav
 fi
 
-/home/pi/BallonSonde/tx_process/qpsk31

+ 0 - 19
tx_process/4_tx_file

@@ -1,19 +0,0 @@
-#!/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


+ 6 - 17
tx_process/qpsk31

@@ -5,31 +5,20 @@ GPS=$(/home/pi/BallonSonde/read_nmea.py)
 
 DATA="
 -=-=-=-=-=-=-=-=-=-=-=-=-=
-F4KLN-AM F4KLN-AM
-This is the EasterEGG !
-EasterComputer say that we are approximatively here :
+F4KOA-AM F4KOA-AM
+Computer say that we are approximatively here :
 "$GPS"
 "
 DATA=$DATA$(cat /home/pi/BallonSonde/tx_process/easter$((1 + $RANDOM % 5)))
 
 DATA=$DATA"
-From France, launched near Peyrat-le-Chateau.
+From France, launched near Aubusson
 
-Send feedback or something else to me at f4iyq at pi3rrot.net !
-
-Want more ?
-
-Content-Transfer-Encoding: base64
-Q29uZ3JhdHMgZHVkZSAhIExldCdzIHRhbGsgYWJvdXQgbGlmZSwgdGhlIHVuaXZlcnNlIGFuZCB0
-aGUgcmVzdCBhdCBmNGl5cUBwaTNycm90Lm5ldC4gVGVsbCBtZSB0aGUgdW5pdmVyc2FsIGFuc3dl
-ciA7KSBPbmUgbW9yZSB0aW1lIGFuZCBpdCB3aWxsIGJlIHRoZSBsYXN0IC4uLiByZW5kZXIgdG8g
-Q2Flc2FyIHdoYXQgaXMgQ2Flc2FyJ3MgOiBRRUZQIEZQIFFFQiBETExBIFhLUFRCTyBaTEtET1hR
-UCBBUkFCIFZMUk8gUUVCIFlCUFEK
+Send feedback or something in https://f4koa.fr !
 
 <3 Peace, love, NO WAR !
-F4KLN-AM over.
+F4KOA-AM over.
 -=-=-=-=-=-=-=-=-=-=-=-=-=
 
 "
-$PSK -m qpsk -s 500 -f ~/BallonSonde/tx_process/filename.wav -t "$DATA"
-~/BallonSonde/tx_process/4_tx_file ~/BallonSonde/tx_process/filename.wav
+$PSK -m qpsk -s 500 -f /ramfs/psk.wav -t "$DATA"