Maybe someone's interested in one way to make nice live streaming graphs
from fgfs values, like I did for this image here:

  http://members.aon.at/mfranz/jitter.png  [20 kB]

Used software:
  fgfs, awk, kst (http://kst.kde.org/ -- free & GPL)


(A) make sure fgfs outputs the relevant data. Logging could certainly be
    used for that, but I'm not half as familiar with it as with Nasal, so
    I simply put a line like the following in a Nasal file:

      settimer(func {
          print("PLOT ", getprop("/velocities/uBody-fps"), " ",
                  getprop("/accelerations/pilot/y-accel-fps_sec"));
      }, 0);

    The actual code looked a bit different, but this should do it. It
    outputs lines like the following:

      PLOT 0.1429881410812092 0.004077885088460977


(B) create a FIFO and pipe the fgfs output there, filtering out all other
    lines, as well as removing the "PLOT" marker along the way:

      $ mkfifo /tmp/fifo
      $ fgfs --aircraft=OV10_USAFE 2>&1|awk '/^PLOT /{print $2" "$3}' >/tmp/fifo


(C) now wait until fgfs is started and the buffer contains enough values. You
    can start the OV10 engines in the meantime. Then start kst on the live 
stream:

      $ kst -y 1 -y 2 -m 1 -n 1000 stdin </tmp/fifo
    
    -y 1     ...  use column 1 for the first curve's y-values
    -y 2     ...  use column 2 for the second curve's y-values
    -m 1     ...  put both curves in separate graphs
    -n 1000  ...  always show 1000 values (scrolling contents to the left)

m.



PS: yes, I'm aware of gnuplot  :-)

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to