Bo Shi wrote:
> I need to stream information to some custom software
> (pitch/yaw/roll) at frequencies on the order of 10 Hz -- what's the
> best way to do this?  I originally added some code in the main game
> loop to dump this but that solution was an ugly hack at best.

There are lots of options.  The existing logging facility (in the File
menu) writes to a file with an arbitrary name, and can be configured
to write arbitrary properties at an arbitrary.  You can make this file
a named pipe or a socket if you want to receive it by another process.

If you want it on stdout, you can use a really simple Nasal script
like this one (colon separated, with a terminal colon on the line
because I'm lazy):

  outputProperties = ["/orientation/pitch-deg", ... ];

  dumpOutput = func {
      msg = "";
      foreach(prop; outputProperties) {
          msg = msg ~ getprop(outputProperties) ~ ":";
      }
      print(msg);
      settimer(dumpOutput, 0.1); # Schedule to run again
  }
  settimer(dumpOutput, 0.1); # Schedule to the first time

There's also a TCP property interface about which I don't know as
much, which can be accessed by an external script which could poll at
whatever frequency you want.

Andy

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to