Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


gps_vs_barometric

Barometric vs GPS altitude, during drive

Below is a comparison between the barometric height above ground (from start), which happen to be also around 0 meters above sea level, and GPS height above sea level. During a drive to work.

  • Pressure sensor: Bosch BME280
  • GPS receiver: FGPMMOPA6H, MediaTek GPS Chipset MT3339

  • Data sample:
    Sep 26 07:05:37 2017;0.0;19.65;66.62;1022.63;-11.1
    Sep 26 07:05:39 2017;0.02;19.64;66.66;1022.63;-11.1
    Sep 26 07:05:41 2017;0.02;19.64;66.54;1022.63;-11.1
    Sep 26 07:05:43 2017;0.04;19.64;66.63;1022.63;-11.1
    Sep 26 07:05:45 2017;0.06;19.63;66.9;1022.63;-11.1
    Sep 26 07:05:47 2017;0.05;19.63;66.67;1022.63;-11.1
    Sep 26 07:05:49 2017;0.03;19.62;66.87;1022.63;-11.1
    Sep 26 07:05:51 2017;0.03;19.62;66.67;1022.63;-11.1
    Sep 26 07:05:53 2017;0.04;19.62;66.64;1022.63;-11.1
    Sep 26 07:05:55 2017;0.03;19.62;66.66;1022.63;-11.1
    <snip>
  • Gnuplot script:
    set title "BME280 - barometric height" 
    
    set term pngcairo enhanced font "arial,10" fontscale 1.0 size 1000,500
    set output "hoogte.png"
    
    set key left top
    set key box
    
    set autoscale 
    set grid back lw 1
    
    set datafile separator ";"
    # Tue Sep 26 07:05:37 2017;0.0;19.65;66.62;1022.63
    # Sep 26 07:05:37 2017;0.0;19.65;66.62;1022.63
    set datafile missing "?"
    
    set xdata time
    set timefmt "%b %d %H:%M:%S %Y"
    set format x "%T"
    set xtics  rotate by 90 offset 0,0 right
    
    set ylabel "meter above ground from start"
    set ytics 5
    
    set style line 1 lw 2 lc rgb "blue"
    set style line 2 lw 1 lc rgb "#708090"
    
    set label "< Brigde" at "Sep 26 07:13:23 2017", 12 tc rgb "black" left front offset 1,1
    set label "< Tunnel" at "Sep 26 07:33:30 2017", -20 tc rgb "black" left front
    set label "< Parking garage" at "Sep 26 07:37:00 2017", 3 tc rgb "black" left front
    set label "< The stairs up" at "Sep 26 07:41:00 2017", -15 tc rgb "black" left front
    set label "< Elevator to the 19th" at "Sep 26 07:43:30 2017", 3 tc rgb "black" left front
    
    
    plot "bme-en-gps.csv" using 1:2 title 'AGL barometric' with lines ls 1, \
         "bme-en-gps.csv" using 1:($6) title 'ASL from GPS' with lines ls 2
gps_vs_barometric.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1