Browse Source

delete old files

Pierre Bourdin 1 month ago
parent
commit
f96a3f7efe

+ 0 - 123
acquisition_process/1_capture

@@ -1,123 +0,0 @@
-#!/bin/bash
-
-source ~/BallonSonde/variables.sh
-
-CONVERTLL_PATH="/home/pi/BallonSonde/convert_ll_dec.py"
-READ_NMEA_PATH="/home/pi/BallonSonde/read_nmea.py"
-
-rm -rf /ramfs/*.jpg
-
-echo "=> Acquisition on !"
-DATE=$(date +%y%m%d_%H%M%S)
-
-###########################################
-# Si présence d'un GPS quelconque 
-# On va traîter les infos et les intégrer 
-# dans les métadatas.
-
-acquire_with_gps() {
-
-DATA=$(cat /ramfs/.gpsdata)
-NS=$(echo $DATA| tr ' ' '\n' | grep NS | cut -d'=' -f2 | cut -d',' -f1)
-EW=$(echo $DATA| tr ' ' '\n' | grep EW | cut -d'=' -f2 | cut -d',' -f1)
-
-LAT=$(echo $DATA| tr ' ' '\n' | grep 'lat=' | cut -d'=' -f2 | cut -d',' -f1)
-echo "Latitude $LAT"
-LATD=$($CONVERTLL_PATH $LAT | grep "d:" | cut -d':' -f2)
-LATM=$($CONVERTLL_PATH $LAT | grep "m:" | cut -d':' -f2)
-LATS=$($CONVERTLL_PATH $LAT | grep "s:" | cut -d':' -f2 | sed 's/\.//' )
-echo "$LATD $LATM $LATS"
-
-LON=$(echo $DATA| tr ' ' '\n' | grep 'lon=' | cut -d'=' -f2 | cut -d',' -f1)
-echo "Longitude : $LON"
-LOND=$($CONVERTLL_PATH $LON| grep "d:" | cut -d':' -f2)
-LONM=$($CONVERTLL_PATH $LON | grep "m:" | cut -d':' -f2)
-LONS=$($CONVERTLL_PATH $LON | grep "s:" | cut -d':' -f2 | sed 's/\.//')
-echo "$LOND $LONM $LONS"
-
-ALTITUDE=$(echo $DATA| tr ' ' '\n' | grep 'alt=' | cut -d'=' -f2 | cut -d',' -f1)
-echo "$ALTITUDE meters ! Wooo so hiiigh !"
-
-GPS_DATE=$(echo $DATA| tr ' ' '\n' | grep 'date=' | cut -d'=' -f2 | cut -d',' -f1)
-echo "GPS date : $GPS_DATE"
-
-# Creation du script pour ajout des données Exif dans le JPG
-cat <<EOF > /ramfs/.conf_exif
-    # Ajouter aux metadatas les informations de geolocalisation
-    # 'add' pour ajouter les informations
-    # 'set' pour remplacer celles déjà exisante
-    # 'del' pour les supprimer (sans préciser de valeur)
-    add Exif.GPSInfo.GPSLatitudeRef ${NS}
-    add Exif.GPSInfo.GPSLatitude ${LATD}/1 ${LATM}/1 ${LATS}/10000
-    add Exif.GPSInfo.GPSLongitudeRef ${EW}
-    add Exif.GPSInfo.GPSLongitude ${LOND}/1 ${LONM}/1 ${LONS}/10000
-    add Exif.GPSInfo.GPSAltitudeRef 0
-    add Exif.GPSInfo.GPSAltitude ${ALTITUDE}/1
-    add Exif.GPSInfo.GPSTimeStamp ${GPS_DATE:0:2}/1 ${GPS_DATE:2:2}/1 ${GPS_DATE:4:2}/1
-    add Exif.GPSInfo.GPSDateStamp ${GPS_DATE:0:2}:${GPS_DATE:2:2}:${GPS_DATE:4:2}
-EOF
-
-echo $LAT
-if [ "$LAT" == "NO_DATA" ]; then
-	echo "Don't have GPS datas, continue without these datas"
-else
-	exiv2 -m /ramfs/.conf_exif /ramfs/$DATE.jpg
-	exiftool -GPSAltitude=$ALTITUDE /ramfs/$DATE.jpg -overwrite_original
-fi
-
-cp /ramfs/$DATE.jpg ~/_Pictures
-echo "Picz $DATE.jpg saved in RAM and is flagged to .canbevoncerted"
-echo "$DATE.jpg" > /ramfs/.canbeconvert
-}
-
-##########################################
-# Pas de GPS, pas de métadatas.
-
-acquire_without_gps() {
-
-cp /ramfs/$DATE.jpg ~/_Pictures
-echo "$DATE.jpg" > /ramfs/.canbeconvert
-echo "Picz $DATE.jpg saved in RAM and is flagged to .canbevoncerted"
-}
-
-
-##########################################
-# Acquisition de l'image 
-# Boucle principale
-
-if [[ $FULL_RAW_RES = 1 ]]
-then
-	echo "Full resolution acquisition"
-	raspistill -o /ramfs/$DATE.jpg
-else
-	echo "PD1x0 resolution"
-	raspistill -o /ramfs/$DATE.jpg -w 640 -h 496
-fi
-
-if [ $? -eq 0 ]; then
-
-    if [[ $HAVE_GPS == 1 ]]
-    then
-	echo "Reading GPS data from device"
-        $READ_NMEA_PATH > /ramfs/.gpsdata
-        cat /ramfs/.gpsdata | grep "Pas de signal GPS"
-
-        if [[ $? -eq 0 ]]; then
-            echo "Pas de signal GPS"
-	    acquire_without_gps
-        else
-            echo "Signal GPS OK"
-	    acquire_with_gps
-        fi
-
-    else
-	echo "I d'ont have GPS..."    
-        acquire_without_gps
-    fi
-
-    sleep $DELAY_BETWEEN_ACQUISITION
-
-else
-  echo "Picz failed to be acquired..."
-  /home/pi/BallonSonde/tx_process/4_tx_file /home/pi/BallonSonde/sound/error_camera.wav
-fi

+ 0 - 77
convert_process/2_convert

@@ -1,77 +0,0 @@
-#!/bin/bash
-
-#IMG=$(cd /ramfs; find ./ -type f -name *.jpg -exec readlink -f {} \;)
-#IMG=$(ls -t /home/pi/_Pictures | head -1)
-
-source ~/BallonSonde/variables.sh
-
-while [[ ! -f /ramfs/.canbeconvert ]]; do
-    sleep 1
-    echo "wait for file to convert..."
-done
-
-IMG=$(cat /ramfs/.canbeconvert)
-echo "=> File $IMG detected !"
-
-#############
-# Mode SSTV
-while [[ -f "/ramfs/totx.wav" ]]; do 
-    echo "=> Skipping convert, because old one is not yet Txed !"
-    sleep 5
-done
-
-# On traite l'image...
-echo "=> Copying picz in RAMFS"
-cp ~/_Pictures/$IMG /ramfs/
-
-if [[ $FULL_RAW_RES = 1 ]]
-then
-	echo "=> Converting to PD120 Format <long>x496"
-	convert /ramfs/$IMG -resize 640x496^ /ramfs/lit-$IMG
-	rm -rf /ramfs/$IMG
-else
-	echo "=> Already to the right format"
-	mv /ramfs/$IMG /ramfs/lit-$IMG
-fi
-
-echo "=> Adding annotaion"
-mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 28 -gravity NorthEast -annotate +40+40 "$SSTV_BANNER"   -draw "image Over 525,350 90,117 'ussel.png'" /ramfs/lit-"$IMG"/ramfs/lit-$IMG
-
-if [[ $HAVE_GPS = 1 ]]
-then
-    echo "=> Adding GPS Position"
-
-    # On cherche à voir si on a la position GPS ou non dans le exif
-    if [ exiftool ~/_Pictures/$IMG | grep -e "GPS Position" -e "GPS Altitude" -eq 0 ]
-    then
-        GPS_POS=$(exiftool ~/_Pictures/$IMG | grep "GPS Position" | cut -d":" -f2)
-        ALTITUDE=$(exiftool ~/_Pictures/$IMG | grep "GPS Altitude" | cut -d":" -f2)
-        GPS_DATE=$(exiftool ~/_Pictures/$IMG | grep "GPS Date/Time" | 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
-        mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 24 -gravity NorthEast -annotate +40+50 "$GPS_DATE" /ramfs/lit-$IMG
-    else
-        echo "=> No GPS Position found"
-        # Pas beau de mettre no gps, on commente
-        #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
-
-echo " => Converting image to WAV..."
-cd ~/PySSTV/
-source bin/activate
-#time python -m pysstv --mode PD120 --rate 8000 --bits 16 --vox --fskid $INDICATIF /ramfs/lit-$IMG /ramfs/totx.wav
-time ~/libsstv/bin/sstv-encode pd120 /ramfs/lit-$IMG /ramfs/totx.wav
-
-deactivate
-echo "=> Setting flag that can be Tx"
-touch /ramfs/.canbetx
-
-rm -rf /ramfs/lit-$IMG
-
-echo -n ""
-

BIN
convert_process/test.jpg


BIN
convert_process/ussel.png


BIN
mire.jpg


+ 0 - 18
tx_process/0_txmire

@@ -1,18 +0,0 @@
-#!/bin/bash
-
-source ~/BallonSonde/variables.sh
-source ~/BallonSonde/functions.sh
-
-touch /ramfs/.canbetx
-cp /home/pi/BallonSonde/sound/mire.wav /ramfs/totx.wav
-
-# Old version stylez
-# Setup the GPIO4 as output for Tx
-
-ptt_on
-sleep 1
-echo " => Playing WAV file"
-#cd ~/trxamadrmv3_7/linux
-#./txwfal 0
-aplay /home/pi/BallonSonde/sound/mire.wav 
-ptt_off

+ 0 - 82
tx_process/3_transmit

@@ -1,82 +0,0 @@
-#!/bin/bash
-
-source ~/BallonSonde/variables.sh
-source ~/BallonSonde/functions.sh
-
-if [ ! -f /ramfs/.canbetx ]; then
-	echo "Nothing to transmit, wait 5 seconds"
-	sleep 5
-	exit 1
-fi
-
-rm /ramfs/.canbetx
-echo "=> moving totx.wav to out.wav"
-mv /ramfs/totx.wav /ramfs/out.wav
-
-# 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"
-    ptt_off
-    rm -rf /ramfs/*
-}
-
-ptt_on
-sleep 1
-echo " => Playing WAV file"
-cd ~/trxamadrmv3_7/linux
-./txwfal 0
-sleep 1
-
-
-############################
-# Partie prez + SSTV
-aplay ~/BallonSonde/sound/2025_stpourcain/1_prez.wav
-ionice -c 2 -n 0 aplay /ramfs/out.wav
-
-sleep 1
-
-
-###########################
-# Partie QPSK31
-
-aplay ~/BallonSonde/sound/2025_stpourcain/2_qpsq31.wav
-~/BallonSonde/tx_process/qpsk31
-aplay /ramfs/psk.wav
-
-###########################
-# Partie CW super crade
-
-if [[ $HAVE_GPS = 1 ]]
-then
-    ARGS=$(~/BallonSonde/read_nmea.py | awk '{print $3 $5}' | awk -F'[=,]' '{print "--lat " $2 " --lon " $4}')
-    QTH=$(~/BallonSonde/qth_locator.py location_to_square $ARGS)
-    MESSAGE="$INDICATIF-AM $INDICATIF-AM from France
-QTH : $QTH
-PEACE FOR ALL
-"
-else
-    MESSAGE="$INDICATIF-AM $INDICATIF-AM from France
-PEACE FOR ALL
-"
-fi
-
-aplay ~/BallonSonde/sound/2025_stpourcain/3_cw.wav
-echo $MESSAGE | /usr/local/bin/cwwav -f 700 -w 22 -o /ramfs/cw.wav; aplay /ramfs/cw.wav; rm /ramfs/cw.wav
-
-##########################
-# Stop Message
-
-aplay ~/BallonSonde/sound/2025_stpourcain/4_stop.wav
-ptt_off
-
-##########################
-# un peu de repos pour le transceiver :)
-# et ça aide au GPS pour retrouver ses petits.
-sleep 30
-
-if [[ -f /ramfs/out.wav ]]; then
-	echo " => All done, cleaning ramfs"
-	rm -rf /ramfs/out.wav
-fi
-

+ 0 - 8
tx_process/easter4

@@ -1,8 +0,0 @@
- _______ .______       _______  _______    .______      ___       __       _______     _______.___________. __  .__   __.  _______ 
-|   ____||   _  \     |   ____||   ____|   |   _  \    /   \     |  |     |   ____|   /       |           ||  | |  \ |  | |   ____|
-|  |__   |  |_)  |    |  |__   |  |__      |  |_)  |  /  ^  \    |  |     |  |__     |   (----`---|  |----`|  | |   \|  | |  |__   
-|   __|  |      /     |   __|  |   __|     |   ___/  /  /_\  \   |  |     |   __|     \   \       |  |     |  | |  . `  | |   __|  
-|  |     |  |\  \----.|  |____ |  |____    |  |     /  _____  \  |  `----.|  |____.----)   |      |  |     |  | |  |\   | |  |____ 
-|__|     | _| `._____||_______||_______|   | _|    /__/     \__\ |_______||_______|_______/       |__|     |__| |__| \__| |_______|
-                                                                                                                                  
- 

+ 0 - 17
tx_process/easter5

@@ -1,17 +0,0 @@
-⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
-⠀⠀⠀⠀⠀⠀⢀⡠⠔⠚⠉⠉⠀⠀⠀⠀⠈⠉⠙⠲⢤⣀⠀⠀⠀⠀⠀⠀
-⠀⠀⠀⠀⣠⠔⠋⠀⢀⣠⠤⠒⢢⠀⠀⣴⠒⠦⢤⣀⠀⠈⠳⣄⠀⠀⠀⠀
-⠀⠀⢀⡴⠁⠀⣠⠖⠋⠀⠀⠀⢸⠀⠀⣿⠀⠀⠀⠈⠓⢤⡀⠈⠳⡄⠀⠀
-⠀⢀⡞⠀⢀⡼⠁⠀⠀⠀⠀⠀⢸⠀⠀⣿⠀⠀⠀⠀⠀⠀⠳⡄⠀⠙⣆⠀
-⠀⡞⠀⠀⡞⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠘⡄⠀⠸⡄
-⢰⠃⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀⠀⣧
-⢸⠀⠀⡏⠀⠀⠀⠀⠀⠀⠀⣠⠞⠀⠀⠙⢦⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⢸
-⢸⠀⠀⣧⠀⠀⠀⠀⠀⣠⠞⠁⠀⠀⠀⡀⠀⠓⣄⠀⠀⠀⠀⠀⢸⠀⠀⣸
-⠘⡆⠀⠸⡀⠀⠀⣠⠞⠁⠀⣠⢾⠀⠀⢷⣄⠀⠈⠳⣄⠀⠀⠀⡞⠀⠀⡇
-⠀⢳⡀⠀⠳⣄⠔⠁⠀⢀⠔⠁⢸⠀⠀⢺⠈⠳⣄⠀⠈⠳⣤⡼⠁⠀⡼⠀
-⠀⠀⢳⡀⠀⠀⠀⢀⡴⠋⠀⠀⢸⠀⠀⢸⠀⠀⠈⠳⣄⠀⠀⠀⢀⡼⠁⠀
-⠀⠀⠀⠙⢦⡀⠀⠘⠦⣄⡀⠀⢸⠀⠀⢼⠀⠀⣀⡤⠚⠀⠀⣠⠞⠀⠀⠀
-⠀⠀⠀⠀⠀⠙⠦⣀⠀⠀⠉⠑⠊⠀⠀⠘⠚⠉⠁⠀⣀⡤⠚⠁⠀⠀⠀⠀
-⠀⠀⠀⠀⠀⠀⠀⠈⠙⠒⠦⠤⢄⣀⣀⡠⠤⠤⠖⠊⠁⠀⠀⠀⠀
-
-   NO WAR, PEACE FOR ALL.

BIN
tx_process/filename.wav


BIN
tx_process/out.wav


+ 0 - 51
tx_process/qpsk31

@@ -1,51 +0,0 @@
-#!/bin/bash
-
-source ~/BallonSonde/variables.sh
-
-PSK=~/PSK31-Modulation-WAV-Generator/psk
-
-if [[ $HAVE_GPS = 1 ]]
-then
-
-    GPS=$(~/BallonSonde/read_nmea.py)
-
-    DATA="
--=-=-=-=-=-=-=-=-=-=-=-=-=
-$INDICATIF-AM $INDICATIF-AM
-Computer say that we are approximatively here :
-"$GPS"
-"
-DATA=$DATA$(cat ~/BallonSonde/tx_process/easter$((1 + $RANDOM % 5)))
-
-DATA=$DATA"
-From $COUNTRYFROM, launched near $CITYFROM
-
-Send feedback or something in $WEBSITE_REPORT !
-
-<3 Peace, love, NO WAR !
-$INDICATIF-AM over.
--=-=-=-=-=-=-=-=-=-=-=-=-=
-
-"
-else
-
-    
-	DATA="
--=-=-=-=-=-=-=-=-=-=-=-=-=
-$INDICATIF-AM $INDICATIF-AM
-
-$(cat ~/BallonSonde/tx_process/easter$((1 + $RANDOM % 5)))
-
-From $COUNTRYFROM, launched near $CITYFROM
-
-Send feedback or something in $WEBSITE_REPORT !
-
-<3 Peace, love, NO WAR !
-$INDICATIF-AM over.
--=-=-=-=-=-=-=-=-=-=-=-=-=
-"
-
-
-fi
-
-$PSK -m qpsk -s 500 -f /ramfs/psk.wav -t "$DATA"

BIN
ussel.png