Ensibs/Systemes/Soluce.md

67 lines
1.7 KiB
Markdown
Raw Normal View History

2020-10-04 15:56:06 +02:00
## Solution / fichier TSV
~~~~bash
#!/bin/bash
grep VHW Data/00000012.TSV|cut -d, -f6 > /tmp/vitesse.data
grep DPT Data/00000012.TSV|cut -d, -f2 > /tmp/profondeur.data
grep MWV Data/00000012.TSV|cut -d, -f4 > /tmp/vent_apparent.data
gnuplot -persist <<-EOFMarker
plot '/tmp/vitesse.data' with line
replot '/tmp/profondeur.data' with line
replot '/tmp/vent_apparent.data' with line
pause 3
plot '/tmp/vitesse.data' smooth bezier with line
replot '/tmp/profondeur.data' smooth bezier with line
replot '/tmp/vent_apparent.data' smooth bezier with line
EOFMarker
# sortie du graphique dans un fichier image:
gnuplot -persist <<-EOFMarker
set term png
set output "sortie.png"
plot '/tmp/vitesse.data' smooth bezier with line, '/tmp/vent_reel.data' smooth bezier with line, '/tmp/vent_apparent.data' smooth bezier with line
EOFMarker
~~~~
## Solution / fichier CSV
~~~~ bash
#!/bin/bash
gnuplot -persist <<-EOFMarker
set datafile separator ','
set key autotitle columnhead
set style data line
set angles degrees
set grid
set xdata time
set timefmt '%Y-%m-%d %H:%M:%S'
set xlabel 'time'
set xtics rotate by 45 right
set tics font ",10"
set format x "%H:%M"
plot 'Data/00000012.csv' using 1:5
replot 'Data/00000012.csv' using 1:4
replot 'Data/00000012.csv' using 1:5 smooth bezier lw 4 title 'sow lissee'
replot 'Data/00000012.csv' using 1:4 smooth bezier lw 4 title 'depth lissee'
EOFMarker
~~~~
## Que s'est il passé ?
talonnage :
![](Png/c1.png)
![c2](Png/c2.png)
![c3](Png/c3.png)
![](Png/m1.png)
![m2](Png/m2.png)
![m3.2](Png/m3.2.png)
![m3](Png/m3.png)