Browse Source

enh enh enh

Pierre Bourdin 2 weeks ago
parent
commit
1c62d0795c
3 changed files with 10 additions and 3 deletions
  1. 3 1
      convert_process/2_convert
  2. 3 0
      read_nmea.py
  3. 4 2
      tx_process/3_transmit

+ 3 - 1
convert_process/2_convert

@@ -32,7 +32,9 @@ echo "=> Adding GPS Position"
 
 
 # On cherche à voir si on a la position GPS ou non dans le exif
 # 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"
 exiftool /home/pi/_Pictures/$IMG | grep -e "GPS Position" -e "GPS Altitude"
-if $? -eq 0; then
+echo $?
+if [ $? -eq 0 ]
+then
   GPS_POS=$(exiftool /home/pi/_Pictures/$IMG | grep "GPS Position" | cut -d":" -f2)
   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)
   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+410 "Altitude : $ALTITUDE" /ramfs/lit-$IMG

+ 3 - 0
read_nmea.py

@@ -12,6 +12,9 @@ x=stream.readline()
 if not "GPGGA" in str(x):
 if not "GPGGA" in str(x):
   stream.close()
   stream.close()
   os.system("./active_nmea.py &2> /dev/null")
   os.system("./active_nmea.py &2> /dev/null")
+  os.system("sleep 1")
+  
+
   print("Pas de signal GPS")
   print("Pas de signal GPS")
   exit(1)
   exit(1)
 
 

+ 4 - 2
tx_process/3_transmit

@@ -43,9 +43,10 @@ aplay /ramfs/psk.wav
 aplay ~/BallonSonde/sound/2024_aubusson/3_tx_cw.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
 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
 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
+# On se passe 
+#/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...
 # alt 311.7 lat 46.0154466667N lon 1.0988666667E for example...
-aplay /ramfs/cw.wav; rm /ramfs/cw.wav
+#aplay /ramfs/cw.wav; rm /ramfs/cw.wav
 
 
 aplay ~/BallonSonde/sound/2024_aubusson/9_stop_en.wav
 aplay ~/BallonSonde/sound/2024_aubusson/9_stop_en.wav
 aplay ~/BallonSonde/sound/2024_aubusson/9_stop_fr.wav
 aplay ~/BallonSonde/sound/2024_aubusson/9_stop_fr.wav
@@ -56,3 +57,4 @@ if [[ -f /ramfs/out.wav ]]; then
 	rm -rf /ramfs/out.wav
 	rm -rf /ramfs/out.wav
 fi
 fi
 
 
+sleep 15