소스 검색

fix some things

Pierre Bourdin 1 년 전
부모
커밋
8a368ea735
7개의 변경된 파일31개의 추가작업 그리고 17개의 파일을 삭제
  1. BIN
      acquisition_process/.1_capture.swp
  2. 9 3
      acquisition_process/1_capture
  3. 1 1
      active_nmea.py
  4. 4 0
      convert_process/2_convert
  5. 8 0
      setup.sh
  6. 6 10
      sysconfig/config.txt
  7. 3 3
      tx_process/0_txmire

BIN
acquisition_process/.1_capture.swp


+ 9 - 3
acquisition_process/1_capture

@@ -26,6 +26,9 @@ 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 !"
+
 # Creation du script pour ajout des données Exif dans le JPG
 cat <<EOF > /ramfs/.conf_exif
     # Ajouter aux metadatas les informations de geolocalisation
@@ -38,10 +41,12 @@ cat <<EOF > /ramfs/.conf_exif
     add Exif.GPSInfo.GPSLongitude ${LOND}/1 ${LONM}/1 ${LONS}/10000
 EOF
 
-if [[ "$LAT" -ne "NO_DATA" ]]; then
-	exiv2 -m /ramfs/.conf_exif /ramfs/$DATE.jpg
-else
+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 
 fi
 
 echo "Picz $DATE.jpg saved in RAM"
@@ -49,4 +54,5 @@ mv /ramfs/$DATE.jpg ~/_Pictures
 echo "Picz $DATE.jpg saved to SDCARD"
 
 echo "$DATE.jpg" > /ramfs/.canbeconvert
+echo "Sleeping... zzzZZZzzZZZzzz..."
 sleep 60

+ 1 - 1
active_nmea.py

@@ -2,7 +2,7 @@
 
 import serial
 
-st="PMTK314,0,1,1,0,0,0,0,0,0,0,0,0,0,0"
+st="PMTK314,0,0,0,1,0,0,0,0,0,0,0,0,0,0"
 EOL = "\r\n"
 serial = serial.Serial("/dev/ttyAMA0", 38400)
 

+ 4 - 0
convert_process/2_convert

@@ -27,6 +27,10 @@ rm -rf /ramfs/$IMG
 echo "=> Adding annotaion"
 mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 26 -gravity NorthEast -annotate +10+10 " $(date) - F4KMH - 73 :o) " /ramfs/lit-$IMG
 
+echo "=> Adding GPS Position"
+GPS_POS=$(exiftool /home/pi/_Pictures/$IMG | grep "GPS Position" | cut -d":" -f2)
+mogrify -format 'jpg' -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 26 -gravity NorthEast -annotate +20+450 "$GPS_POS" /ramfs/lit-$IMG
+
 echo " => Converting image to WAV..."
 cd ~/PySSTV/
 source bin/activate

+ 8 - 0
setup.sh

@@ -10,4 +10,12 @@ sudo rm -rf /var/spool/cron/crontabs/pi
 sudo cp -r /home/pi/BallonSonde/sysconfig/pi /var/spool/cron/crontabs/
 sudo chown -R pi:crontab /var/spool/cron/crontabs/pi
 
+sudo mkdir /ramfs
+sudo chown -R pi: /ramfs
 
+
+sudo echo "tmpfs    /ramfs    tmpfs    rw,nodev,nosuid,users,noauto,size=32M" >> /etc/fstab
+
+mkdir ~/_Pictures
+
+sudo mount /ramfs

+ 6 - 10
sysconfig/config.txt

@@ -2,12 +2,6 @@
 # http://rpf.io/configtxt
 # Some settings may impact device functionality. See link above for details
 
-dtoverlay=disable-bt
-dtoverlay=audremap,pins_12_13 # for pins 12 and 13
-#force_turbo=1
-enable_uart=1
-#core_freq=250
-
 # uncomment if you get no picture on HDMI for a default "safe" mode
 #hdmi_safe=1
 
@@ -42,10 +36,7 @@ enable_uart=1
 #sdtv_mode=2
 
 #uncomment to overclock the arm. 700 MHz is the default.
-#arm_freq=1100
-#force_turbo=1
-#core_freq=450
-#over_voltage=6
+#arm_freq=800
 
 # Uncomment some or all of these to enable the optional hardware interfaces
 #dtparam=i2c_arm=on
@@ -89,3 +80,8 @@ arm_boost=1
 
 [all]
 gpu_mem=128
+
+dtoverlay=disable-bt
+dtoverlay=audremap,pins_12_13 # for pins 12 and 13
+#force_turbo=1
+enable_uart=1

+ 3 - 3
tx_process/0_txmire

@@ -15,8 +15,8 @@ cp /home/pi/BallonSonde/sound/mire.wav /ramfs/totx.wav
 #sleep 1
 #aplay ~/BallonSonde/sound/annonce_start.wav
 #sleep 1
-#aplay ~/BallonSonde/sound/mire.wav
+#aplay /ramfs/totx.wav
 #sleep 1
 #aplay ~/BallonSonde/sound/annonce_stop.wav
-#raspi-gpio set 4 dhmv /ramfs/totx.wav /ramfs/out.wav
-
+#raspi-gpio set 4 dh
+#